Instead of converting to and from lists, everything is now handled in binary.
Websocket parsing now in binary.
(Given the frame format change in hixie-draft-01, it will also be better for the new frame parsing)
first of all thank you very much for this request.
only thing is, i am not keen towards using binary instead of lists. according to my benchmarks, the use of binary [for instance using the http_bin option] does not improve the overall misultin performance, and thus is a premature optimization. do you happen to have different results?
i do understand this might bring a slight speed improvement after websockets are created, however this comes with the cost of reducing code usability of misultin. moreover, all the rest of misultin should be fully switched to binary too, since i do not like to have two different programming styles in the same library: here we would need to use binary for websockets, and lists/io_lists for the other http functionalities.
do you happen to have different considerations which i may have missed, test results, or anything else? let's discuss about it :)
I understand your points very well. I wrote the code this way because my application produces binaries, et sends binaries over the wire. So it made sense for me.
Also binaries are better memory-wise than speed-wise compared to lists, so in a high traffic environment you might get more connections on the same memory footprint. I don't have data backing that up though.
Finally, with the upcoming draft-hixie-01 which changes totally the framing protocol, it will be easy – from my past experience to do that in binaries — on a less professional standpoint, I like binaries a lot ;)
So it's up to you, I understand both sides of the discussion !
In any case, thanks for the misultin websocket code, it was immensely useful.
good point about memory usage, i would definitely be interested in seeing data on this - maybe we should dig more? i like binaries a lot as well, small, fast and efficient. i tend to develop bad allergies when i see things such as xml. :)
i'd rather stick to lists right now, but your points are well-taken, and i can only thank you for this. we'll see how it all evolves, too many weird 'reinvent-the-wheel' protocol drafts in websockets, imho.
again, thank you, cheers,
Regarding performance, I hope I can get Tsung to support websockets and run all the tests we need.
well, you are in the right place with the right tools :D
That's part of the plan ;)
currently added in 0.8-dev. thank you :)