Re: [akka-user] Reading values/slices of large (multi-dimensional) array from multiple actors

2014-06-10 Thread Marco Luca Sbodio
I decided to have an actor that is responsible for building the multi-dimensional array; when the array is ready, this actor replies to messages by sending a (serializable) object that contains the array, and that provides methods to read values at specific coordinates: example public class

[akka-user] Reading values/slices of large (multi-dimensional) array from multiple actors

2014-06-05 Thread Marco Luca Sbodio
Hello everyone, after having thought for some time about this problem, I can't find a good solution, and so I decided to ask for help. I essentially have a large (multi-dimensional) array of numbers (float), that is the result of some computation. I would like to have a clean, safe and

Re: [akka-user] Reading values/slices of large (multi-dimensional) array from multiple actors

2014-06-05 Thread Daniel Armak
Isn't that what .view.slice does? Daniel Armak On Thu, Jun 5, 2014 at 4:34 PM, √iktor Ҡlang viktor.kl...@gmail.com wrote: Hi, This sounds plausible to me: Create an interface that wraps a section of the float array and pass an instance of that section into the actor when it is created

Re: [akka-user] Reading values/slices of large (multi-dimensional) array from multiple actors

2014-06-05 Thread √iktor Ҡlang
I'd avoid using Scala views, they're known to have problems. On Thu, Jun 5, 2014 at 3:37 PM, Daniel Armak danar...@gmail.com wrote: Isn't that what .view.slice does? Daniel Armak On Thu, Jun 5, 2014 at 4:34 PM, √iktor Ҡlang viktor.kl...@gmail.com wrote: Hi, This sounds plausible to

Re: [akka-user] Reading values/slices of large (multi-dimensional) array from multiple actors

2014-06-05 Thread Marco Luca Sbodio
Hi, thank you for your suggestion, but I think I this is not applicable to my case for two reasons: - I don't know at the actor creation time which slice of the array that actor may need - I can't guarantee to have non-overlapping sections handed out to actors: two actors may actually request

Re: [akka-user] Reading values/slices of large (multi-dimensional) array from multiple actors

2014-06-05 Thread Daniel Armak
If they only need readonly access, then why does it matter if the views are overlapping? Daniel Armak On Thu, Jun 5, 2014 at 8:01 PM, Marco Luca Sbodio marco.sbo...@gmail.com wrote: Hi, thank you for your suggestion, but I think I this is not applicable to my case for two reasons: - I

Re: [akka-user] Reading values/slices of large (multi-dimensional) array from multiple actors

2014-06-05 Thread √iktor Ҡlang
If you never write you just need to make the view read only and can allow overlap On Jun 5, 2014 7:02 PM, Daniel Armak danar...@gmail.com wrote: If they only need readonly access, then why does it matter if the views are overlapping? Daniel Armak On Thu, Jun 5, 2014 at 8:01 PM, Marco Luca