eclipse-uprotocol / eclipse-uprotocol/up-spec

Split up UUri's uEntity ID (ue_id) into two separate fields

Open
#342 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Gherkin
Stars
43
Forks
29
Avg merge
20m
Merged PRs (30d)
3

Description

Currently, the class model for [UUri](https://github.com/eclipse-uprotocol/up-spec/blob/main/basics/uri.adoc) contains a single UInt32 field (_ue_id_) which contains both, the entity type ID (lower 16 bits) as well as the entity instance ID (upper 16 bits). However, given this clear distinction, it seems to make sense to actually split up this single field into two dedicated UInt16 fields, one for for each identifier.

We can still keep the serialization to URIs the same, i.e. prepending the type ID with the instance ID. But we would have a much easier time implementing the UUri type in programming languages. We already have dedicated getters for a UUri's type and instance IDs in up-rust, so this change should not really introduce any incompatibilities. The serialization to protobuf should also not be affected.

Contributor guide

Open the contributing guide

Research direction

Start with basics/uri.adoc and review the UUri field definition, then compare it with up-rust's existing type and instance ID getters. Verify the URI and protobuf serialization constraints described in the issue; done means the two UInt16 identifiers are distinct while the existing URI and protobuf representations remain unchanged.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.