Watch
2
0
Fork
You've already forked verdant
0
Binary protocol for HTTP endpoint version announcements
  • Java 99.7%
  • CSS 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Raynsford 2b5a86a858
Some checks are pending
main-RHEL10-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL10-x86_64-jdk26 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk26 / Build (push) Waiting to run
Update workflows.
2026-07-31 18:43:00 +01:00
.forgejo Update workflows. 2026-07-31 18:43:00 +01:00
com.io7m.verdant.core Begin next development iteration. 2024-05-11 13:31:29 +00:00
com.io7m.verdant.core.cb Begin next development iteration. 2024-05-11 13:31:29 +00:00
com.io7m.verdant.tests Use junit BOM. 2024-10-20 10:47:52 +00:00
src/site/resources Update site metadata. 2025-08-09 15:07:19 +00:00
.gitignore Update .gitignore. 2024-05-07 16:01:48 +00:00
.gitmodules Move to new organization. 2024-05-01 22:01:53 +00:00
checkstyle-filter.xml Initial version 2022-10-01 17:55:41 +00:00
checkstyle-suppressions-1.0.dtd Initial version 2022-10-01 17:55:41 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:51 +01:00
pom.xml Migrate project. 2026-06-27 10:14:27 +01:00
README-CHANGES.xml Mark release 1.0.1 2024-05-11 13:31:21 +00:00
README-LICENSE.txt Update LICENSE 2023-08-13 21:16:12 +00:00
README.in Migrate project. 2026-06-27 10:14:27 +01:00
README.md Migrate project. 2026-06-27 10:14:27 +01:00

verdant

Maven Central Maven Central (snapshot) Java Version

com.io7m.verdant

verdant

The verdant package provides a binary protocol for advertising HTTP endpoint protocol versions.

Features

  • Written in pure Java 17.
  • OSGi ready.
  • JPMS ready.
  • ISC license.
  • High-coverage automated test suite.

Description

verdant is a trivial protocol for announcing a set of protocols exposed by a set of HTTP endpoints.

A client connecting to a root endpoint reads a binary structure delivered with the content type application/verdant+cedarbridge.

The protocol is specified using the cedarbridge specification language using the canonical binary encoding. Briefly: All values are delivered in big endian byte order. Strings are encoded as a 32-bit unsigned integer representing the number of bytes the string data requires, followed by the UTF-8 encoded bytes of the string. Lists are encoded as a 32-bit unsigned integer representing the number of list elements, followed by the elements of the list.

The structure consists of a sequence of messages, with the first message being a fixed-size version header VContainerVersion specifying the version of the verdant protocol. The one and only defined version, at the time of writing, is version 1.

[record VContainerVersion
  [field version IntegerUnsigned32]
]

In version 1 of the protocol, this message will immediately be followed by a V1ProtocolsSupported message.

[record VProtocolId
  [field msb IntegerUnsigned64]
  [field lsb IntegerUnsigned64]
]

[record VProtocolSupported
  [field id VProtocolId]
  [field versionMajor IntegerUnsigned32]
  [field versionMinor IntegerUnsigned32]
  [field endpointPath String]
]

[record V1ProtocolsSupported
  [field supported [List VProtocolSupported]]
]

Each element of type VProtocolSupported specifies a protocol uniquely identified with a UUID and a major and minor version. Clients can then navigate to the associated endpoint path (relative to the current URL) and can expect to converse using whatever protocol was specified.