/cedarbridge

Cedarbridge message protocol specification language

Primary LanguageJavaISC LicenseISC

cedarbridge

Maven Central Maven Central (snapshot) Codecov Java Version

com.io7m.cedarbridge

JVM Platform Status
OpenJDK (Temurin) Current Linux Build (OpenJDK (Temurin) Current, Linux)
OpenJDK (Temurin) LTS Linux Build (OpenJDK (Temurin) LTS, Linux)
OpenJDK (Temurin) Current Windows Build (OpenJDK (Temurin) Current, Windows)
OpenJDK (Temurin) LTS Windows Build (OpenJDK (Temurin) LTS, Windows)

cedarbridge

The cedarbridge package implements an efficient, strongly-typed, platform-independent, binary message protocol language based around sum and product types, and strong versioning.

[documentation ChatCommandJoin "Join the chat room."]
[record ChatCommandJoin
  [field name cb:String]
  [documentation name "The username with which to join."]]

[documentation Chat "The chat protocol."]
[protocol Chat
  [version 1
    [types-added
      ChatCommandJoin
      ChatCommandSpeak
      ChatEventJoined
      ChatEventLeft
      ChatEventSpoke
      ChatEventError]]]

...

Features

  • A carefully written language specification.
  • A minimal data definition language based on algebraic sum and product types.
  • Strong versioning as a core aspect of the language.
  • A small, easily auditable codebase with a heavy use of modularity for correctness.
  • Generates simple, readable, reflection-free Java code.
  • A small footprint; the generated Java code consists of trivial record definitions and incredibly simple and straightforward code to serialize and deserialize values.
  • Platform independence. No platform-dependent code is included in any form.
  • Suitable for use in security-critical environments: Serialization code is immune to the usual serialization vulnerabilities such as type confusion, resource exhaustion, exponential parse times, and etc.
  • An extensive automated test suite with high coverage.
  • OSGi-ready.
  • JPMS-ready.
  • ISC license.

Usage

See the documentation and language specification.