Hi,
I am pleased to announce the first public release of Zinc WebSockets, an implementation of client and server RFC 6455 regular (ws://) and secure (wss://) WebSockets on top of Zinc HTTP Components and Zodiac TLS/SSL Streams. High level documentation can be found here: https://github.com/svenvc/docs/blob/master/zinc/zinc-websockets-paper.md The code can be found in the regular Zinc repositories, or can be loaded using Metacello: ConfigurationOfZincHTTPComponents project latestVersion load: 'WebSocket'. Three examples are included and explained in the high level documentation: 1. a trivial echo service - each incoming message is simply echoed back to the client 2. a simple chatroom - each client opens a web socket to the chatroom service running on the server - the server keeps track of all connected client web sockets - when a message comes in from any client it is distributed to all clients - each client shows all incoming messages 3. a simple, continously updated status view - a client connects and listens for incoming messages containing a status report - the server streams status reports to each connected client every second - in the web browser you get to see the Smalltalk image's clock, memory and process stats Tested and approved on 2.0 #281. Portability to 1.3 and 1.4 should be OK. The implementation of Zinc WebSockets was made possible in part through financial backing by Andy Burnett of Knowinnovation Inc. and ESUG. Thanks! Questions, remarks, feedback ? Please use the Pharo Smalltalk mailing lists. Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill |
Thank sven and andy and ESUG for the sponsoring.
I like bounties because this is ground up from the needs to the code and green tests! Stef > Hi, > > I am pleased to announce the first public release of Zinc WebSockets, an implementation of client and server RFC 6455 regular (ws://) and secure (wss://) WebSockets on top of Zinc HTTP Components and Zodiac TLS/SSL Streams. > > High level documentation can be found here: > > https://github.com/svenvc/docs/blob/master/zinc/zinc-websockets-paper.md > > The code can be found in the regular Zinc repositories, or can be loaded using Metacello: > > ConfigurationOfZincHTTPComponents project latestVersion load: 'WebSocket'. > > Three examples are included and explained in the high level documentation: > > 1. a trivial echo service > > - each incoming message is simply echoed back to the client > > 2. a simple chatroom > > - each client opens a web socket to the chatroom service running on the server > - the server keeps track of all connected client web sockets > - when a message comes in from any client it is distributed to all clients > - each client shows all incoming messages > > 3. a simple, continously updated status view > > - a client connects and listens for incoming messages containing a status report > - the server streams status reports to each connected client every second > - in the web browser you get to see the Smalltalk image's clock, memory and process stats > > Tested and approved on 2.0 #281. Portability to 1.3 and 1.4 should be OK. > > The implementation of Zinc WebSockets was made possible in part through financial backing by Andy Burnett of Knowinnovation Inc. and ESUG. Thanks! > > Questions, remarks, feedback ? Please use the Pharo Smalltalk mailing lists. > > Sven > > -- > Sven Van Caekenberghe > http://stfx.eu > Smalltalk is the Red Pill > > > > |
In reply to this post by Sven Van Caekenberghe-2
Hi Sven,
Great! Thank you very much and supporters too. I'm currently doing some experiments with it and XULRunner. I want to report one problem... if I do in workspace: s := ZnServer startOn: 1701. s logToTranscript. s delegate map: 'ws-test' to: [ :request | ZnResponse ok: (ZnEntity html: ZnWebSocketEchoHandler clientHtmlRemote) ]; map: 'ws-test-local' to: [ :request | ZnResponse ok: (ZnEntity html: ZnWebSocketEchoHandler clientHtml) ]; map: 'ws-echo' to: (ZnWebSocketDelegate map: 'ws-echo' to: ZnWebSocketEchoHandler new); map: 'ws-chatroom-client' to: [ :request | ZnResponse ok: (ZnEntity html: ZnWebSocketChatroomHandler clientHtml) ]; map: 'ws-chatroom' to: (ZnWebSocketDelegate map: 'ws-chatroom' to: ZnWebSocketChatroomHandler new). "s stopDefault." and then if I open a socket and save the image (without closing of the socket), the image hangs. It is saved but it hangs during the wake-up. -- Pavel On Wed, Sep 12, 2012 at 10:29 PM, Sven Van Caekenberghe <[hidden email]> wrote: > Hi, > > I am pleased to announce the first public release of Zinc WebSockets, an implementation of client and server RFC 6455 regular (ws://) and secure (wss://) WebSockets on top of Zinc HTTP Components and Zodiac TLS/SSL Streams. > > High level documentation can be found here: > > https://github.com/svenvc/docs/blob/master/zinc/zinc-websockets-paper.md > > The code can be found in the regular Zinc repositories, or can be loaded using Metacello: > > ConfigurationOfZincHTTPComponents project latestVersion load: 'WebSocket'. > > Three examples are included and explained in the high level documentation: > > 1. a trivial echo service > > - each incoming message is simply echoed back to the client > > 2. a simple chatroom > > - each client opens a web socket to the chatroom service running on the server > - the server keeps track of all connected client web sockets > - when a message comes in from any client it is distributed to all clients > - each client shows all incoming messages > > 3. a simple, continously updated status view > > - a client connects and listens for incoming messages containing a status report > - the server streams status reports to each connected client every second > - in the web browser you get to see the Smalltalk image's clock, memory and process stats > > Tested and approved on 2.0 #281. Portability to 1.3 and 1.4 should be OK. > > The implementation of Zinc WebSockets was made possible in part through financial backing by Andy Burnett of Knowinnovation Inc. and ESUG. Thanks! > > Questions, remarks, feedback ? Please use the Pharo Smalltalk mailing lists. > > Sven > > -- > Sven Van Caekenberghe > http://stfx.eu > Smalltalk is the Red Pill > > > > |
Thanks for trying and for giving feedback, Pavel.
A live, connected socket cannot survive an image save, I think. A listening server can, because it is stopped and restarted. But it shouldn't hang the image, of course. I will try to debug this later on and come back to you. I guess that you are on Linux, right ? Sven On 12 Sep 2012, at 22:51, Pavel Krivanek <[hidden email]> wrote: > Hi Sven, > > Great! Thank you very much and supporters too. I'm currently doing > some experiments with it and XULRunner. I want to report one > problem... if I do in workspace: > > s := ZnServer startOn: 1701. > s logToTranscript. > s delegate > map: 'ws-test' > to: [ :request | ZnResponse ok: (ZnEntity html: > ZnWebSocketEchoHandler clientHtmlRemote) ]; > map: 'ws-test-local' > to: [ :request | ZnResponse ok: (ZnEntity html: > ZnWebSocketEchoHandler clientHtml) ]; > map: 'ws-echo' > to: (ZnWebSocketDelegate map: 'ws-echo' to: ZnWebSocketEchoHandler new); > map: 'ws-chatroom-client' > to: [ :request | ZnResponse ok: (ZnEntity html: > ZnWebSocketChatroomHandler clientHtml) ]; > map: 'ws-chatroom' > to: (ZnWebSocketDelegate map: 'ws-chatroom' to: > ZnWebSocketChatroomHandler new). > "s stopDefault." > > and then if I open a socket and save the image (without closing of the > socket), the image hangs. It is saved but it hangs during the wake-up. > > -- Pavel > > > On Wed, Sep 12, 2012 at 10:29 PM, Sven Van Caekenberghe <[hidden email]> wrote: >> Hi, >> >> I am pleased to announce the first public release of Zinc WebSockets, an implementation of client and server RFC 6455 regular (ws://) and secure (wss://) WebSockets on top of Zinc HTTP Components and Zodiac TLS/SSL Streams. >> >> High level documentation can be found here: >> >> https://github.com/svenvc/docs/blob/master/zinc/zinc-websockets-paper.md >> >> The code can be found in the regular Zinc repositories, or can be loaded using Metacello: >> >> ConfigurationOfZincHTTPComponents project latestVersion load: 'WebSocket'. >> >> Three examples are included and explained in the high level documentation: >> >> 1. a trivial echo service >> >> - each incoming message is simply echoed back to the client >> >> 2. a simple chatroom >> >> - each client opens a web socket to the chatroom service running on the server >> - the server keeps track of all connected client web sockets >> - when a message comes in from any client it is distributed to all clients >> - each client shows all incoming messages >> >> 3. a simple, continously updated status view >> >> - a client connects and listens for incoming messages containing a status report >> - the server streams status reports to each connected client every second >> - in the web browser you get to see the Smalltalk image's clock, memory and process stats >> >> Tested and approved on 2.0 #281. Portability to 1.3 and 1.4 should be OK. >> >> The implementation of Zinc WebSockets was made possible in part through financial backing by Andy Burnett of Knowinnovation Inc. and ESUG. Thanks! >> >> Questions, remarks, feedback ? Please use the Pharo Smalltalk mailing lists. >> >> Sven >> >> -- >> Sven Van Caekenberghe >> http://stfx.eu >> Smalltalk is the Red Pill >> >> >> >> > |
In reply to this post by Sven Van Caekenberghe-2
Cool stuff!
2012/9/12 Sven Van Caekenberghe <[hidden email]> Hi, |
In reply to this post by Sven Van Caekenberghe-2
On Wed, Sep 12, 2012 at 2:45 PM, Sven Van Caekenberghe <[hidden email]> wrote:
> Thanks for trying and for giving feedback, Pavel. > > A live, connected socket cannot survive an image save, I think. ... > Sven I could have sworn there was code in the guts of the save/start code that could tell if the image was resuming from a cold start, or from a 'save but don't quite' start. If this still exists, then you could just leave the connection open during save, and if just doing a save, let it stay open (thus surviving the save), but from a cold start close/remove the socket, since it is definitely no longer around. Sorry for the vagueness. -Chris |
In reply to this post by Sven Van Caekenberghe-2
On Wed, Sep 12, 2012 at 11:45 PM, Sven Van Caekenberghe <[hidden email]> wrote:
> Thanks for trying and for giving feedback, Pavel. > > A live, connected socket cannot survive an image save, I think. > A listening server can, because it is stopped and restarted. > But it shouldn't hang the image, of course. > I will try to debug this later on and come back to you. > I guess that you are on Linux, right ? Yes, Linux. The same on CogVM and StackVM. -- Pavel > > Sven > > On 12 Sep 2012, at 22:51, Pavel Krivanek <[hidden email]> wrote: > >> Hi Sven, >> >> Great! Thank you very much and supporters too. I'm currently doing >> some experiments with it and XULRunner. I want to report one >> problem... if I do in workspace: >> >> s := ZnServer startOn: 1701. >> s logToTranscript. >> s delegate >> map: 'ws-test' >> to: [ :request | ZnResponse ok: (ZnEntity html: >> ZnWebSocketEchoHandler clientHtmlRemote) ]; >> map: 'ws-test-local' >> to: [ :request | ZnResponse ok: (ZnEntity html: >> ZnWebSocketEchoHandler clientHtml) ]; >> map: 'ws-echo' >> to: (ZnWebSocketDelegate map: 'ws-echo' to: ZnWebSocketEchoHandler new); >> map: 'ws-chatroom-client' >> to: [ :request | ZnResponse ok: (ZnEntity html: >> ZnWebSocketChatroomHandler clientHtml) ]; >> map: 'ws-chatroom' >> to: (ZnWebSocketDelegate map: 'ws-chatroom' to: >> ZnWebSocketChatroomHandler new). >> "s stopDefault." >> >> and then if I open a socket and save the image (without closing of the >> socket), the image hangs. It is saved but it hangs during the wake-up. >> >> -- Pavel >> >> >> On Wed, Sep 12, 2012 at 10:29 PM, Sven Van Caekenberghe <[hidden email]> wrote: >>> Hi, >>> >>> I am pleased to announce the first public release of Zinc WebSockets, an implementation of client and server RFC 6455 regular (ws://) and secure (wss://) WebSockets on top of Zinc HTTP Components and Zodiac TLS/SSL Streams. >>> >>> High level documentation can be found here: >>> >>> https://github.com/svenvc/docs/blob/master/zinc/zinc-websockets-paper.md >>> >>> The code can be found in the regular Zinc repositories, or can be loaded using Metacello: >>> >>> ConfigurationOfZincHTTPComponents project latestVersion load: 'WebSocket'. >>> >>> Three examples are included and explained in the high level documentation: >>> >>> 1. a trivial echo service >>> >>> - each incoming message is simply echoed back to the client >>> >>> 2. a simple chatroom >>> >>> - each client opens a web socket to the chatroom service running on the server >>> - the server keeps track of all connected client web sockets >>> - when a message comes in from any client it is distributed to all clients >>> - each client shows all incoming messages >>> >>> 3. a simple, continously updated status view >>> >>> - a client connects and listens for incoming messages containing a status report >>> - the server streams status reports to each connected client every second >>> - in the web browser you get to see the Smalltalk image's clock, memory and process stats >>> >>> Tested and approved on 2.0 #281. Portability to 1.3 and 1.4 should be OK. >>> >>> The implementation of Zinc WebSockets was made possible in part through financial backing by Andy Burnett of Knowinnovation Inc. and ESUG. Thanks! >>> >>> Questions, remarks, feedback ? Please use the Pharo Smalltalk mailing lists. >>> >>> Sven >>> >>> -- >>> Sven Van Caekenberghe >>> http://stfx.eu >>> Smalltalk is the Red Pill >>> >>> >>> >>> >> > > |
In reply to this post by cbc
Chris,
On 13 Sep 2012, at 01:32, Chris Cunningham <[hidden email]> wrote: > I could have sworn there was code in the guts of the save/start code > that could tell if the image was resuming from a cold start, or from a > 'save but don't quite' start. If this still exists, then you could > just leave the connection open during save, and if just doing a save, > let it stay open (thus surviving the save), but from a cold start > close/remove the socket, since it is definitely no longer around. > > Sorry for the vagueness. Yes, there are indeed, #shutDown: quiting and #startUp: resuming Thanks for the pointer, I am studing how I can integrate this better in Zn. Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill |
Free forum by Nabble | Edit this page |