Design 
Beyond the architecture presented here, that section digs into the next level of abstraction: the components (see C4 Modeling - Component Definition). switstack moka
uses 3 types of components that collaborate to process an EMV card:
- A Message broker;
- A set of Services;
- A set of Libraries;
Message Broker
The message broker is the cornerstone of switstack moka
. It doesn't implement any business logic. It allows to de-couple the services, and enables the implementation of complex physisal architectures. It roles is to manage the registration of services, and foward messages from one service to another. There is no queue management because the card processing doesn't require concurrent threading.
Services
A service is a compilable unit that provides a functional solution to a business problem. It exposes a set functions to other services to perform generic, and specific operations.
Service | Description | Purpose |
---|---|---|
GLASe | Implements GLA specifications | To provide an abstraction for EMV Level 2 implementations to enable certification, test automation, and integration. |
entry-point | Implements EMVCo Books A and B. | |
mastercard | Implements Mastercard specifications. | a.k.a. Mastercard contactless kernel. |
visa | Implements Visa specifications . | a.k.a. Visa contactless kernel. |
amex | Implements American Express specifications. | a.k.a. Amex contactless kernel. |
discover | Implements Discover specifications. | a.k.a. DPAS kernel. |
hsm | Implements a CAPK container. | To store CAPK required for EMV card processing. |
logger | Implements logging routines for specialized EMV tags/bitmaps. | To produce machine readable logs used to analyze and replay transactions. |
reader | Implements the coupling with payment cards. | To capture card's information. Includes a SRED module to protect sentitive data at the source. |
manager | Implements a set of primitives to setup the message broker. | To encapsulte complexity of the message broker. |
(see also Services for more details).
Libraries
A library is a compilable unit that provides tools to help developpers to realise services.
Library | Description | Purpose |
---|---|---|
hal | Exposes a generic platform API | To keep switstack moka 's services independent from terminals' firmware. |
util | Packages a series of libraries: TLV parser, conversion routines, EMV toolbox, etc... | To facilitate the implementation of EMV card processing logics. |