Skip to content

Enhance the protocol version management #1

@ejpcmac

Description

@ejpcmac

Currently, both the ERCP suite and ERCP Basic are at version 0.1.0, and there is no other version than this one. Thinking a bit more about the version management, two issues-to-be have come to my mind.

Implementations supporting multiple versions

ERCP Basic defines a Protocol() command, which reply is the implemented version, major, minor, patch. Well, this is good when the implementation supports only one backward-compatible version.

For instance, a device implementing ERCP Basic 0.1.1 could talk to one implementing ERCP Basic 0.1.0, using only the 0.1.0 susbset. Conversely, a device implementing ERCP Basic 0.1.0 knows it can talk to a device implementing 0.1.1 because it is backward-compatible.

However, a device implementing both ERCP Basic 0.1.0 and ERCP Basic 0.2.0 would currently be able to advertise only one version. Devices implementing a version which is not backward-compatible with the advertised one could not communicate with our multi-version-capable device.

Possible change

To enable devices to advertise multiple backward-incompatible versions, we could extand the Protocol() command with an optional parameter. This parameter could for instance be:

  • 0x00: Get the last oldest backward-compatible version (e.g. 0.1.1)
  • 0x01: Get the lastest version (e.g. 1.0.1)
  • 0xFF: Get the list of all backward-compatible versions* (e.g. 0.1.1, 0.2.0, 0.3.2, 1.0.1)

* This one would require to update the Protocol_Reply(major, minor, patch) to accept a list instead of only one version.

Handling different protocols

The ERCP suite is meant to contain other protocols than ERCP Basic. Currently, the version of the suite matches the one of ERCP Basic, but we could imagine an ERCP suite 0.2.0 introducing the first version of ERCP Advanced while ERCP Basic would remain at 0.1.1, for instance.

Possible change

To handle this properly, the versions should be advertised for each protocol. New suite releases would include one or several protocol updates, like Erlang/OTP does for its applications. To help finding a given version of a given protocol, a tag may be added in addition to the one denoting the version of the suite. For instance, for now we would have v0.1.0 and ercp_basic-0.1.0.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions