Is there a means to use Avro on the client side through javascript and REST or RPC or websocket?
If so, with with js library?
We think Avro is the best choice for a number of reasons: It has a direct mapping to and from JSON. It has a very compact format. The bulk of JSON, repeating every field name with every single record, is what makes JSON inefficient for high-volume usage.
Apache Avro is especially useful while dealing with big data. It offers data serialization in binary as well as JSON format which can be used as per the use case. The Avro serialization process is faster, and it's space efficient as well.
Avro is an open source project that provides data serialization and data exchange services for Apache Hadoop.
avsc a pure JavaScript implementation of the Avro specification and it might be the solution you are looking for.
avsc is compatible with all versions of node.js since 0.11 and major browsers via browserify (see the full compatibility table here). For convenience, you can also find compiled distributions with the releases (but please host your own copy).
I did a small lab and shared my experimental coding with avsc in a github repo: avro-rest-js, in this demo project there are examples of both client-side and server-side-rest-API in javascript exchanging avro buffers in request/response.
An example of use of avsc for RPC websocket look at https://github.com/mtth/verdon a sample Avro remote logging service running behind a WebSocket server and a corresponding client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With