A new protocol for sending files over websockets

Today I’m happy to make public the work I’ve been doing to make some kind of “standard” for sending files over websockets. I call it GalileoSend because it was created for the Galileo CMS.

The protocol itself is language independent for both the client and server side, assuming that both can open a websocket connection and send JSON (as text) and binary data over it. Since communication by websocket is cheap, 2-way communication is highly encouraged throughout the transfer and positive confirmation of receipt is required.

Further, I have written a javascript client-side implementation (which could be used for any server) and a non-blocking Mojolicious server-side implemenation (which could be used for any client).

Read on (examples!) …

See what they look like together:

Events are fired on both side for most of the important occurances. And the end result is nice and clean.

It still needs some polish. The Mojolicious plugin still needs tests and documentation, but I expect this to hit CPAN soon.

Finally I hope that the GalileoSend spec will be useful. I have found other websocket uploaders but most depend on the server implementation (usually node.js, example). I wrote it with that hope in mind.

Please comment, contribute, use etc!

Leave a comment

About Joel Berger

user-pic As I delve into the deeper Perl magic I like to share what I can.