These are chat archives for akkadotnet/akka.net

25th
Jul 2016
Bart de Boer
@boekabart
Jul 25 2016 07:38
you'll have to define a port (not 0) in your hocon, and just 1:1 map that port?
Max
@maxpaj
Jul 25 2016 08:07
Does anyone have experience with MongoDB storage plugin for Akka Persistence? I'm trying to set up a small example with one ReceivePersistentActor. I'm seeing the database and the collections being created, but no events going in to the journal collection. My handler callback is being run, and my OnPersistFailure method is not which gives me the impression that the frameworks considers the events persisted, but I see nothing in the database... Weird. Does anyone have any input on this?
Marc Piechura
@marcpiechura
Jul 25 2016 08:30
@maxpaj could you try it with the Akka version the plugin is referencing ? It's quite outdated so maybe it's not working with newer versions
Ricky Blankenaufulland
@ZoolWay
Jul 25 2016 08:50
There have been some problem reported last week regarding the latest Helios version - with the recommendation to stick to the previous one. Any update on this?
Max
@maxpaj
Jul 25 2016 09:25
@Silv3rcircl3 Ah, I see. I tried just switching to Redis and that worked immediately. But yeah, I'll try that!
Alex Valuyskiy
@alexvaluyskiy
Jul 25 2016 10:08
@maxpaj yes, MongoDb driver is not compatible with Akka 1.1.x. I will look it
Marc Piechura
@marcpiechura
Jul 25 2016 10:11
@alexvaluyskiy could you also add these changes when you update the plugin ? akkadotnet/Akka.Persistence.MongoDB#17
Alex Valuyskiy
@alexvaluyskiy
Jul 25 2016 10:33
@Silv3rcircl3 I will try
@Silv3rcircl3 Why have you used Mongo2Go package?
@Silv3rcircl3 nvm, I've already read the docs
Infatum
@Infatum
Jul 25 2016 10:53
@sean-gilliam i think, akka.net documentation isn't full enough... it would be better to have such like MSDN
Alex Valuyskiy
@alexvaluyskiy
Jul 25 2016 11:29
@Infatum you could use Api Reference http://api.getakka.net/docs/stable/html/5590F8C9.htm
Max
@maxpaj
Jul 25 2016 11:32
@Silv3rcircl3 I actually didnt get it working with its target dependencies either... But since the Redis plugin worked I'll just continue with that for now.
Ricky Blankenaufulland
@ZoolWay
Jul 25 2016 14:19
I got a wired scenario with 1.1.0 where I tell a local actor (IActorRef) a message and it is never delivery and also no dead letter pops up. The destination actor even has a Receive<object>() to get everything - but no reaction. It is started because PreStart() is executed... Anyone an idea what I can do to debug?
Weston
@ronnyek
Jul 25 2016 14:23
man, I wish I could find something with where akka streams would be valuable
I get the backpressure
but I cant find much in the way of real world usages... lots of youtube vids I watched
and it was like oh heres a stream of numbers... I want to make sure I process them in x way
or whatever
Ricky Blankenaufulland
@ZoolWay
Jul 25 2016 15:53
Hm, I believe my problem is that I create a child actor inside of ReceiveAsync... await is bad inside of actors but what is the most simple Ask pattern then? I have a GetOrCreateChildActor method why returns an existing child if I already got one for the given entity or creates one... when I create one I need to Ask another actor about some meta data.... Any recommendations?
Vagif Abilov
@object
Jul 25 2016 15:55
@ronnyek I actually have the same issue with streams, can't figure out real business scenario for them.
Marc Piechura
@marcpiechura
Jul 25 2016 15:56
@ronnyek I have created a example for the docs https://github.com/Silv3rcircl3/Akka.Net-Streams-reactive-tweets also @Aaronontheweb has fixed some problems with the webcrawler sample with streams
That are some more real world usages if it helps
Marc Piechura
@marcpiechura
Jul 25 2016 16:02
Also this video shows it in combination with Akka.http https://m.youtube.com/watch?v=6VBn9V3S2aQ which is based on Akka.Streams, now imagine you have DB driver who expose Source's and web apis who expose Sink's for the response and in between you have your stream processing stages
Vagif Abilov
@object
Jul 25 2016 16:02
@Silv3rcircl3 oh that's great, thanks.
Weston
@ronnyek
Jul 25 2016 16:10
I think that will be helpful
and the webcrawler woudl be nice if there was a we moved from x to y, but could probably find that if I could find the change list
Aaron Stannard
@Aaronontheweb
Jul 25 2016 16:36
I haven't published the changes to WebCrawler yet
I used simple flows the first time around
need to rewrite that to use graph stages instead
Weston
@ronnyek
Jul 25 2016 18:31
hmmm so I could basically apply rx logic to a Source<T,T2> to create another source
Marc Piechura
@marcpiechura
Jul 25 2016 18:35
Basically, yes ;)
But you can do a lot more with the graph API
Weston
@ronnyek
Jul 25 2016 18:41
yep, that would be interesting to know more about
instead of affectign stream of ints
Marc Piechura
@marcpiechura
Jul 25 2016 18:51
Have you looked at the docs?
qwoz
@qwoz
Jul 25 2016 18:54

@ZoolWay I've been dealing with the same thing myself, where I need to lookup information from another actor in order to process a message I receive. What I've settled on is that if it's a low-volume child actor and you don't care if it blocks, just use ReceiveAsync<Foo>(async message => .... However, if it's a higher volume actor and you don't want it to block, then use the pattern:

Receive<Foo>(message => {
   var sender = Sender; // closure
   otherActor.Ask<Bar>(request).ContinueWith(tr => {
      return new DoMore<Bar>(tr.Result, message, sender);
   }, TaskContinuationOptions.AttachedToParent & TaskContinuationOptions.ExecuteSynchronously)
   .PipeTo(Self);
}

You can then have:

Receive<DoMore<Bar>>(message => ...

and continue processing the original message plus the new result, doing a Tell back to the original sender if you need to.

You might need better error handling for the ContinueWith part, but that's the gist.
Weston
@ronnyek
Jul 25 2016 19:00
as I recall there were like 5 links into docs, other than the overalll architecture doc, I investigated links
also watched some non akka.net specific videos talking about streaming.... and while I understand the value of back pressure, seems like a lot focus on that
Marc Piechura
@marcpiechura
Jul 25 2016 19:05
I mean the ones from getakka http://getakka.net/docs/streams/introduction , they contain a lot examples
Sean Gilliam
@sean-gilliam
Jul 25 2016 20:23
@Infatum yeah there are large gaps in the documentation that we're trying to fill (both api and general docs). it's a huge undertaking that some of us are working on. documentation PRs are more than welcome and encouraged :)
Iuri L. Machado
@imetallica
Jul 25 2016 21:42
Hey peeps, I've a question: I'm going to write an API using Suave (F# web server). I'm unsure if I should put it inside an actor on my API nodes or that's maybe an overkill.
to11mtm
@to11mtm
Jul 25 2016 22:30

@imetallica Not sure exactly what you mean when you say that; Do you mean actors within the process?

That said, you may want to look at spray. It's a Scala framework to build web services on top of Akka (JVM ofc).

Given some of the benchmark numbers I've seen from spray, I'd be REALLY curious to see how a SPRAY for .net would do
Iuri L. Machado
@imetallica
Jul 25 2016 22:35
@to11mtm I mean, should I "host" Suave inside an Akka Actor.
@to11mtm actually something in the likes of Cowboy (Erlang Web Server) would be cool as well. One Actor for each connection.
to11mtm
@to11mtm
Jul 25 2016 22:49
sounds kinda like spray
cowboy that is
also, WOOT, got my all my tests on persistence running =D
to11mtm @to11mtm begins the arduous task of cleaning up the code