These are chat archives for akkadotnet/akka.net

20th
Oct 2017
Kento
@robinsondotnet
Oct 20 2017 01:53
How can I set up a docker compose file to use Akka cluster with lighthouse?
Aaron Stannard
@Aaronontheweb
Oct 20 2017 01:56
working on setting one up myself, although I got a bit delayed :p
I'm planning on passing in the actor system name and the seed node list as environment variables in my Dockerfile for Lighthouse
Jessie Wadman
@JessieWadman
Oct 20 2017 01:57
Use stateful sets if you can, for lighthouse.
Aaron Stannard
@Aaronontheweb
Oct 20 2017 01:57
and the Docker compose file is going to pass in those seed node addresses to the other non-seed nodes too
haven't had a chance to get that far with that yet
started on it last week and got distracted with some other stuff
Jessie Wadman
@JessieWadman
Oct 20 2017 01:59
@robinsondotnet What orchestrator are you using?
Kento
@robinsondotnet
Oct 20 2017 02:30
How could I run the web crawler example using Docker compose? (just Docker compose up)
Kento
@robinsondotnet
Oct 20 2017 02:43
I've created the services (lighthouse, web, tracking service, crawlrsrervice) but they cannot connect to lighthouse service (port 4083)
Aaron Stannard
@Aaronontheweb
Oct 20 2017 02:44
that's going to depend on the network they're running on
and in the logs you should be able to see what the real bindings of lighthouse are
if lighthouse is binding to localhost
you are toast
it needs to bind to a reachable IP on the network
Kento
@robinsondotnet
Oct 20 2017 02:49
All services in the compose file are running in the same network.
Aaron Stannard
@Aaronontheweb
Oct 20 2017 02:50
but what are the bound addresses
Kento
@robinsondotnet
Oct 20 2017 02:51
Do you mean the hocon settings?
Aaron Stannard
@Aaronontheweb
Oct 20 2017 02:51
yeah, for Akka.Remote port bindings
but mostly IP address
all of those addresses need to be reachable on the network
Kento
@robinsondotnet
Oct 20 2017 02:54
I still doesn't get what would be
Aaron Stannard
@Aaronontheweb
Oct 20 2017 02:54
do a log dump then?
"Akka.Remote is now listening on: __"
that's the information
fleed
@fleed
Oct 20 2017 09:42
Thank you @Danthar for the explanation about .net core DI
spriet2000
@spriet2000
Oct 20 2017 10:17
hello
I have some architecture questions about using akka net with an old spaghetti code application. can somebody give me some directions in a private conversation?
Kento
@robinsondotnet
Oct 20 2017 14:51
@Aaronontheweb thanks. How can I get my docker network ip adress?
I thought that I could keep working with 127.0.0.1 and I only had to do the port binding (in the docker-compose.yml file)
Joshua Garnett
@joshgarnett
Oct 20 2017 16:34
What’s the best way to add MDC support to Actors? I was thinking about adding some wrapper around the receive, which would set some fields and then clear them at the end. Not sure where is the best place to put that override though.
Joshua Garnett
@joshgarnett
Oct 20 2017 17:36
hmm
This looks straightforward for pesistent actors, less so for ReceiveActors
Joshua Garnett
@joshgarnett
Oct 20 2017 19:48
This is the hack I went with:
        protected void ReceiveMdc<T>(Action<T> handler) {
            Receive(HandlerMdc(handler));
        }

        protected Action<T> HandlerMdc<T>(Action<T> handler) {
            return msg => {
                try {
                    AddMappedDiagnosticsContext();
                    handler(msg);
                }
                finally {
                    MappedDiagnosticsContext.Clear();
                }
            };
        }
Aaron Stannard
@Aaronontheweb
Oct 20 2017 20:48
@joshgarnett MDC support?
not familiar with that acronym :p
Mapped Diagnostics Context
It’s a logging thing
It’s super useful for structured logs
Aaron Stannard
@Aaronontheweb
Oct 20 2017 20:49
ah nice
man
Traits are such a nice feature
the amount of shit we go through to ape that stuff in .NET is insane
Joshua Garnett
@joshgarnett
Oct 20 2017 20:56
Traits definitely are handy sometimes
they can be abused super easily as well
Aaron Stannard
@Aaronontheweb
Oct 20 2017 20:56
this is true
nothing makes me rage harder than some of Scala's language features and their impact on readability
implicit being the absolute worst offender
Joshua Garnett
@joshgarnett
Oct 20 2017 20:59
Yeah implicits are pretty horrible
They have some nice uses, but the temptation is too strong to abuse them
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:00
I don't have a good term to describe this type of developer
but you know when you have that one dude who tries to make each line of code as compressed as possible?
as though LOC means anything
Joshua Garnett
@joshgarnett
Oct 20 2017 21:00
Yep
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:00
that's the sort of person who goes apeshit with implicit
same sort of person who leaves semicolons off of their javascript line endings so it's more syntactically beautiful
oh wait... I think I did define a term for this person
Joshua Garnett
@joshgarnett
Oct 20 2017 21:02
There have been studies that show more lines of code leads to more bugs, but I’d argue that when you start doing the scala craziness, you negate those findings a bit :P
lol
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:02
well, there's more "lines of code" because there's "more code"
Joshua Garnett
@joshgarnett
Oct 20 2017 21:02
I like that you wrote a blog post
On this :P
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:03
dude, I had to start giving names to some of this stuff
my favorite on that list for a long time was the Pet Technologist
right around the time NoSQL was emerging
Joshua Garnett
@joshgarnett
Oct 20 2017 21:04
I’ll have to give it a read through after this meeting I’m in
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:04
like the programmer had picked their technology stack before they even knew what the problem was
cart leading the horse
honestly I need to do a Redux of that post
think of it like an expansion pack where we add new playable characters to the universe
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:14
pretty sure the "Functional Programming Purist" is going to earn a spot on that list
Joshua Garnett
@joshgarnett
Oct 20 2017 21:14
Those are my favorite
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:15
"The high priest of higher kinded types, he invents terms for programming constructs you've never heard of because they exist only in the form of boolean algebraic expressions written on the back of an empty Doritos bag in his office."
Joshua Garnett
@joshgarnett
Oct 20 2017 21:15
My favorite example was reading about the cake pattern and being told how simple it was
I just noped out of there :P
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:16
Monadic endofuctor hyperplane fractal renders are my favorite
SO EASY
(this term is meaningless)
"The Serverless Guy"
would be another one
Joshua Garnett
@joshgarnett
Oct 20 2017 21:17
You running into a lot of lambda fans lately?
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:18
Azure Functions
Joshua Garnett
@joshgarnett
Oct 20 2017 21:18
Same diff :P
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:18
but yeah
"The Anything is Possible with JavaScript if we all Believe Hard Enough" guy
Joshua Garnett
@joshgarnett
Oct 20 2017 21:18
It has some interesting properties and has some valid use cases, but I’m pretty happy with the flexibility Kubernetes or something similar gives me
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:19
I just don't write much software that would benefit from it
most of my stuff is real-time stream processing
Joshua Garnett
@joshgarnett
Oct 20 2017 21:19
haha, I troll Node.JS fans all the time at my company. “When I want to ensure a prototype doesn’t make it into production, I write it in a horrible language, like Node.JS"
Aaron Stannard
@Aaronontheweb
Oct 20 2017 21:19
so it's perpetually executing and accumulating state
yeah, definitely enough material to do a second one of those
Roman Golenok
@shersh
Oct 20 2017 22:11

Hi guys.
I'm trying to understand how streams works)
And I found interesting Sink.ActorRef<T>(IActorRef)which (if I understand right) should send each elemnt from source to Actor.
But he doesn't.
Here is gist:
https://gist.github.com/shersh/2dd43ac70ff95e20ed4c1e4b2f87b38c

Where I am wrong?

don't pay attention to syntax mistakes) I just tried to clean up code from other experiments
Shamsul Amry
@ShamsulAmry
Oct 20 2017 22:43

I'm trying to have a RunnableGraph.FromGraph(GraphDsl.Create(...)) which will return a materialized value of an IActorRef. In that graph dsl I have a Source.ActorRef, and I want to materialize that IActorRef.

I managed to do that if I'm not using the GraphDsl. Tried various stuff, but still can't manage to wrap my head on how to do this the GraphDsl way.

Some hint please?