These are chat archives for akkadotnet/akka.net

27th
Jun 2017
Greatsamps
@Greatsamps
Jun 27 2017 06:36
@jesseconnr I am in a similar situation. Depending on how your entities are structured you may be able to reuse some of the messages. For example we use a Guid for all the ID for all types, so we have a DeleteItem message which we can then pass to the relevant actor. We also use the same message for an Add as well as an Update, the difference being if an ID is specified then it is an Update otherwise its an Add.
Following on from this however i do have a question if there is a best practice when it comes to presenting lists in a Web Portal. At the moment each Entity within the list has its own actor, we have a parent actor that manages all these. We then have another actor which essentially holds a copy in memory of every actor's underlying data, which is then updated each time it changes. When we want to get the list we query this actor and the output is provided from the local memory copy. I expect for performance this local copy could actually sit on the webserver
whilst this works in the limited examples we have so far, types that have huge data sets could cause an issue, and we then need to start thinking about indexing etc. I am getting the feeling that i am essentially building my own database here.
i did have a thought of a hybrid solution, where lists are drawn directly from the DB, and any adds / updates / deletes are done into the actor system. That way the DB is doing all the heavy lifting and the actor system is dealing with the time critical parts, but not sure on mixing the two
any thoughts around this?
Arjen Smits
@Danthar
Jun 27 2017 06:56
In general, i would be very hesitant in using an Actor based framework in a simple Crud application. Unless your absolutely sure the model has advantages for your use case.
Simply because of the reasons being outlined above. It makes seemingly simple stuff alot more work.
Having said that. Instead of building an "index" actor. Have your query be an Actor itself. One that you start and asks each relevant entity actor for its data, so its acts as an collector building the list on demand. You can easily combine that with timeouts so your sure it wont take to long, this is especially handy if your doing any sort of remoting/clustering.
Greatsamps
@Greatsamps
Jun 27 2017 07:10

@Danthar I did have this idea also, build a request that is sent to all actors, and they either respond with the data or a 'not applicable' style message. I think you are right however in that it should be used for very specific cases only. I have been lucky that we have had a very simple project to create which i did using the actor framework throughout, it has become clear, as you say, that for crud stuff its a lot more work.

we have a much bigger project that combines real-time and non-real-time elements, so each part is doing what it does best sounds like the best approach!

Stephen Newman
@goodisontoffee
Jun 27 2017 10:36
@Horusiath or anyone - I've developed an example solution and pushed it to https://github.com/goodisontoffee/HyperionContainerSerialisation that illustrates the issue I am having
Stephen Newman
@goodisontoffee
Jun 27 2017 10:54
I'll try to see if I can't pin the issue down in vs
Arjen Smits
@Danthar
Jun 27 2017 11:29
@goodisontoffee have you created on issue for that on the hyperion repo ?
without it, there is no real way for us to track the issue. Stuff in gitter chat gets lost pretty quickly
And we all have volatile ram for memory ;) for most of us, it cycles every couple of days ;)
Stephen Newman
@goodisontoffee
Jun 27 2017 11:43
@Danthar will do mate
Stephen Newman
@goodisontoffee
Jun 27 2017 11:51
Issue raised on Hyperion repo - akkadotnet/Hyperion#58
Jesse Connor
@jesseconnr
Jun 27 2017 14:39
@Greatsamps thanks for the input, I think most of my time right now has been spent naming messages from subconsciously fighting against putting verbs in my class names, as far as the large dataset issue you may have, I think a hybrid solution would work really well, I'm a fan of CQRS and Akka fits it quite well.
Greg Woodbury
@gwoody1984
Jun 27 2017 19:42
Does anyone know of a good tutorial for running akka.cluster on azure service fabric?
Aaron Stannard
@Aaronontheweb
Jun 27 2017 19:43
no, we need to add one
Greg Woodbury
@gwoody1984
Jun 27 2017 19:47
@Aaronontheweb thanks! yeah that would be super useful