Giter Site home page Giter Site logo

thearchitectdev / architect.identities Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 1.0 306 KB

Reliable unique ID generation for distributed applications.

Home Page: https://www.nuget.org/packages/Architect.Identities/

License: GNU Lesser General Public License v3.0

C# 100.00%
id ids identity identities lfuid distributed locally unique generator generation

architect.identities's People

Contributors

thearchitectdev avatar timovzl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bangush

architect.identities's Issues

AesPublicIdentityConverter Suggestion

First thank you for this generator, I tip my hat to you, as I thought of crafting one myself until I found this.

Regarding public identities the AesPublicIdentityConverter is marked internal. While the ServiceCollection extensions can wire up the IPublicIdentityConverter with its options this hard coupling prevents using an alternative approach such as using SimpleInjector or something like Pure.DI.

Please consider a new extension method that would expose a factory method (returning the IPublicIdentityConverter to prevent leakage) so other IoC & DIP approaches can be used.

Regarding Blazor WASM consider adding the attribute [UnsupportedOSPlatform("browser")] as AES even as of .net 7 rc2 does not support it, perhaps as a diagnostic report.

Question on distributed system

Hi, great project, but something is not clear, assuming that two machines generates a distributed id at the same millisecond, the timestamp part will be the same, there will be no monotonic increment since there is no centralized coordinator right?.

Also is this project a hobby/test or will it get long time support?. I am kind of thinking in using it instead of ULIDs but i am afraid that it will later get archived or forgotten.

Thanks.

SQLite :: decimal.ToAlphanumeric() causes exception

Hello! ๐Ÿ˜€

Thank you so much for sharing and maintaining such a great library!

Faced one problem when using SQLite database provider with EF and wonder if you could give suggestions on how to resolve it.

When using SQLite, decimal IDs are stored as "text" despite invocation of ConfigureDecimalIdTypes(). I believe that's because SQLite does not support DECIMALS with such high precision. When ID value is stored in the database, looks like ToString() generated method is used to convert number to a text database type:

public override string ToString()
{
  return this.Value.ToString("0.#");
}

As a result, decimal value is stored something like this: 1098956916504943605256135935.0 (note the trailing ".0").

Now, when trying to call ToAlphanumeric() on that value, exception is thrown:

System.ArgumentException: The ID must be positive, have no decimal places, and consist of no more than 28 digits. (Parameter 'id')

Looks like it does not like trailing decimal place ".0".

How would you suggest to resolve this? Either not store decimal place in the database or modify ToAlphanumeric() to disregard it?

Thank you! ๐Ÿ™

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.