Thank you for the hint Martynas! I'll see if I can transfer that to my 
problem.

On Thursday, May 14, 2015 at 3:17:00 PM UTC+2, Martynas Mickevičius wrote:
>
> Hi Jonas,
>
> akka stream tcp/http works in a similar way. A bind to a socket is made 
> when Source[IncomingConnection, ...] is materialized. Then every element in 
> that source represents a client connection which can accept a Flow that 
> transforms incoming bytes to outgoing ones. So materialization is actually 
> happening more that once. First for the incoming connection source, and 
> then for every incoming connection.
>
> You can check out bindAndHandle in akka-http 
> <https://github.com/akka/akka/blob/b11a5d488fbc1a2212ba317949ddb9c6d58fd480/akka-http-core/src/main/scala/akka/http/scaladsl/Http.scala#L62-L76>
>  
> code where you can see one .run() on the outer layer, and then a .run() in 
> the foreach.
>
> On Sun, May 10, 2015 at 2:30 PM, Jonas Adler <[email protected] 
> <javascript:>> wrote:
>
>> Hi All, 
>>
>> I have a graph consisting of 2 parts: The first part is a flow that 
>> connects to an irc network, it looks something like this: 
>> Source[IrcMessage, Unit]
>> The second part is a flow that is materialized once per client connection 
>> (websockets: Flow[Message, Message, Any]). 
>>
>> The goal is to have the Source connected to the outgoing client flow. The 
>> Problem is that I want that Source to only materialize once (one connection 
>> to the irc network, fan out to all websocket clients)
>> Basically I need to generate a Source[IrcMessage, Unit] from an already 
>> materialized Source[IrcMessage, Unit].
>>
>> Did anyone encounter a similar problem and found a solution? Every hint 
>> is welcome :)
>>
>> Thanks, 
>>
>> Jonas
>>
>>
>>
>>  -- 
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <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 [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