Thanks, I actually make use of spray-can for external data exchange. So I 
will use it internally too. I have one more question on that but it may be 
out of scope. I receive POST calls that contains the serialised object 
which I get as ByteString (extracted from spray.http.HttpEntity) and I 
simply store it with a key (which I read it from the header). I basically 
get the ByteString as follows:

val bytes: ByteString  = request.entity.data.toByteString


Now, lets say a node contains an immutable map with million unique keys 
mapped to ByteStrings. When transferring data to another node, sending a 
million POST request to the other node could be a problem in terms of 
performance. Could there be a better way to manage this?

On Thursday, March 19, 2015 at 7:48:57 PM UTC+2, Martynas Mickevičius wrote:
>
> Hi Ömer,
>
> it is not recommended to send large messages via the remoting channel. 
> Mainly because the same channel is used for the heartbeat and other system 
> messages. If you are able to use milestone versions of akka-stream and 
> akka-http I would suggest creating an HTTP endpoint where big data 
> structures can be streamed as JSON. Then one would use remoting to exchange 
> the address of the reasourse and akka-http to consume it.
>
> On Thu, Mar 19, 2015 at 8:41 AM, Ömer Faruk Gül <omerg...@gmail.com 
> <javascript:>> wrote:
>
>> Hi,
>>
>> What would be the best practice to transfer data (an immutable Map which 
>> could be of size from 1MB to 100 MB) in between two nodes in a an Akka 
>> Cluster?
>>
>> I initially thought of dividing the map into chunks and sending them as a 
>> message to the new actor living in the other node, is that a good practice, 
>> or should I try something else?
>>
>> My immutable variable is this:
>>
>> var store = Map.empty[String, ByteString]
>>
>>
>>  -- 
>> >>>>>>>>>> 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+...@googlegroups.com <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Martynas Mickevičius
> Typesafe <http://typesafe.com/> – Reactive 
> <http://www.reactivemanifesto.org/> Apps on the JVM
>  

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to