Skip to content

Type fields in proto messages - #51

Closed
EP-u-NW wants to merge 3 commits into
nalim2:devfrom
EP-u-NW:master
Closed

Type fields in proto messages#51
EP-u-NW wants to merge 3 commits into
nalim2:devfrom
EP-u-NW:master

Conversation

@EP-u-NW

@EP-u-NW EP-u-NW commented Sep 21, 2020

Copy link
Copy Markdown
Contributor

This PR discusses some changes about the proto definitions in SFSC.
Since all proposals target the proto files and therefor only internal behaviour, these changes should not affect end users.

  1. Enforce strong type system:
    Motivation behind this is, that in constrained static environments (like microcontrollers), it might be usefull to define compile time size limits on various proto fields. For example, all current SFSC implementations use 128 bit uuids as service, core and adapter ids. A constrained environment might limit all id fields to this size. In order to make that limiting consistent, a stronger typisation is usefull.
    Stronger typsation also serves as additional documentation.
    This PR proposes a Id , MessageType and Topic proto message. Besides this new message types, the data field of RegistryEntry is typed to SfscServiceDescriptor. Also the oneof field of CommandRequest and QueryReply gets typed, see below.

  2. Changes to CommandRequest and QueryReply:
    The oneof create_or_delete (and created_or_deleted_or_expired_or_future respectively) should be typed. To create a service, a SfscServiceDescriptor is necessary, to delete one, the serviceId is sufficient.
    Also the fields of the oneof are renamed, since delete is a keyword in some languages (like C++).

  3. HeartbeatMessage
    The id field is renamed (and typed) to adapter_id (to make it more obvious what kind of id this is).

@EP-u-NW

EP-u-NW commented Oct 14, 2020

Copy link
Copy Markdown
Contributor Author

Moved to #54

@EP-u-NW EP-u-NW closed this Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants