Re:Son: A minimal subset of JSON for machine-to-machine comm...
by megous on Sunday December 10, 2017 @02:07PM
(#15892921)
Depends on the way you handle JSON. You don't need to deserialize the entire received JSON string and then walk the node tree, you can walk the string as is. With this, you can process 500MB/s or more of JSON on a single core.
On the other side, you can produce JSON string directly, saving the need to produce some intermediate representation in memory.
You should be able to saturate 10gbit line on a multicore server easilly with this approach.
Re:Son: A minimal subset of JSON for machine-to-machine comm...
by foobarbazetc on Sunday December 10, 2017 @02:01PM
(#15892893)
Our Scala based servers handling thousands of RPS only deal with JSON via Jackson and JSON encode/decode doesn’t even register in profiles.
Re:Son: A minimal subset of JSON for machine-to-machine comm...
by akvadrako on Monday December 11, 2017 @05:23AM
(#15896175)
Agreed; in data-centric apps the JSON parsing time is a major time suck. But sometimes it can be heavily optimised with a good library, like fastjson for Java.
Re:Son: A minimal subset of JSON for machine-to-machine comm...
by always_good on Sunday December 10, 2017 @01:36PM
(#15892748)
Was it a JSON echo server?
We benchmarked one of our apps, written in Go, which uses JSON extensively both for the API and for internal storage, and we found that around 90% of the CPU time is spent serializing and deserializing JSON.
The JSON code itself is a tiny portion of any app, so it's one of those rare optimization cases where a small change can yield significant speed-ups for the entire app.