decentraland / decentraland/sdk
Type CrdtMessage data
- Dominant language
- No language data
- Stars
- 4
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Epic: https://github.com/decentraland/sdk/issues/895
Currently data in the `CrdtMessage` is not typed, is `object`
```
public readonly struct CrdtMessage
{
...
public readonly object Data;
}
```
We should implement generic to type the `CrdtMessage` data
` public readonly struct CrdtMessage`
In order to being able to implement object pooling for the data structure (issue: https://github.com/decentraland/sdk/issues/897)
Following the considerations:
- class [CRDTProtocol](https://github.com/decentraland/unity-renderer/blob/dev/unity-renderer/Assets/Scripts/MainScripts/DCL/CRDTProtocol/CRDTProtocol.cs) must be changed so it also use generic to support the `CrdtMessage` changes
- class `CRDTProtocol` should also be injected with a lambda or class to resolve conflicts depending on it generic `` type
- we are currently only using types `string` (for crdt conflict resolution tests) and `byte[]` (for the runtime implementation)
Contributor guide
Research direction
Start with the CrdtMessage definition and the CRDTProtocol class at unity-renderer/Assets/Scripts/MainScripts/DCL/CRDTProtocol/CRDTProtocol.cs. Trace the existing string conflict-resolution tests and byte[] runtime usage, then verify that both generic message paths resolve conflicts and preserve the current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100