Examples of creating GTFS-rt from existing systems

There are several common methods of creating GTFS-rt from an existing system that does not support it out of the box. They typically depend on a system exposing good data, hopefully with trip assignment provided. This post outlines those methods and points to examples of implementation.

Continue reading “Examples of creating GTFS-rt from existing systems”

Mommy, what’s a Protobuf?

A question that continually pops up when someone learns that GTFS-Realtime is intended to be formatted as Protocol Buffers (or Protobuf) is, understandably, “why?”

The documentation does little to answer this question for laypeople.

“Protocol buffers are a language- and platform-neutral mechanism for serializing structured data (think XML, but smaller, faster, and simpler). The data structure is defined in a gtfs-realtime.proto file, which then is used to generate source code to easily read and write your structured data from and to a variety of data streams, using a variety of languages – e.g. Java, C++ or Python.”

What does that mean? Why not JSON (which is smaller, faster and simpler than XML)? I’ve heard a number of complaints that Protobuf is something along the lines of “entirely unnecessary.” But it’s not— it serves a purpose.

In short, Protobuf is designed to be:
* efficiently generated,
* efficiently transferred,
* efficiently processed (machine readable), and
* unambiguously understood by programs written in many languages.

Continue reading “Mommy, what’s a Protobuf?”