[akka-user] Re: research about concurrency bugs

2016-09-07 Thread Guido Medina
Hmm, as an example, look at end of it and try to share a mutable message.

Create a message with an ArrayList and send it to several actors,
then try to modify and iterate over such list and you will probably 
(eventually) get a concurrent modification exception.

That's one example I can think of, maybe too simple for your study but 
anyways, hope somehow it can lead you to what you need/want.

Guido.

On Wednesday, September 7, 2016 at 12:28:19 PM UTC+1, Guido Medina wrote:
>
> Hi Carmen,
>
> The following might not have a specific example but will probably help you 
> seeing in details the design concepts behind Akka combined with the Java 
> Memory Model,
> most of the aspects you have mentioned are avoided but maybe there is a 
> way to reproduce one or two by contradicting the advises in the following:
>
> http://doc.akka.io/docs/akka/2.4.10/general/jmm.html
>
> HTH,
>
> Guido.
>
> On Wednesday, August 31, 2016 at 12:05:11 AM UTC+1, Carmen Torres López 
> wrote:
>>
>> Hello,
>>
>> I'm doing a research about concurrency bugs types that can be observed in 
>> languages based in actor model. I would like to know what kind of bugs can 
>> be observed frequently in Akka? Has anyone experience a behavoir such as 
>> deadlocks, livelock, starvation, race conditions, order violation, etc.? 
>> I will appreciate any pointer of an example code that generate these bugs.
>>
>> Best regards,
>> Carmen
>>
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: research about concurrency bugs

2016-09-01 Thread Dagny T
Hey Carmen,

I'm a Scala/Akka Newbie; but I think the idea in Scala is to use Actors to 
avert most concurrency bugs.

So, essentially (Akka) Actors are things that can hold their own state, 
like Objects in traditional OOP languages.
External Entities can Message to Actor references to signal it to change 
its own state, or to respond with information about itself.
The underlying Akka system handles the serialization of those immutable 
Messages to the Actors' 'Mailbox' or like dedicated min-message-queues.

Typically, multiple entities could concurrently message to any Actor.  So, 
the ordering of those incoming messages is random.
However, the Akka serialization of those messages ensures that there's no 
race-conditions to worry about.
This also precludes having to do locks, and therefore running into 
deadlocks.

I'm not sure if this means that you have to design your System such that 
Ordering doesn't matter (i.e. first Message to get to Actor wins); and then 
to handle Duplicate messages from
horizontally scalable Actor Cluster instances (i.e. one Actor crashes in 
mid-flow and its replacement sends a duplicate message)

Anyhow -- I'm DEFINITELY interested in seeing a good example of exercising 
the baseline concurrency test-cases using Akka-Testkit!  Will post that 
interest so that we both may get help with that answer!

Cheers!
Dagny T

On Tuesday, August 30, 2016 at 4:05:11 PM UTC-7, Carmen Torres López wrote:
>
> Hello,
>
> I'm doing a research about concurrency bugs types that can be observed in 
> languages based in actor model. I would like to know what kind of bugs can 
> be observed frequently in Akka? Has anyone experience a behavoir such as 
> deadlocks, livelock, starvation, race conditions, order violation, etc.? 
> I will appreciate any pointer of an example code that generate these bugs.
>
> Best regards,
> Carmen
>

-- 
>>  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.