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

Add a UUID tremor-script module #1234

Open
mfelsche opened this issue Sep 30, 2021 · 4 comments
Open

Add a UUID tremor-script module #1234

mfelsche opened this issue Sep 30, 2021 · 4 comments
Labels
_complexity:low A task with a low complexity that should be easy to understand enhancement New feature or request good first issue Good for newcomers hacktoberfest _size:medium A medium sized task that will take some time to complete

Comments

@mfelsche
Copy link
Member

Describe the problem you are trying to solve

Especially for correlation purposes, UUIDs are a common standard to create unique identifiers (where simple monotonically increasing numeric counters don't suffice). It would be nice to have a tremor-script module that exposes the means of creating and parsing uuids.

Describe the solution you'd like

A stdlib module exposing functions to create and parse the different existing uuid variants.

Maybe other techniques for unique identifiers are also interesting and could be submerged into a std::id or other module.
See for example the list in this section: https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-01#section-2

@mfelsche mfelsche added enhancement New feature or request good first issue Good for newcomers hacktoberfest _complexity:low A task with a low complexity that should be easy to understand _size:medium A medium sized task that will take some time to complete labels Sep 30, 2021
@ramonacat
Copy link
Collaborator

What output would be expected from parsing UUIDs? I know those can be parsed into their respective fields, but that honestly doesn't seem all that useful in my opinion.
Also, which versions of UUIDs should tremor support? Is only v4 sufficient?
v1 is especially nasty since it depends on the MAC address of the machine (and the algorithm description starts with "Obtain a system-wide global lock", which I guess is not that great for performance - https://datatracker.ietf.org/doc/html/rfc4122#section-4.2.1)

@mfelsche
Copy link
Member Author

mfelsche commented Nov 2, 2021

UUIDv4 suffices for starters. This is the most useful and widely used. A string could be parsed to its 128 bit number or (if we dont support this out of the box) to a list of two 64bit numbers. A struct with all the fields might also be interesting for some usecases. I could imagine stdlib functions in this module to extract single uuid fields from a given string.

But generating UUIDv4 as strings is the most important feature wrt UUIDs in general. (Imho)

@milantracy
Copy link

is the issue still valid?

i would like to give it a try

@Licenser
Copy link
Member

Hi @milantracy ,

yes it is :) it'd be greatifg you gave it a try. Feel free to come by the discord server if you need some help or want feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_complexity:low A task with a low complexity that should be easy to understand enhancement New feature or request good first issue Good for newcomers hacktoberfest _size:medium A medium sized task that will take some time to complete
Projects
None yet
Development

No branches or pull requests

4 participants