Professional Documents
Culture Documents
Zafar Gilani
Muhammad Adnan Khan
Hui Shang
Outline
Overview
Comparison
Specification
SASL profile and usage
References
Overview
Overview
Avro uses JSON for Interface Description
Language (IDL).
To specify data types.
To specify protocols.
Overview
Avro relies on schemas.
Schema stored with data.
Each datum written with no per-value overheads.
Thus serialization is fast and small.
Avro in RPC:
Schema exchange during client-server handshake.
Correspondence in fields can be easily resolved.
APIs
Supporting API for:
Java
C
C++
C#
Python
Ruby
Google protobuf
Thrift
Implementation
Hmm..
Cleaner
Hmm..
Error handling
Complex
Simple
OK
Extensibility
Hmm..
Richer
OK
Compatibility
Specification
Schema represented in one of:
JSON string, naming a defined type.
JSON object of the form:
{"type": "typeName" ...attributes...}
JSON array
"messages": {
"hello": {
"doc": "Say hello.",
"request": [{"name": "greeting", "type": "Greeting" }],
"response": "Greeting",
"errors": ["Curse"]
}
}
}
SASL profile
Simple Authentication and Security Layer.
Provides a framework for
Authentication.
Security of network protocols.
SASL usage
Negotiation procedure to use connectionoriented Avro RPC:
0: START Used in a client's initial message.
1: CONTINUE Used while negotiation is
ongoing.
2: FAIL Terminates negotiation unsuccessfully.
3: COMPLETE Terminates negotiation
sucessfully.
References
1. Apache Avro,
http://avro.apache.org/docs/current/
2. Google protocol buffers vs Apache Avro,
http://www.sammur.com/?p=36
3. Avro vs Thrift,
http://tech.puredanger.com/2011/05/27/serializ
ation-comparison/
4. SASL,
http://avro.apache.org/docs/current/sasl.html
Apache Avro
Zafar Gilani
Muhammad Adnan Khan
Hui Shang