ZeroAssumptions / aide-de-camp

Durable job scheduler for rust
Other
30 stars 2 forks source link

JobHandle id should be String instead of Xid #17

Closed prabirshrestha closed 1 year ago

prabirshrestha commented 1 year ago

Any reason id is of type Xid instead of String? https://github.com/ZeroAssumptions/aide-de-camp/blob/92aea347f69950a3d0f081e6590d47d73331bd1b/aide-de-camp/src/core/job_handle.rs#LL11-L11C25

Some database such as surrealdb will efficiently store UUID. While this would be breaking change it would be good if the id was of type String.

andoriyu commented 1 year ago

Yeah, this is to ensure multiple job publisher won't collide and IDs are still lexicographically sortable without a centralized broker. UUIDs are slower to generate, and at best 4 bytes larger than Xid.