vilmibm / tildemush

a modern mush tailored to tilde town
GNU General Public License v3.0
42 stars 12 forks source link

switch to ACK pattern instead of OK pattern in server core #194

Open vilmibm opened 5 years ago

vilmibm commented 5 years ago

Right now commands work like this:

  1. client sends command
  2. server attempts to execute it
  3. if there is a UserError, we send red text
  4. if there are no errors, we send COMMAND OK

I don't think this is a useful approach. The client has no idea what command COMMAND OK is referring to and the user only cares about what state changes in front of them.

I'd like to change this approach to

  1. client sends COMMAND UUID MESSAGE
  2. server immediately sends COMMAND UUID ACK
  3. things happen

this way, the client knows if and when the server is seeing the commands it sends. this can be used to report on connection health and other stuff.