home industries $releases designs hoff.kitchen metapages

libmup

Reference implementation library of the M.A.R-T>Y. Micro Protocol for small-ish networked systems.

Quality Status: Gold Master

Functionality Status: Iterative

License: BSD 3-Clause

Download for your language(s) at bottom of the page.

libmup is an endpoint-based RPC framework for small-ish interlinked systems providing serialization, request/response, variadic payloads, heartbeat messages and optional CRC32 routines in various languages.

For compatibility and portability this library does not use any dynamically allocated memory.

M.A.R-T>Y. Micro Protocol (MuP) shares similarities to its bigger brother UNIX host-based RPC protocol but with a more basic and rigid structure. There are a variety of message types, but the request type 'SEND' still allows hitting endpoints with a variable payload count. To learn more about the M.A.R-T>Y. Micro Protocol read the definition document here.

This library does not do everything for you. It handles the boring stuff (putting bytes in a line and taking them out, error detection, definitions for endpoints and request/response, emitting events, etc.) but your application actually has to make use of them. In this way you can pick and choose the level of functionality; you don't have to use/handle everything if it's unecessary.

libmup provides:

libmup does NOT provide (i.e. left to the application designer):

*if a sonar ping is received the event processor will automatically serialize a reply, but your event handler must transmit it.
**the event processor will automatically serialize these, but your event handler must transmit if you desire.
***the event processor will emit a corruption event, and a 'BAD' type message will be automatically serialized. Your event handler must transmit it, then the connection partner must handle and re-transmit.

Usage Notes

Pro Tips

Download the libraries for the language(s) you want to use: