On Tuesday, December 30, 2014 1:39:01 AM UTC-5, Krishna Kadam wrote:
>
> Hi Soumya,
>              Please suggest, where can I find material related to 3rd 
> point 
>

http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M2/scala/stream-introduction.html
 

> and if in my example, blocking is a problem then, is there any way to 
> avoid this problem?
>
> Here are some ways that I've used to prevent blocking in my codebase and 
improve the performance of my actors in general. 

1. Use Futures whenever possible (Caveat : don't *close* over Actor's 
mutable state in the Actor's receive method) 
2. Use non-blocking IO whenever available. For example, if a datastore 
provides a non-blocking driver use that. E.g., ReactiveMongo, Rediscala ... 
3. Use non-blocking Logging. For example, Logback has a non-blocking async 
appender. 
4. Break down your actor receive logic into multiple parts and try to make 
each of these parts async and non-blocking as possible. This will allow 
each actor to be scheduled independently of the other, thereby increasing 
your parallelism. 
5. If some of your actors take longer to process then schedule them a 
different dispatcher. 
6. Tweak your dispatcher settings and take measurements to see which one is 
better. 
7. Add back pressure to bound your memory usage and max. your resource 
usage. I think reactive streams is your best bet here.

I'm experience with Akka is limited. I'm sure there are experts here who 
can give you much better guidance. 

-Soumya




 

-- 
>>>>>>>>>>      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