deontologician / spaceship-build

Sci-fi spaceship engineering simulation
GNU Affero General Public License v3.0
5 stars 1 forks source link

Server Client protocol #48

Open deontologician opened 10 years ago

deontologician commented 10 years ago

Couple of ideas off the top of my head:

This relates to @xXxH3LIOSxXx work on the server/client, so assigning to him

deontologician commented 10 years ago

Also, wanted to throw this out there: http://zguide.zeromq.org/page:all

ZeroMQ is a lot like sockets, but with some very convenient amenities built on top

deontologician commented 10 years ago

Example of ZeroMQ server/client in a93fcd0

deontologician commented 10 years ago

An initial proposal for the handshake

initial handshake

Request from client

type: HELLO protocol_version: 1 email: [user_email] password: [user_password]

Response from server

type: LOGIN_SUCCESS | LOGIN_FAILED reason: [login failure reason if LOGIN_FAILED] motd: [motd if LOGIN_SUCCESS]

registration (may happen instead of handshake)

Request from client

type: REGISTER protocol_version: 1 email: [user_email] password: [user_password]

Response from server

type: REGISTER_SUCCESS | REGISTER_FAILED reason: [registration failure reason if REGISTER_FAILED]

After registration, they would need to proceed with a LOGIN attempt.

deontologician commented 10 years ago

I'm now realizing we may need to confirm the email. Usually not a big deal in an http server, but here we don't assume the presence of an http server. May have to rethink using the email as the user pkey...