Hi Atin,

A very central idea when working with actors is to not share any mutable 
state, instead mutable state is encapsulated inside of the actors. If one 
actor needs to know something about the state of another actor it will ask 
for it using immutable messages and get an immutable reply.

This way there is no need to use regular threading primitives. It does 
require a mind shift though. I would recommend reading one of the Akka 
books to get deeper into the concept. Here is a list of books covering akka 
and actors: http://doc.akka.io/docs/akka/snapshot/additional/books.html

--
Johan Andrén
Typesafe -  Reactive apps on the JVM
Twitter: @apnylle


On Tuesday, August 18, 2015 at 5:05:44 PM UTC+2, Atin Sood wrote:
>
> Re posting since I wasn't able to get any feedback on the last post. 
>
> On Tuesday, August 18, 2015 at 4:16:36 AM UTC-4, Atin Sood wrote:
>>
>> Hi 
>>
>>
>> I am new to learning akka and I am looking into a problem of trying to 
>> create a movie hall reservation system. I am trying to wrap my head around 
>> how to achieve concurrency with akka. If I end up creating multiple 
>> instances of akka actors then where/how should I share the global state of 
>> the total number of seats booked and how many are still available.
>>
>>
>> I believe it should be in the same code that starts the actor system. Or 
>> am I misunderstanding the whole concept.
>>
>>
>> In understand this is an extremely basic question but I wasn't able to 
>> find any good resources explaining this, so will really appreciate if you 
>> can point me in the right direction.
>>
>>
>> Regards
>>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to