Re:Show HN: A Unixy approach to WebSockets
by nine_k on Saturday February 14, 2015 @08:58PM
(#9051532)
If there was a non-ideal but reasonable standard serialization format, like maybe IFF [1] or BSON [2], it would still simplify things, and common tools like `cat` might support decoding them.
It would be easy to wrap an arbitrary other packed format inside a binary string, or an arbitrary text format inside a text string.
IFF is quite successful in certain areas, BTW.
[1]: http://en.wikipedia.org/wiki/Interchange_File_Format [2]: http://en.wikipedia.org/wiki/BSON
Re:Show HN: A Unixy approach to WebSockets
by tracker1 on Sunday February 15, 2015 @05:48AM
(#9052301)
You could always pass a message per line (so to speak) and use msgpack or json... if you want compression you could use json+gz
Of course, you could also do something similar with a 0mq adapter as well for a request/response server, which is available pretty much everywhere you might need it (language wise)... It's an interesting generic interface... however as I mostly use node for newer development, it's so trivial to use sockets or websockets directly for this, I'd just assume go that route... or for that matter, something like sockjs/shoe.
That's fine for personal use, or in a single project, but doesn't scale like "dumb" text does.