You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now JSTP works only with one JSON5 like serialization format. While it would be much more extendable use abstract interface that provides such functions as:
parse()
serialize()
parseNetworkPacket()
serializeNetworkPacket()
This way will be able to add new formats, for example JSON or some binary format.
The text was updated successfully, but these errors were encountered:
Great suggestion. We'll still use "Record Serialization"/JSON5 syntax for custom DSLs like metadata, IDLs and stuff, but using pluggable serialization formats for protocol messages certainly gives us benefits.
When we'll send arrays with pure data only, and metadata being separated, there'll be nearly no difference in using our format or JSON. Except performance. A custom parser of JSON5-like format that only uses public V8 APIs is very unlikely to ever be even as fast as JSON, not to mention faster.
It will also be possible to use JSRS/JSON5 or JSON during development and a binary format for production mode and gain even more performance without sacrificing human-readable messages format when we need it.
Having much faster message parsing and serialization can highly increase overall protocol performance.
And if we are talking about V8 and Node, it is close to impossible to get parsing/serialization speed similar to that of JSON methods, because they are highly optimized and are deeply embedded into V8 internal structure.
Not to mention the fact that almost every modern programming language has an optimized JSON implementation in standard libraries, which means that it can simplify creation of any new JSTP implementations.
Agree. We will have separated features divided by fixed interfaces: parser, transport, rpc, storage. So different implementations may be used in any combination.
Now JSTP works only with one
JSON5
like serialization format. While it would be much more extendable use abstract interface that provides such functions as:parse()
serialize()
parseNetworkPacket()
serializeNetworkPacket()
This way will be able to add new formats, for example
JSON
or some binary format.The text was updated successfully, but these errors were encountered: