Speaker Topics - No Fluff Just Stuff

Transit: Data Made Simple

Transit is a format and set of libraries for conveying values between applications written in different programming languages. The key objectives of Transit are to support:

  • context-free interpretation
  • generic extensibility
  • good performance (including web browsers)

Context-Free Interpretation

Data often requires context for interpretation, which can lead to brittle programs. The context can be in a programmer's head, e.g. “Values under the beginAt key are strings that need to be converted into dates”, or the context can be encoded into a schema, shipped either with the data or via a separate channel.

Such context increases the burden on programs that would consume data. Moreover, this burden worsens substantially in large, dynamic systems. Intermediate processing steps cannot be written generically, because they must know not just 1 but N (or NxM) different contexts.

Transit provides a rich set of values that can be understood without additional context or schemas.

Generic Extensibility

Users need their own data types. If a data framework is not extensible, these data types will have to be determined via context, undermining the benefits established above.

Transit provides generic extensibility:

  • New types are defined in terms of existing types.
  • Transit implementations can generically handle types whose definitions they have not seen.

The latter property is particularly important, because it allows you to evolve “smarter” processes without breaking “dumber” processes that are already part of a working system.

Good Performance, Including Web Browsers

Web browsers provide optimized support for reading and writing JSON, and any data encoding that needs to reach the browser will inevitably be compared to JSON, both for convenience and performance.

Transit achieves performance (and facilitates new implementations) by building on top of existing, optimized formats: JSON and MessagePack. In fact, Transit's caching means that Transit can be faster than JSON, even when calling the JSON parser internally.


About Stuart Halloway

Stuart Halloway is a founder and President of Cognitect, Inc. (www.cognitect.com). He is a Clojure committer, and a developer of the Datomic database.

Stuart has spoken at a variety of industry events, including StrangeLoop, Clojure/conj, EuroClojure, ClojureWest, SpeakerConf, QCon, GOTO, OSCON, RailsConf, RubyConf, JavaOne, and NFJS.

Stuart has written a number of books and technical articles. Of these, he is most proud of Programming Clojure.

Learn more about Stu's presentations on his wiki.

More About Stuart »