Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another member of the Core Development Team before making changes.
Fields within <> are Mandatory.
Fields within [] are Optional.
| Message | Token | Sender |
|---|---|---|
| ERROR | E | Server |
| New User | NU | Client |
| User Accepted | UA | Server |
| List Utilities | LU | Client |
| List Workplaces | LW | Client |
| List Members | LM | Client |
| LOGIN | L | Client |
| LOGOUT | LO | Client |
| Login Success | LS | Server |
| Message | M | BOTH |
| New Member | NM | Server |
| Private Message | PM | BOTH |
| Part Group | PG | Client |
| New Group | NG | Client |
| Group Accepted | GA | Server |
| Group | G | Server |
| Group Parted | GP | Server |
| Join Group | JG | Client |
| Group Joined | GJ | Server |
| User | U | Server |
| Utility | UT | BOTH |
| Query | Q | Client |
| PING | PI | BOTH |
| PONG | PO | BOTH |
| Utility List | UL | Server |
| Workplace List | WL | Server |
| Workplace Desc. | WD | Server |
An error message from the server to a Client.
E <Command> [Message]
Example: [Server] E N “Bad User”
NOTES: Error message should try to be as generic as possible so that error message handling can be done at the client level.
Attempt to create a new client.
NU <username> <eMail> <password> <FirstName> [LastName]Server responds with
UA <UserID> <username>
Example:
[Client] NU clsk alan.alvarez@us.army.mil encryptedPass Alan Alvarez
[Server] UA 283 clsk
NOTES: It'll be optional to let anyone create a new account or let only the Server admin or Group Managers to create a new accountd.
This should be an option in mira-server.conf
Also, note that the UserID is generated by the server.
LM <workplace>
The server would then respond with a ML message
ML <workplace> username1:n,username2:f
LU <workplace>
The server would then respond with a UL message
UL <workplace> Utility1,Utilit2
LW
The server would then respond with a WL message
WL id:workplacename1,id:workplacename2
Attempt to login to the server.
L <username> <password>Server responds with
LS
Example:
[Client] L clsk EncryptedPass
[Server] LS
A client letting know the server that it is logging out, and closing the connection.
LO
A user sending a Message to a group
[Client] M <GroupName> <Message>Server sends message
[Server] M <username> <GroupName> <Message> <TimeStamp>
Example: [Client] M Mira “Welcome to Group Mira” [Server] M clsk Mira “Welcome to Group Mira” 7898547
[Server] NM <username> <"Workplace">
[Client] PM <username> <Message>Server sends message
[Server] PM <sender username> <reciever username> <Message> <TimeStamp>
Example:
[Client] PM J_K9 “Hello J_K9, this is clsk”\n
[Server] PM clsk J_K9 “Hello J_K9, this is clsk” 75654198
[Client] PG <workplace>Server responds with:
[Server] GP <username> <workplace>
Note: Server will respond with WP to all workplace members.
A user trying to create a new group.
NG <GroupName> <GroupOwner>Server responds with:
GA <GroupName>
Example:
[Client] NG Mira clsk
[Server] GA Mira
A server describing a group to a user.
G <GroupName> <GroupMembers>
Example: [Server] G Mira clsk,J_K9,beyonddc
NOTES: GroupMembers is a comma-separated list of usernames in that group.
Examples of times where this message would be sent are: When a user logs in to the server, when an user joins a group .
[Client] PG <workplace>Server responds with:
[Server] GP <username> <workplace>
Note: Server will respond with GP to all workplace members.
A user trying to join a new group
JG <GroupName> [InvitationID]
NOTES: Invitation IDs are to be passed whenever possible as this should make the process of finding the ID faster. If not the server would have to find a matching invitation for the user to that specific group in its invitation table.
Some groups might be able to be joined without invitations. This is up to the Group Manager and is a Group configuration.
If a user successfully joins a group, a server responds with a Group description message.
This is the response given by a Mira server to a successful JG message.
GJ <GroupName>
A server describing an User to another User
U <username> [eMail] [FirstName] [LastName] [GroupIDs] [...]
Example: [Server] clsk alan.alvarez@us.army.mil Alan Alvarez Mira,Group2
NOTES: How much data is sent depends on how much data the user wants other people to be able to see.
This is a message that will probably be highly modified throughout time.
This token is used for Utility communication between the client and the server.
This is not used for inter-utility communication
ie: A file utility communication with its counterpart on the server.
UT <utility> <workplace> <...>
Example:
[Client] UT Files “Blues Project” CREATE document.txt
[Server] UT Files “Blues Project” CREATED document.txt 1230394
A user trying to find out information about another User or Group.
Q <USERS|GROUPS> <Field1,Field2,Field3,...|*> [Field1=Value1,Field2=Value2,Field3=Value3,etc...]
Example:
[Client] Q USERS * FirstName=Alan,LastName=Alvarez
Server responds with a User or Group Description returning only those fields specified in parameter 2.
If * is specified all fields will be sent back.
If no Field=Value is passed then the server will show all users or groups.
A Client OR Server checking for response.
PI <ID>The other end responds with a PONG (PO) message using the same ID
PO <ID>
Example:
[Server] PI 25
[Client] PO 25
A Client OR Server checking for response.
PI <ID>The other end responds with a PONG (PO) message using the same ID
PO <ID>
Example:
[Server] PI 25
[Client] PO 25
UL <workplace> [Utility1],[Utility2],[...]
Note that utilities are separated by commas.
WL [id:workplacename1],[id:workplacename2],[...]
WD <Workplace Name> <Workplace Description>
Note: In the Mira client and server implementation, this message is automatically sent to the client when requesting the workplace's utility list (WL).
This is how a normal conversation should look like:
[Client] NU clsk alan.alvarez@us.army.mil EncryptedPass Alan Alvarez [Server] UA clsk [Client] L clsk EncryptedPass [Server] LS [Client] NG Mira [Server] GA Mira [Client] Q GROUPS * GroupName=Mira [Server] G Mira clsk,J_K9, [Client] M clsk "Welcome to Group Mira" [Server] M clsk Mira "Welcome to Group Mira" 7898547 [Server] T SomeServerToken147 SomeClientToken258 [Client] PI foo [Server] PO foo
Discussion
This protocol is in the process of being changed to add User IDs.
Users and WorkPlaces are now tracked by user ids instead of usernames.
Alan,
Do you think it would make sense to abbrevivate options in messages as well?
For example, instead of
We can have
Similarly to query users we can have
Using this scheme we may be able to save some additional bandwidth as well.
I'm sorry I just saw this. Yes, this makes sense.