{"id":21819361,"url":"https://github.com/dflydev/dflydev-identity-generator","last_synced_at":"2025-08-21T19:11:35.561Z","repository":{"id":3083078,"uuid":"4106993","full_name":"dflydev/dflydev-identity-generator","owner":"dflydev","description":"Provide a standard interface for generating unique string-based identifiers.","archived":false,"fork":false,"pushed_at":"2012-11-07T17:58:27.000Z","size":148,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-09T06:09:17.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dflydev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-22T20:47:16.000Z","updated_at":"2017-04-01T10:16:18.000Z","dependencies_parsed_at":"2022-08-25T02:20:58.928Z","dependency_job_id":null,"html_url":"https://github.com/dflydev/dflydev-identity-generator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-identity-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-identity-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-identity-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflydev%2Fdflydev-identity-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dflydev","download_url":"https://codeload.github.com/dflydev/dflydev-identity-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226779851,"owners_count":17680772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-27T16:18:40.915Z","updated_at":"2024-11-27T16:18:41.607Z","avatar_url":"https://github.com/dflydev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Identity Generator\n==================\n\nProvide a standard interface for generating unique identifiers.\n\nThe purpose of this library is to solve the problem of generating\nunique values that are \"guaranteed\" to be unique and are suitable\nto be used as an identity for objects.\n\n\nWhy?\n----\n\nWhile it is generally not a problem for data stores that implement\nsequential or auto increment ID fields natively to provide a\nguaranteed unique identity, there are use cases where it makes\nsense to randomize identity such that it is not able to be guessed\nas it follows no predictable pattern.\n\nAs such, most of the `GeneratorInterface` implementations provided\nby this library will be somewhat random in nature. This does not\npreclude the use of sequential `GeneratorInterface` implementations.\n\n\nMobs\n----\n\nMobs are used to group identities. If a mob is specified, the\nvalue requested to be stored by the data store need only be\nunique to that mob. This allows a single data store to potentially\nstore and manage unique identities across several namespaces.\n\nThe name 'group' can be ambiguous (and is a reserved word for potential\ndata stores) so 'mob' was chosen based on the definition:\n\n\u003e any group or collection of persons or things.\n\n\n\nThe \"Uniqueness Guarantee\"\n--------------------------\n\nThe uniqueness guarantee is accomplished by attempting to add\na generated value to a data store. The data store needs to be\ncapable of knowing whether or not the value passed in is unique.\nThis guarantee of uniqueness is only as strong as the given\ndata store's ability to effectively determine uniqueness of a\ngiven value.\n\nA data store should throw `NonUniqueIdentityException` in the\ncase that a given value is not unique. The requested identity\nand mob values are available via this exception.\n\n\nWhat About Collisions?\n----------------------\n\nThe `IdentityGenerator` will make `maxRetries` attempts to\nstore generated values into the data store. This should allow\nfor handling a finite number of collisions gracefully.\n\nShould `maxRetries` be exhausted, `GenerateException` is thrown.\nIt will contain a list of `NonUniqueIdentityException` exceptions\nequal to the number of `maxRetries`.\n\n\n\nRequirements\n------------\n\n * PHP 5.3+\n\n\nLicense\n-------\n\nMIT, see LICENSE.\n\n\nCommunity\n---------\n\nIf you have questions or want to help out, join us in the\n[#dflydev](irc://irc.freenode.net/#dflydev) channel on irc.freenode.net.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflydev%2Fdflydev-identity-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdflydev%2Fdflydev-identity-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflydev%2Fdflydev-identity-generator/lists"}