Hey List! My name is Sebastian and I'm fairly new to Scala and Akka :-) I've been working with Ruby (and Rails) amost exclusively for the last 7 years, but I decided it's time for some new input on functional patterns and strong types.
I want to create a simple Protocol that can be used for client-server event/count-logging. I already figured out how to prepend a fixed lenght to the Bytestring, as well as an identifier-Byte to define the incoming message's type, so the decoding and mapping of individual Bytestrings into Actor messages works quite well. I'm also planning to use my own client, which will probably just fire sequential Tcp.Write commands to the established connection. The handling Actor on the server's connection will basically decode the Bytestring, generate a Message and dispatch to another Actor. I assume that I can send multiple Events in a single Bytestring, as they will be decoded recursively, and the server handling actor would just block until the Bytestring has as least be received (if I chose to pass decoding to another Actor). That'd be ok for me, since my logic tells me that the client just can't send another message until it has finished sending one. So, how does streaming come in here? I've had a hard time understanding the now obsolete Pipelining construct of Akka 2.2, and I can surely see how that would streamline decoding, encoding (and even transport with TcpReadWriteAdapter). My question is: Do I even have to care about "streaming" for the above use-case of 1-on-1 client-server tcp connection? What benefits would emerge if I'd try to use Akka Streams? How would a hypothetical client do anything different than sending messages when it has been given the instruction to do so? I've hit quite a wall researching on that topic in my spare time (that's where I learn Scala/Akka), so maybe someone could give me a hint on Stream-theory, an exemplary pattern for my use-case to have a good look at, a link for clarification or even a chapter of a book I'd buy? I'd also be happy to be told that I've been partly or fully wrong :-) Thanks in advance and cheers, -Sebastian -- >>>>>>>>>> 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.
