Comments (8)
UUID.timestamp_create
doesn't work because virtual network interface ther e has no MAC address.... if we add info on how to set it by hand that could also do the trick but still i don't get this 22 characters limit :)
from sharetribe.
The current UUID structure is based on early decisions few years back. The research platform where Sharetribe was linked was designed to initially follow some guidelines from Open Social standard, but that was never fully implemented. I guess the UUID part was picked from there and there was a plugin that the developer of the research platform decided to use for generating the UUIDs. When we made Sharetribe independent of that platform we picked the same code in order to maintain the same logic with UUIDs. It seems that the plugin code uses MAC address somehow in seeding the values, which results part of the string being same on the same machine (and different on different machines). I don't know too much about UUID in general, so I don't know about the 22 limit making sense or this way of constructing the UUIDs.
Currently we are not tied to any other components with out UUIDs so it is possible to update that system. I would feel good if we'd be using an up to date solution for UUIDs instead of this ancient plugin code. But this hasn't been an issue for us so far so I haven't yet looked at it.
Also it's not necessary in general that we use UUIDs as person ids, and we have talked about moving to integer IDs but there's bit of work, and we haven't seen big benefits in making the move.
In other words if you want to improve this part to make it work better also in virtual network decives etc. feel free. That sounds like improvement that we can gladly include to main branch. And there's no special needs to keep 22 chars, so increasing that is possible too. It doesn't make the URLs prettier but anyway we should put the usernames there (if we're going to keep them)
from sharetribe.
thanks for reply! in UUIDs i like that once we start federating tribes across domains they could possibly come of use, simple integers in distributed scenario come useless since they just collide! i prefer using URIs but wouldn't discard UUIDs right away ;)
for pretty URLs you can take a look at:
- https://www.ruby-toolbox.com/projects/friendly_id
- http://railscasts.com/episodes/314-pretty-urls-with-friendlyid
BTW i find ruby-toolbox.com very useful resource in general :D
from sharetribe.
affects #26
from sharetribe.
Yep there are good sides in UUIDs regarding data portability. We currently have them for users but not for other resources. I think that's actually good staring point as some changes might be needed and now we can try to put things right with user UUIDs before spreading the UUID solution yet.
I also had issues with current UUID plugin in Travis (where virtual env doesn't have MAC address that the current solution used (apparently to avoid collisions). However, we need to switch from the old style rails plugin anyway and replace it with a more recent way of creating UUIDs in Ruby. I don't know yet what's the latest recommended way, but gotta do bit of research when changing this.
(My current quick fix for UUIDtools was to return always a same hard coded mac address, if no real one is available. I think yours might anyway be better, but as said we need to update the system soon anyway so both of these should work until that.)
from sharetribe.
possibly of use: https://gist.github.com/rmoriz/937739 (UUID primary keys in Rails 3)
also using: UUIDTools::UUID.random_create.to_s
from sharetribe.
yep that could be helpful, and it seems UUIDTools is still the way to go (https://github.com/sporkmonger/uuidtools), we just need to update from the old style plugin that we use to the gem version.
from sharetribe.
Closed due to inactivity
from sharetribe.
Related Issues (20)
- Page not load on mobile HOT 1
- Support for PostgreSQL still being considered? HOT 2
- Unable to setup Payment system from new install HOT 2
- log file too big HOT 1
- S3 Direct Upload with Sigv4 HOT 7
- Messages/Conversations in admin dashboard not working HOT 3
- Running sharetribe in kubernetes or as containers HOT 1
- Rails sever is running but if i type localhost:3000 into the browser the server stops working HOT 1
- Rake fails due to AWS non-AWS installation HOT 5
- Muti Currency Option HOT 1
- Cannot setup sphinx search on Mac OS X 10.15 HOT 1
- Email Images use Incorrect Src Path HOT 5
- Post a new listing button not responding HOT 2
- Per hour availability calendar HOT 3
- (Feat request) Inventory management / tracking HOT 1
- Calendar availability management HOT 1
- Error while installing using docker HOT 1
- undefined method `html_safe' for nil:NilClass Did you mean? html_safe? HOT 2
- Command Failed: bundle exec rake ts:index HOT 1
- Search delayed deltas with Sphinx not working from Sharetribe Go CE v11
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 sharetribe.