Re: [akka-user] Merging more than two Akka Stream Sources with materialized values

2016-09-24 Thread Patrik Nordwall
Take a look at MergeHub. It's rather new.
http://doc.akka.io/docs/akka/2.4/scala/stream/stream-dynamic.html

/Patrik
lör 24 sep. 2016 kl. 00:53 skrev oleksiys :

> Hi guys,
>
> I need to merge mutliple sources Seq[Source[A, Mat]] and as an output get
> something like Source[A, Seq[Mat]].
> For now I just merge sources in pairs using mergeMat, but I have a doubt
> that the merged Source will distribute the demand fairly among the
> underlying sources, because AFAIK my merged source will finally look like:
> (source-1, (source-2, (source-3 ... (source-N-1, source-N)... and
> assuming random demand distribution - the larger the N is - less chances
> that source-N will ever see any demand. Is that correct?
>
> There is a Source.combine method, that does almost exactly what I need,
> but unfortunately it wipes all the Mats information.
>
> Do you have any suggestion how I can achieve that?
>
> Thank you!
>
> WBR,
> Alexey
>
> --
> >> 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.
>

-- 
>>  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] how to set an node to seed please?

2016-09-24 Thread maodihao
If all nodes in cluster is normal node, none is seed.
How to set one of nodes as seed please?
I can't do this, no new node can join the cluster.

Thanks

-- 
>>  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] WebSocket closed immediately after upgrade

2016-09-24 Thread Dan Ellis
Here's the code I'm using:

https://gist.github.com/danellis/11017d58496a80e0b0d63e2581c20d2d

When a client connects, I get this in the log:

04:05:17.732 DEBUG akka.io.TcpListener - New connection accepted 
04:05:17.866 DEBUG akka.actor.ActorSystemImpl - Creating WebSocket inbound 
actor 
04:05:17.869 DEBUG akka.actor.ActorSystemImpl - Creating WebSocket source 
04:05:17.872 DEBUG akka.actor.ActorSystemImpl - Creating WebSocket sink 

and in WireShark I see that the server returned a 101 response, but then 
immediately after that sent a FIN.

So my source and sink are being created, but my source never get 
materialized before the socket is closed for some unknown reason. I've been 
looking at this for a couple of days now, and I just can't see what's 
causing it to get closed to early. My best guess is that Akka thinks my 
Source has finished for some reason, but I don't known the Streams API well 
enough to know why that might be.

Any ideas?

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