Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change place/transition identifier types from Long to String #93

Closed
merlijn opened this issue Feb 26, 2018 · 1 comment
Closed

Change place/transition identifier types from Long to String #93

merlijn opened this issue Feb 26, 2018 · 1 comment

Comments

@merlijn
Copy link
Contributor

merlijn commented Feb 26, 2018

Places and Transitions in the petri net are currently identified by a Long number. This identifier is used in a number of commands and messages send to/from the ProcessInstance actor.

In hindsight this choice proved to be mistake because it is not easily used in the DSL or understandable by humans.

Also there is a potential hash collision problem since the id is not explicitly specified but computed from other properties.

In a Recipe interactions are given a "label" which is converted to a number using a hashcode function. Even tough a 64 bit SHA256 hashcode is used there can still be collisions.

The proposition is to re-use the "label" given to an interaction as it's transition identifier. The same goes for places.

@Tim-Linschoten
Copy link
Member

We can not change this easily since we store it on event sourcing and we want to be backwards compatible.
Next to this the chance of collisions is almost zero since not many places and transitions is limited.

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

No branches or pull requests

2 participants