Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Versioning of all IPC capable elkodon_cal constructs #51

Open
elfenpiff opened this issue Nov 15, 2023 · 2 comments
Open

Versioning of all IPC capable elkodon_cal constructs #51

elfenpiff opened this issue Nov 15, 2023 · 2 comments
Labels
bug Something isn't working enhancement New feature or request invalid This doesn't seem right

Comments

@elfenpiff
Copy link
Contributor

Problem

When two elkodon_cal constructs interact with each other, we need to add some initial versioning information to ensure that not to incompatible versions of the same constructs are interacting. This could lead to undefined behavior and hard to unravel bugs.

They could be, for instance incompatible since the member order of shared management constructs has changed or members have been added/removed. Or the internal communication protocol was updated.

Solution

Introduce a const SHM_API_VERSION: u64 constant inside elkodon_cal, that must be checked before any of these constructs start to interact on an ipc level.
Constructs that use shared memory could add this constant to the beginning, as the first value, to their shared memory. If the construct does not use shared memory, one could create a file and store the number value is binary, or human-readable value, in there.

@elfenpiff elfenpiff added bug Something isn't working enhancement New feature or request invalid This doesn't seem right labels Nov 15, 2023
@elfenpiff
Copy link
Contributor Author

elfenpiff commented Nov 15, 2023

@elBoberido Oh I think this is an important one and needs to be addressed quickly. This morning I remembered that you told me once that you add this feature always right from the beginning when you write serialization code.

@elBoberido
Copy link
Collaborator

If you mean something like having a SHM_API_VERSION in each shared memory file, then yes. If you want to add it to each struct, e.g. a vector then maybe not 😅

Oh did you version the config file?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants