Designing Sequential Bundle Numbers for Readable Application URLs

Database identifiers are useful for internal relationships, but they are not always ideal for user-facing URLs.
An application may need a separate numbering system that provides a consistent, readable identifier for each bundle.
Sequential numbering is one way to achieve this.
Why use a separate bundle number?
A database record has its own identifier for internal operations. A business-facing number can serve a different purpose.
A sequential bundle number can make bundles easier to reference in URLs, support discussions, and application workflows.
Cruxtab Bundle Builder uses a sequential six-digit bundle number in its URLs.
Where numbering is implemented
The bundle lookup logic is located in:
bundleLookup.server.js
This is the relevant implementation area for resolving bundles using their numbering system.
The six-digit format provides a consistent identifier length, which can make URLs easier to read and recognize.
Separating internal IDs from business identifiers
It is useful to distinguish between two types of identifiers:
Internal database ID
Used by the application to identify and relate database records.
Bundle number
A sequential six-digit identifier used in URLs.
Keeping these concepts separate allows the application to evolve its internal database structure without necessarily changing its user-facing numbering convention.
Important numbering considerations
Sequential numbering introduces several engineering questions.
Concurrency: Two bundle creation requests may happen at the same time. Number allocation needs to prevent duplicate numbers.
Uniqueness: A database-level uniqueness constraint can protect against duplicate assignments.
Formatting: The application should consistently preserve the six-digit format, including leading zeroes if the numbering scheme permits them.
Gaps: Failed or deleted records may result in gaps. Sequential numbering does not necessarily mean numbers will always be consecutive among existing bundles.
URL stability: Once a bundle number is used in a public or shared URL, changing it can break references.
Conclusion
A separate sequential identifier can make application URLs more readable while keeping internal database IDs independent.
Cruxtab Bundle Builder uses six-digit sequential bundle numbers, with lookup logic implemented in bundleLookup.server.js.
Explore Cruxtab Bundle Builder & BYOB.
Comments
Join the discussionNo comments yet. Be the first to comment.




