Universal Binary FormatA programming language for transporting and describing complex data structures across a network (aka marshalling).
It has three components:
- UBF(A) is a data transport format, roughly equivalent to well-formed XML.
- UBF(B) is a programming langauge for describing types in UBF(A) and protocols between clients and servers. UBF(B) is roughly equivalent to to Verified XML, XML-schemas, SOAP and WDSL.
- UBF(C) is a meta-level protocol between used between UBF servers.
While the XML series of languages had the goal of having a human readable format the UBF languages take the opposite view and provide a "machine friendly" format.
UBF is designed to be "language neutral" - UBF(A) defines a language neutral binary format for transporting data across a network. UBF(B) is a type system for describing client/server interactions which use UBF(A).
Programming by Contract
Central to UBF is the idea of a "contract" which regulates the set of legal conversations that can take place between a client and a server.
A software component (the contract checker) is place between a client and server which checks that all interactions between thew client and server are legal.
- UBF homepage.
- Joe Armstrong SICS home page, its author.
- White paper excerpt:
What is the relationship between UBF and XML?
Both UBF and XML have similar goals and similar structure. XML has a supposedly human friendly syntax and is supposed to be self describing. UBF is programmer friendly and is designed to be efficient and easy to implement.
Why is UBF parsing efficient
UBF(A) terms are actually little programs which the decoder executes. When reconstructing a UBF(A) term the decoder just executes the program. No grammar checking or parsing is actually involved.
UBF(A) encoded terms are also much more compact than the equivalent XML terms. Since parsing an import stream involves looking at every character on the input UBF parsing is intrinsically much more efficient than XML parsing. A UBF(A) encoder can also make intelligent use of the caching optimization to further improve efficiency.