-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rapidmidiex-ws-protocol v0.0.1 spec #17
Comments
I like this, one tweak, rather than two different structs for |
I'm also thinking the Perhaps better to have a separate server-to-client-message:
|
I'm also thinking to give the client->server We could use something like So I would propose for the client Any improvements on these names still possible? |
Good stuff!
Do we need to differentiate
|
As a user, when viewing your peers' latency numbers:
For example, From your (
Does this make sense? Does it even matter? Am I overcomplicating things? |
You're reasoning and calculations make perfect sense but for me it's still a big open question how all this will turn out in practice.. Like latency-spikes... I can imagine in future versions of the protocol for example we temporarily start blocking notes once latency becomes too high. And eventually we might need some kind of anti-jitter-mechanism to even out all the reasonable spikes? But what is reasonable and how would we sync this across all connected clients? That's some big open questions right there ;-) Anyway for simplicity's sake I would just have the latency-table (which clients CAN but don't HAVE TO display) initially be all the latencies (i.e. RTT's) in the perspective of the server. Maybe there can be an extra UI-widget that displays the client's OWN latency with the server. |
There's also still a matter of security / spamming-clients. |
I've updated the original post. I think the protocol is now in a decent enough state to have a draft put on the documentation-site. |
For
v0.0.1
the proposal is to start with json text-messages over websocket.The goal is to have a minimal working proof of concept.
We don't care about time-synchronisation or any other details.
We do want to measure latency as to have an idea what anti-jitter-mechanisms would be necessary for future upgrades of the protocol.
Client to server-messages
Connect-message
UpdateClientList
-messageSendNoteOn-message
SendNoteOff-message
Server to client-messages
UpdateClientList-message
ForwardNoteOn-message
NoteOn
-messageForwardNoteOff-message
NoteOff
-messageLatencyUpdate-message
Although the
UpdateClientList
-message also sends this information already, maybe it's still interesting to define this message. The server can then still decide to use this or opt for the full-onUpdateClientList
.Assumptions
Some assumptions about
rapidmidiex-srv v0.0.1
:echo
-server fornote
's, forwarding all received notes to all connected clientsPool
with all connected clients ([]Client
)Ping
-frames to measure latency (TBD: interval)UpdateClientList
-message to all connected clients every time a new client connects or a client-connection is obviously lostUpdateClientList
-messages orLatencyUpdate
-messages for this purpose. The exact details are up to the specific server-implementation.Some assumptions about
v0.0.1
-clients:SendNoteOn
- andSendNoteOff
-messages to the server in any order and at the same time.Note
is encoded as a (MIDI-compatible) number, e.g.60
=C-4
.UpdateClientList
-message (with[]Client
).ClientId
, for example to give visual feedback on which client generated a note-event (perhaps using color or other visual hints)LatencyUpdate
-messages. They should update their own table (if they chose to remember one).ForwardNoteOn
- andForwardNoteOff
-messages with aNote
and a uniqueClientId
ClientId
earlier via aUpdateClientList
-message from the server.ForwardNoteOn.ClientId
and only act on theForwardNoteOn.Note
-information.UnknownClientIdError
can be generated locally if aNote
with an unknownClientId
is received but the protocol doesn't do error-reporting.UnknownClientIdError
and just play (or display) the note anyway.Ping
-frames with aPong
-frame (this is usually implemented by websocket-implementations as per the websocket-RFC's)The text was updated successfully, but these errors were encountered: