Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Use String instead of long for Trace Id #42

Closed
Malte-Hansen opened this issue Jan 20, 2019 · 3 comments
Closed

Use String instead of long for Trace Id #42

Malte-Hansen opened this issue Jan 20, 2019 · 3 comments
Assignees

Comments

@Malte-Hansen
Copy link
Contributor

A long in java is a 64bit signed integer, the max safe integer is roughly 2^63. In Javascript the max safe integer is roughly 2^53, thus those data types are not matching. For most variables of type long which are sent to the frontend this is no issue in practice because most long variables are incremented step by step - never reaching a number as big as 2^53.

However, trace IDs are generated by the Kieker framework as opposed to the ExplorViz Backend. Since Kieker should handle a lot of incoming traces from different sources, the IDs are not simply incremented. It exists a function in Kieker which maps incoming traces to a variable of type long. This function uses all 64 bits to practically avoid collisions of IDs and thus returns usually an integer which is larger than 2^53.

As a result trace IDs are not interpreted correctly by the frontend and result in colliding trace IDs. To fix this issue we need to either map the big trace IDs to smaller traceIDs in the backend or use a string representation for the trace IDs. The latter is to be preferred, since mapping would be more compute intense and error prone than converting to a string.

@czirkelbach czirkelbach added this to the Release v1.3.0 milestone Jan 21, 2019
@czirkelbach czirkelbach self-assigned this Jan 21, 2019
@czirkelbach
Copy link
Contributor

Ok, I'll adapt the data model and processing in the backend.

1 similar comment
@czirkelbach
Copy link
Contributor

Ok, I'll adapt the data model and processing in the backend.

czirkelbach pushed a commit that referenced this issue Jan 21, 2019
@czirkelbach
Copy link
Contributor

Fixed in branch dev-1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants