Thanks for the suggestions, Roland! I went ahead and converted the logging actor to be an ActorSubscriber. I also added a buffer() to the flow as you suggested. I am not sure that picked appropriate strategies (overflow and request) as working with streams at this level is something I do not have much experience with.
Thanks again, -scott On Thursday, October 9, 2014 3:24:56 AM UTC-5, rkuhn wrote: > > Hi Scott, > > thanks for sharing, it is looking pretty good. The one thing that is > slightly odd is to terminate the back-pressure in the ForeachSink and send > to the Actor’s mailbox—which should then be configured to be bounded or > else the system can run out of memory. Perhaps the next step would be to > change the LoggingActor into an ActorSubscriber in order to properly handle > back-pressure, and then I would recommend adding a bounded .buffer() > element into the graph between the broadcast and the logging sink. Another > alternative to the buffer would be a .conflate() step which just counts the > number of dropped messages during back-pessure, leading to “dropped 1234 > messages” as a replacement for 1234 actual messages. > > Regards, > > Roland > > 8 okt 2014 kl. 21:23 skrev Scott Weaver <[email protected] > <javascript:>>: > > Hi! > > I have been playing around with the new 0.7 FlowGraph DSL and decided to > "convert" the older TcpServer found in the Akka Streams Activator template > to the new FlowGraph DSL. > > This is what I came up with: EchoServer > <https://github.com/scottweaver/akka-stream-echo-server/blob/master/src/main/scala/stream/EchoServer.scala> > > Am I going about things correctly? Are there any obvious improvements or > things I might have missed? > > Thanks, > -scott > > -- > >>>>>>>>>> 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. > > > > > *Dr. Roland Kuhn* > *Akka Tech Lead* > Typesafe <http://typesafe.com/> – Reactive apps on the JVM. > twitter: @rolandkuhn > <http://twitter.com/#!/rolandkuhn> > > -- >>>>>>>>>> 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.
