Posts

Showing posts with the label homogeneous

JSONH New schema Argument

The freaking fast and bandwidth saver JSONH Project has finally a new schema argument added at the end of every method in order to make nested Homogeneous Collections automatically " packable ", here an example: var // nested objects b property // have same homogeneous collections // in properties c and d schema = ["b.c", "b.d"], // test case test = [ { // homogeneous collections in c and d b: { c: [ {a: 1}, {a: 2} ], d: [ {a: 3}, {a: 4} ] } }, { a: 1, // same h...

Last Version Of JSON Hpack

Update created github repository with (currently) JavaScript, PHP5 and Python versions. Update after quick chat on twitter with @devongovett who pointed out there is a similar standard called JSONDB I have created a JSONH(Flat) version . It looks slightly faster on mobile so I may opt for this one rather than Array of keys at index 0. The whole array is flat and it changes from [{a:"A"},{a:"B"}] to [1,"a","A","B"] where the empty collection would be [0] rather than [[]] . Also more details here on how to JSONH Hybrid JS Objects . A while ago I proposed a homogeneous collections optimizer nick named JSON.hpack . What I wasn't expecting is that actually different projects and developers adopted this technique to shrink down JSON size. Basic Advantage Of JSON.hpack Gzip and deflate work really good with repeated chunks of strings and this is why homogeneous collections have really good compression ratio there. However, gzip...

Ajax better than Flash AMF? Optimized homogeneous collections

I found this dojo related post extremely interesting and I instantly though in our application we have similar JSON structure which is effectively redundant and, for thousands of database rows, it slows down visualization responsiveness (not that much in intranet, enough via internet). 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...