These are chat archives for akkadotnet/akka.net

14th
Feb 2016
Bartosz Sypytkowski
@Horusiath
Feb 14 2016 10:29
@Aaronontheweb @rogeralsing I think, we should create a separate WIP branch for akka-streams. So far it's nursery is my own fork, but we should make it easier to access to the rest of the developers.
Vladimir Golubev
@vgl
Feb 14 2016 16:30
Hello to everyone!
Akka.NET is great, thanks for Your job
i have few questions about building my system using akka.net
Whats the best way of saving data. I need to run multiple actors( i will do it using akka.cluster) this actors will perform many external web services request and return json. After that i need to save the requests
after tasks are done i will aggregate data and save it to DB.
Christian Sparre
@christiansparre
Feb 14 2016 16:34
Akka.Persistence is an option... http://getakka.net/docs/Persistence
Vladimir Golubev
@vgl
Feb 14 2016 16:34
My questions: What is the best way of impl. tracker that will wait untiill all small tasks finishes to continue with aggregation.
and second what is the best way of impl. saving data to db?
Christian Sparre
@christiansparre
Feb 14 2016 16:35
So an actor for each web service call?
Vladimir Golubev
@vgl
Feb 14 2016 16:35
Yes, because each user can generate tons of service calls
to get data
putting this code in mvc controller is a nightmare when i will need to scale up/out
implementing my own web service with queue is not an option, because we already has Akka.NET:)
@christiansparre I don't need statefull actors
i need to save data after actor work is done. Memoery is not an option - to be amount
Christian Sparre
@christiansparre
Feb 14 2016 16:38
Without knowing more the tracker would be a "parent" actor that initiates a number of child actors to do the webservice call. When they are done the "Tell" their parent and when all children are done aggregate and save?
Vladimir Golubev
@vgl
Feb 14 2016 16:38
Small case - 1 user need to call up to 1.2k of external api requests with different params, then with this data i will make my calculation
Does Repository pattern is ok for implementing as Actor?
Christian Sparre
@christiansparre
Feb 14 2016 16:39
A repository for saving data is just fine I think,
Vladimir Golubev
@vgl
Feb 14 2016 16:39
@christiansparre basically yes you got my idea
Christian Sparre
@christiansparre
Feb 14 2016 16:40
Akka.Persistence is probably more suited for EventSourcing types of cases...
Vladimir Golubev
@vgl
Feb 14 2016 16:40
but its just a jornal with snapshots
and for exmaple i need to get this data later, like few months, to get a picture of how calculation results were changing
Christian Sparre
@christiansparre
Feb 14 2016 16:41
If that's the case Event Sourcing could be the solution
Vladimir Golubev
@vgl
Feb 14 2016 16:42
for now there is not buil in tracker functionality in akka.net?
Christian Sparre
@christiansparre
Feb 14 2016 16:42
For managing the "webservice" actors, looking at routers might be an idea: http://getakka.net/docs/working-with-actors/Routers
Vladimir Golubev
@vgl
Feb 14 2016 16:42
so this sub actors work i need to handle in my own written parent tracker, right?
Christian Sparre
@christiansparre
Feb 14 2016 16:43
No, akka.net is very much a set of tools that will allow you to solve very complex things, without the pitfalls of concurrent programmet etc.
Yes, use akka.net to build what you need, it is a very nice framework for that kind of stuff.
Vladimir Golubev
@vgl
Feb 14 2016 16:44
routers will be used deffenetly
because it will be distrebuted over vms system
with few nodes
Christian Sparre
@christiansparre
Feb 14 2016 16:44
Vladimir Golubev
@vgl
Feb 14 2016 16:45
Yes, its pretty much what i was thinking to implement form scratch))))
Christian Sparre
@christiansparre
Feb 14 2016 16:45
There you go then :) get to it.. hehe
Vladimir Golubev
@vgl
Feb 14 2016 16:45
))))
any dba here?
If that's the case Event Sourcing could be the solution
What You mean?
Christian Sparre
@christiansparre
Feb 14 2016 16:47
A response to your statment about going back and analysing how the calculations were done. "for exmaple i need to get this data later, like few months, to get a picture of how calculation results were changing"
That is hard if you only saved the final product of the aggregation and not something about how that result came to be.
Vladimir Golubev
@vgl
Feb 14 2016 16:48
Users will perform operations with some interval
and result of each report should be saved....
So later we can get it and build charts, diagrams, tables, etc
Vladimir Golubev
@vgl
Feb 14 2016 17:00
i will save the aggreagation and result of webservice calls results
so i can see how each parameter returned form a webservice call changing with time
Aaron Stannard
@Aaronontheweb
Feb 14 2016 19:34
@Horusiath that's a good idea - create a branch for it and start doing incremental PRs
no monsters