Hi Sebastian

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

First of all, there is no blocking here, your actor will need to implement
a state-machine. It needs to accumulate incoming data fragments until it
gets the necessary amount of data and then parse it -- at least in the
simplest case.


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

Streaming comes here as a replacement for the old pipelines, and with full
support for automatic backpressure all the way down (the user don't need to
implement backpressure directly in most of the cases). You are in that
unfortunate time-window where the old pipelines are gone, and the new
streams have no decoding support yet (although I have a working prototype
already in a branch, but I will need to tweak the API a bit before it will
go in).


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

Yes, you should care. The benefit is that you don't have to deal with
backpressure directly, and you can use familiar constructs like map and
filter on streams. In your use case I would recommend to familiarize
yourself with the Transformer class which is rich enough to express most of
the decoding needs. Alternatively, you just wait until the codec API comes
out.


> How would a hypothetical client do anything different than sending
> messages when it has been given the instruction to do so?
>

I am not sure I understand this question :) Since we don't have a manual
yet, you can only look at the tests, for example this one:


https://github.com/akka/akka/blob/akka-stream-and-http-experimental-0.6/akka-stream/src/test/scala/akka/stream/io/TcpFlowSpec.scala

The last two test-cases in the above file implement a simple Echo server
with the stream TCP support


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

There is not much stream-theory around AFAIK :) I personally use Petri-nets
to describe behavior of streams, but I think it is quite abstract to be
that useful in daily use.


> 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 :-)
>

It is important to remember that Akka Streams is currently heavily
experimental, and we break things sometimes more than once in a month :)
This will slow down eventually, but we are planning some important API
changes in 0.7

-Endre


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



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

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