Hacker News new | past | comments | ask | show | jobs | submit login

They (and similar technologies) are used where it matters.

Games, data visualization, ... numerically heavy applications mainly.

On a side-note; JSON has been somewhat of a curse. The developer ergonomics of it are so good, that web devs completely disregard how they should layout their data. You know, sending a table as a bunch of nested arrays, that sort of thing. Yuck.

In web apps, data is essentially unusable until it has been unmarshalled. Fine for small things, horrible for data-heavy apps, which really so many apps are now.

Sometimes I wonder if it will change. I'm optimistic that the popularity of mem-efficient formats like this will establish a new base paradigm of data transfer, and be adopted broadly on the web.




> web devs completely disregard how they should layout their data

How should data be laid out?


imho, a few suggestions:

wrt numerical data

See if domain allows for more constraint typing (e.g. ints as actual ints). Will push devs naturally to binary formats.

Consider column orientation layout. This will also help with more advanced compression (e.g. delta encoding).

When sticking with JSON, avoid large nested hierarchies that would spam the heap when unmarchalling (ie. prefer [1,2,4,5] over [[1,2],[4,5]].

In general, for large payloads, see if you can avoid deserialization of the payload altogether, and just scan through it. Often times the program just ends up copying values from one place (the file) to another (buffer; DOM-objects), so there's really no need to create to allocate the entire data in heap as many individual objects. That's a hit the user will always feel twice: once at parse (freezing), once at garbage-collection (framerate hickups). You could technically do that with stream parsing of JSON, but then you need special libraries anyway. And once moving to stream-based parsing, you may as well choose a format which has a lot of other advantages as well (e.g. rich type system, column-layouts).

wrt text

It matters less (?). Nonetheless, scannable formats are good here too (e.g. the whole reason we e.g. have line delimited json, to bypass JSONs main limitation).

These are just some general workable ideas. ymmv, ianal, etc..




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: