JSON.hpack
I am developing on spare time an "all web languages" homogeneous collection packer in order to speed up client/server interaction specially for database results where the column name could be considered as a key and each field in the same column as a row.
So far I created a JavaScript version which seems to work perfectly and results are quite impressive. For example, the total size of the 5000 items used in that dojo article switched from 37.23Kb to 26.27Kb, gzipped size, while number of characters to send / retrieve are 776133 against 99575.
As example, the host where I put the initial test does not allow more than 50Kb as uploaded data, this means that without JSON.hpack is not even possible to consider to move 5000 of rows.
The reason it could be faster is that JSON.stringify, the good old Douglas Crockford version, is not that fast as we think ( not comparable with native IE8 JSON.stringify ) and if the given object is smaller, obviously data to parse is less as well.
Here you can test the first JSON.hpack test page.
The project is not hosted yet so to know more about the simple API please read the incomplete (code speaking stable though) source code.
I wonder how many people would be interested in their favorite server side language implementation, I can create the PHP, Python, and C#, but I am looking for Java, Ruby, and if possible other languages as well. The logic truly simple so it is just a matter of time ... anyone fancy to contribute?
Hi, at this point I can't view the sourcecode, is it temporarily? I would like to view the code, to see if I may be able to transform it into JAVA code.
ReplyDeleteThanks,
Remon Oldenbeuving
You are right, I am creating the project tomorrow, sorry for that .. it was a quick post, there is more to say about it ;)
ReplyDeleteHi Remon, sorry I am late.
ReplyDeleteI have opened a github project for this, sources under src/javascript/Regards
... and ... PHP version ;)
ReplyDelete