Comments (11)
Claiming
from dendrite.
src/github.com/matrix-org/dendrite/clientapi/routing/createroom.go:94
// TODO (#267): Check room ID doesn't clash with an existing one, and we
// probably shouldn't be using pseudo-random strings, maybe GUIDs?
This is something we can discuss.
From my understanding, the upside of using UUIDs is that you get a certain guarantee they are generated such to not collide easily. They should be more random then what util.RandomString currenly does (using math/rand).
Namespaces in UUIDs are not something we're interested in, because room IDs will already have the server name as suffix.
To me it seems like UUIDs are therefore overkill for this.
I'm not sure if things will break with larger room IDs. It seems synapse currently uses 18 character room IDs. I guess it wouldn't break things because room IDs are normally stored in their full form (including server suffix), so their length is dynamic anyway, but I can't say for certain.
from dendrite.
Yeah, UUIDs seem overkill for this, I'd probably set it up to ask the room server if the room id is free. Though that would require us to reserve our use of that room id on the room server, so that two client API instances can't race between asking about the room id and persisting the new room.
from dendrite.
Yeah, UUIDs seem overkill for this
Okay :)
Though that would require us to reserve our use of that room id on the room server
Or maybe the createroom of the roomserver's API should (optionally) just return an error if the room ID is already taken, therefore making the checking and registering one operation (from the clientapi's view). I'll take a look.
from dendrite.
I don't think there is a createRoom API on the room server, instead we just start shoving down events that create the room through the normal stream.
from dendrite.
I'd imagine the flow looks something like:
- Reserve the roomID from the room server (either the room server returns a free roomID or we'd want to retry if the randomly generated roomID had already been taken)
- Construct the events that create the room
- Send the events down the stream to the room server
from dendrite.
Ahh that explains it! So we need to know the room ID to use before the process of building and sending the events can start.
Working on it.
from dendrite.
Was a bit busy last weeks, but I'm still working on it!
from dendrite.
Hello @rreuvekamp, are you still interested in and working on this issue?
from dendrite.
Yes! I didn't realize I stop had it open, sorry.
I'll check to see if anything has changed in the meantime regarding those parts, and fix the issues that still need fixing.
I've got time on Sunday, so that will work out.
from dendrite.
I don't think we need this. #794 (comment)
from dendrite.
Related Issues (20)
- Recovery Key Confirmation Doesn't Work Properly
- Feature Request: message & media retention HOT 4
- Only use the `ts` parameter for e.g. `/send` for appservices
- Runtime panick when logging in via Element X
- [minor] Incorrect invitee displayname when inviting at room creation HOT 2
- Option to disable encryption for local DMs HOT 3
- Federation errors on Dendrite Homserver
- NATS server authentication
- Wrong Content-Type for some JSON responses like 404's HOT 1
- Edited messages appear twice in fulltext search HOT 3
- High CPU constantly (OpenBSD vmm machine) HOT 7
- Bulk User Creation
- Dendrite server stuck/not responding
- Support Go versions for longer HOT 3
- Admin with unix sockets
- Thumbnails don't work with SVG HOT 1
- `docker build` fails on macOS + colima
- Try to no-op `/keys/signatures/upload` requests if the signature does not change
- Bug caused by joining the "!****:matrix.org" room with over 100,000 people
- Cannot connect to postgres DB listening on localhost.
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 dendrite.