Comments (4)
I think we should try and understand why it's there in the first place, and what problem it's intended to solve.
If it's push back against using v4 UUID strings (because they are unwieldy or because of problems with space in the terminal) , then we could look at using something like Stripe API IDs (they use then like cus_9s6XKzkNRiz8i3 with a type and then ID).
from bacalhau.
Honestly, my biggest thing is that it feels like we're optimizing for making things easy for us instead of for end users.
BUT, if we offered things like tab completion, and IDs with types (agree with @rossjones here), etc, i think that makes things easier.
I'm surprised it's that big an issue - why aren't we converting the ID to long the moment we get it from the user and then convert it immediately?
from bacalhau.
Honestly, my biggest thing is that it feels like we're optimizing for making things easy for us instead of for end users.
It is not a bad thing to build something that is maintainable :). I believe we are all trying to find a balance here between maintainably and user experience, and that is why @frrist is bringing this up.
I'm surprised it's that big an issue - why aren't we converting the ID to long the moment we get it from the user and then convert it immediately?
Converting a short ID back to a long ID isn't straightforward. We will have to do a lookup in the data store to find all jobs with short ID prefix. This means we will have to design the data store or add indexes that enables constant or logarithmic lookups of short IDs, and handle collisions.
Overall, this problem is not unique to job IDs, but to execution, evaluation and node IDs as well. There is a need to generate globally unique IDs for these resources, specially as we move more towards distributed orchestrators and federated clusters. At the same time I agree with @aronchick that presenting and working with shorter IDs is more user friendly, specially when presenting things on the terminal.
The options I see are:
Option 1: Use shorter and globally unique IDs. An example would be to use Base64 representation of UUIDs, which will look like: 550e8400-e29b-41d4-a716-446655440000 -> VQ6EAOErQdSnFkRmVURA
. This will reduce the ID length from 36 to 22. Still larger than our current 8 character short IDs, but much smaller than long IDs.
Option 2: Keep supporting short to long ID translations, but standardize it, limit its use to certain places or make it part of job store interface so we don't forget about supporting it such as what happened with boltdb. If it is useful only for CLI users and not API or SDK users, then maybe we can explore exposing an API to translate a short ID to list of long IDs, and only support translation in the CLI or enable auto-complete as @aronchick suggested.
Overall, I don't think we can have it as an option where we only support the long IDs that we have today
from bacalhau.
What specifically about the long Job IDs we generate right now are challenging to work with? One thing I find challenging about them is that I cannot copy them by double clicking, due to hyphens. If we removed the hyphens or replaced them with underscores this would alleviate that. Are there other things we dislike? I'd be in favor of option 1, perhaps with the modification that we use a different UUID generator like the stripe one.
from bacalhau.
Related Issues (20)
- Optimize the heart beating mainly, to do more optimistic cleanup instead of just removing all stream ids
- Add end to end tests using devstack for unhappy cases for log streaming
- obtuse error message from `bacalhau docker run` when issuing job with invalid parameters
- Handle graceful shutdown of produceer client via context
- Show full nodeID and executionID with `--wide` flag
- Cancel log stream on respective engines if the stream is cancelled due to any reason.
- Simplify node bootstrapping (fx)
- Move `bacalhau create` to `bacalhau job run`
- Move `bacalhau cancel` to `bacalhau job stop`
- Move `bacalhau list` to `bacalhau job list`
- Move `bacalhau id` to `bacalhau agent node`
- Move `bacalhau describe` to `bacalhau job describe`
- Move `bacalhau validate` to `bacalhau job validate`
- Move `bacalhau logs` to `bacalhau job logs`
- KVMigration Tests Flaky HOT 1
- Implement auto download flags and function on wasm and docker commands
- Disable WebUI in production environment
- Add a --queue-timeout flag to docker run
- Optimise locking in producer and consumer based NATS streaming clients
- Re-work documentation around CLI to align with V2 CLI commands
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bacalhau.