These are chat archives for akkadotnet/akka.net

29th
Jun 2015
Marc Piechura
@marcpiechura
Jun 29 2015 06:25
@Aaronontheweb have you read my message about Mongo2Go?
I think I could use my fork and provide a different database directory but then I need to include the dll and mongodb in the test repositories instead of the nuget pakage
Package
Marc Piechura
@marcpiechura
Jun 29 2015 10:24
@Horusiath I would like to replace the custom serializer with the build in one from mongodb so that the user can customize how the events are serialized but this would also add a responsibility that he registered all his events before using a persistence actor. Is this ok or do you thing the plugin should handle this ?
Marc Piechura
@marcpiechura
Jun 29 2015 10:34
I mean how the payloads are serialized
Bartosz Sypytkowski
@Horusiath
Jun 29 2015 10:45
@Silv3rcircl3 persistence plugins usually don't describe how payloads should be serialized (it's up to user to decide), however some of Akka.Persistence messages have defined proto-buff serialization - in this case custom payload is first serialized using custom/default serializer, but then it is treated as binary field of persistent enveloping message and serialized using proto-buf
Bartosz Sypytkowski
@Horusiath
Jun 29 2015 10:50

if you want, you could provide your own MongoDb-oriented serializer, but it had to be configured for:

  • Akka.Persistence.Serialization.Snapshot, Akka.Persistence to serialize snapshot envelopes (with content)
  • Akka.Persistence.Serialization.IMessage, Akka.Persistence to serialize journal message envelopes (also with content)

limitation is that serializer is expected to work with binary data

I don't know if mongodb driver exposes an API to send already binarized data through it
Marc Piechura
@marcpiechura
Jun 29 2015 11:02
You mean a at least once delivery message for example? This would arrive as byte array in the payload property when I want to store it in the event journal?
Bartosz Sypytkowski
@Horusiath
Jun 29 2015 11:06
I mean that when you're calling IPersistentRepresentation serialization/deserialization, it has configured an explicit proto-buf message serializer
but maybe I'm blurring to much ;) I guess, that you want to serialize journal events/snapshots in such way, that their fields could be visible from mongo db engine perspective?
Marc Piechura
@marcpiechura
Jun 29 2015 11:11
Exactly :-) actually I'm using the serializer that is provided by System.Serialization.FindSerialzerForType(IPersistentRepresentation) call toBinary and store the byte array as Payload in the JournalEntry mongodb
Now I want to store the PersistenceReprestation.Payload object directly without serialization
Bartosz Sypytkowski
@Horusiath
Jun 29 2015 11:13
yep, that sounds good ;)
Marc Piechura
@marcpiechura
Jun 29 2015 11:13
Mongodb will serialize it automatically
Ok, great ;-)I will add a section to the readme to be save
Bartosz Sypytkowski
@Horusiath
Jun 29 2015 11:15
is this Australian squirrel or what? http://9gag.com/gag/adpYe3M
Roger Johansson
@rogeralsing
Jun 29 2015 12:03
lol
poisonous squirrel
tstojecki
@tstojecki
Jun 29 2015 12:27
so... Context.DI().ActorOf<> is obsolete in the latest...
can somebody point me to a doc that explains what to replace it with, i am using it as most of the actors have other dependencies
it says to use Props instead, but wouldn't that mean that i have to provide the dependencies directly rather than let the container do it?
sorry if it was asked/discussed before
tstojecki
@tstojecki
Jun 29 2015 12:36
is that the way to do it now? Context.ActorOf(Context.DI().Props<>)?
AndreyPetrov1991
@AndreyPetrov1991
Jun 29 2015 12:56
Hi guys! I have a question fot you) How can I set up Akka to perform this logic: 1. I want to have two equal actors subscribed to the EventBus, 2. When I put a new message to the EventBus, only the first free actor will recieve this message and the second will not?
AndreyPetrov1991
@AndreyPetrov1991
Jun 29 2015 13:10
Is my question clear to understant?
Roger Johansson
@rogeralsing
Jun 29 2015 13:35
you can not do that with the EventBus, EventBus will publish to all subscribers.. you could do a SmallestMailbox router with two actors, and let the router subscribe to the eventbus.. thats the closes you will get
Bartosz Sypytkowski
@Horusiath
Jun 29 2015 13:39
@rogeralsing if we could settle on some decision about BackoffSupervisor I could continue refucktoring of akka cluster sharding ;)
Arjen Smits
@Danthar
Jun 29 2015 16:09
@tstojecki yup it is. The docs have been updated a few days ago. http://getakka.net/docs/Dependency%20injection
If there is anything unclear about it in the docs. Please let us know :)
Chris Ray
@chris-ray
Jun 29 2015 16:37
@Danthar I think I remember the example "Example supervisor strategy" here: http://getakka.net/docs/concepts/supervision being out-of-date, I could be wrong though
tstojecki
@tstojecki
Jun 29 2015 18:26
thanks @danthar, i just read it and it looks very accurate...
somehow when googling it i kept landing on http://getakka.net/docs/DI%20Core
maybe there should be a link between the two just to clarify
i wish it had taken me to the doc you pointed me to
Arjen Smits
@Danthar
Jun 29 2015 19:14
there is, but its from the other end.
@chris-ray the supervision document is ok :)
Chris Martin
@trbngr
Jun 29 2015 19:21
Having to use PipeTo bites me in the ass everyday. /rant :)
tstojecki
@tstojecki
Jun 29 2015 19:41
@trbngr i would love to see a 1st class support of async/await too
i have used PipeTo and the contrib project for asyncActors
i know there were long debates about that, not trying to start another one :)
Chris Martin
@trbngr
Jun 29 2015 19:42
nope haha. Just makes code more terse. I can deal with it
Roger Johansson
@rogeralsing
Jun 29 2015 19:42
And the one we have doesnt work?
Chris Martin
@trbngr
Jun 29 2015 19:43
No Actor Context
Roger Johansson
@rogeralsing
Jun 29 2015 19:43
Yes.. Receive actor with async method preserves context
Chris Martin
@trbngr
Jun 29 2015 19:44
Problem lies with PersistentActor in my case
Roger Johansson
@rogeralsing
Jun 29 2015 19:44
Ah ok
Thomas Lazar
@thomaslazar
Jun 29 2015 20:24
@Danthar: could you take a look at the Dependency Injection documentation regarding Child Actors? it is wrong. you can't use Context.DI().Props() with a lambda expression. there's only one accepting a type and a generic one without a parameter. would defeat the purpose of DI to provide one with a lambda that instantiates a class not using DI
i'm heading to bed myself now. so good night
Aaron Stannard
@Aaronontheweb
Jun 29 2015 22:36
@Horusiath pulled in BackoffSupervisor