To illustrate an advanced implementation of the Keyple Java middleware for Calypso-based ticketing systems, CNA has released Keyple Demo Ticketing, a complete ticketing demonstrator, under the 3-Clause BSD License.
It covers the lifecycle of a contactless transit ticket: personalization of the card, sale and loading of the tickets (season pass, multi-trip ticket), access validation, and ticket inspection.
Keyple integration patterns
Each component of the demonstrator illustrates a way of integrating Keyple in a ticketing system, with its own optimization targets.
| Component | Keyple integration | Optimization targets |
|---|---|---|
| Sales | Distributed application. The server, based on Keyple, holds the ticketing logic and the SAM. The light clients give access to the card, with or without Keyple (Keyple Interop libraries, Server JSON API). | Few network messages between client and server. Client on any light terminal, without Keyple. |
| Validation and Inspection | Standalone Android applications based on Keyple, with the card and the SAM read locally. Inspection also works without a SAM (card authenticated by PKI, or read without authentication). | Few card and SAM commands during the transaction. |
| Common | Library of the data model of the card. | — |
Supported cards
- Calypso cards: the demonstrator works with the generic Calypso application of the CNA test kit cards.
- Storage cards (MIFARE Ultralight, ST25 SRT512, MIFARE Classic 1K): handled by the Android applications with the CNA storage card libraries, reserved for CNA members.
The cards and terminals supported by each application are detailed in the functional documentation of the demonstrator.
Getting the demonstrator
- Source code: the keyple-demo-ticketing repository, whose README describes the components, the supported terminals and platforms, and how to build and install them.
- Applications: attached to each release of the repository (see the latest release).
- Functional documentation: attached as PDF and HTML files to each release (see the latest release). It describes the use cases, the business rules, and the messages of the demonstrator, as well as the data model of the card and the procedures executed on it.
Some components depend on libraries that are not publicly available: without them, the demonstrator is built with mocks (see the README).
- Bluebird and Arrive terminals: the plugins are open source (see Keyple reader extensions), and are built with the native library of the terminal manufacturer. Without them, these terminals are not available.
- Storage cards: the CNA libraries are reserved for CNA members, and available on request. Without them, the storage cards are not handled.