These are chat archives for petabridge/akka-bootcamp

5th
Jul 2017
sbardos
@KingKnecht
Jul 05 2017 19:22
Hi, at the very beginning the lesson 1 says: "In OOP everything is an object. In an actor model everything is an actor". Is that true? I'm thinking about a collaborative diagram designer with shapes, connection-lines etc. Is every shape, connection-line an actor?
Aaron Stannard
@Aaronontheweb
Jul 05 2017 19:38
@KingKnecht not necessarily
think of it like a unit of work
maybe you have one actor responsible for the render state on-screen
a second actor responsible for determining who's in control of the drawing right now (when multiple users)
a third actor responsible for persisting the drawing state
and so forth
not every object needs to literally be an actor
but units of work should be expressed as actors, and each piece of work that needs to be done as part of the app should be an actor processing a message
that message procession action can include using other non-actor objects, like a connection to a database
does that make sense?
sbardos
@KingKnecht
Jul 05 2017 19:54
@Aaronontheweb Yes, it does. So, it's more like a service facade to work with my OOP-objects, right? Another thing I don't understand at the moment: If I have such an graphical client and a server. Client says "Add shape", "Move shape" then same actors on the server side check if the operations are valid and push a message back to the client (no "ask" here). If client did valid operations shape is there and moved. Otherwise client has to correct the "Add" or the "Move". I can imagine that. But what happens if a new user joins the project? How does this user receive the current, complete project state? Sorry, very general questions...
@Aaronontheweb "some actors.." not "same actors..."