[swift-server-dev] Netty would be a good framework to look at

Helge Heß me at helgehess.eu
Sun Oct 30 05:05:01 CDT 2016


On 30 Oct 2016, at 02:01, Andrew Akira Toulouse via swift-server-dev <swift-server-dev at swift.org> wrote:
> ==extended example==

This goes back to my original question (https://lists.swift.org/pipermail/swift-server-dev/Week-of-Mon-20161024/000030.html):

  3) Do you really want just a Socket, or is what you really want
     a (byte) stream framework?

I’m not sure what people really want here (as part of this effort). There wasn’t a lot of feedback yet, but I think most of it was ‘just a basic socket’.


What you describe is similar to what I’m prototyping as Noze.io for Swift, it is described a little over here:

  http://noze.io/noze4nonnode/

It is not optimised for speed (yet) nor is the API geared towards Swift API style guides, but it does provide a pretty high level batch streaming framework that is completely asynchronous, provides piping and back pressure support. It has a type safe streaming API for arbitrary types (all your ‘frame decoder’, ‘text decoder’, ‘JSON decoder’ things). Maybe this is an OK demo, notice how the pipe input is UInt8 and the pipe output are RedisValue's:

  https://github.com/NozeIO/Noze.io/blob/master/Sources/redis/RedisParser.swift

Echo-Daemon with a user-level transform:

  https://github.com/NozeIO/Noze.io/blob/master/Samples/echozd/main.swift


Just to be clear: I’m _not_ suggesting to use this as the ‘socket’ for this project :-) But I think the basic concept of the streams may be applicable and worth considering IF the goal here is to actually provide something that high level.

hh

P.S.: A Swift Netty clone sounds excellent to me as well :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.swift.org/pipermail/swift-server-dev/attachments/20161030/a68f95a3/attachment.sig>


More information about the swift-server-dev mailing list