User Tools

Site Tools


yamms:yamms

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
yamms:yamms [2011/08/17 11:29] devayamms:yamms [2011/08/24 11:14] (current) – removed deva
Line 1: Line 1:
-======YaMMS====== 
-=====Message Transport Procedure===== 
-====Message IDs and logging==== 
-Message ids are based on date, time and a serial number counting from 0 padded with zeros up to precisely 5 characters. Example: ''20110125125900001'' for the second id (serial number 1) generated at 2011-01-25 12:59. 
-This number is converted into hex (network order/big endian) generating a string of precisely 14 characters (max length in MedCom message field) 
-All messages, both received and sent, are stored in a log folder with a hex[0-2]/hex[3-4] folder structure (first three chars and then next two chars) and with the message id as the file name. 
-These files are used when generating new message ids in order to guarantee uniqueness (CREATE_EXCL). 
-The above example id would be encoded into: ''47720D608496E1'' and stored in the folders ''477/20''. 
-A message sent one month later, ''20110225125900001'', will become ''477224A8FB7EE1'' and therefore be stored in ''477/22''. 
-The folder changes roughly twice per month. 
  
-====Receiving==== 
-  * Message files drop into the inbox folder from ftp in regular intervals (ex. 10 minutes). 
-  * Each message file is parsed and receipts are put in the outbox. 
-  * Each message file is added to an index containing message metadata (ex. read/unread). 
-  * Bad messages (syntax errors, unknown types etc.) are marked as such. 
-  * Control messages are used to mark uploaded messages in the outbox-waiting-confirm folder. 
- 
-====Sending==== 
-  * Inotify on the outbox triggers the sending event. 
-  * Any newly written messages in the outbox is syntax checked and validated. 
-  * Errornous messages are stalled and a message is put in the inbox that the message could not be sent. 
-  * Validated messages are uploaded to the ftp server. 
-  * Each uploaded file is put in a outbox-waiting-confirm folder and marked as uploaded but not confirmed. 
-  * Each upload also makes a download. 
- 
-=====Http protocol (client interface)===== 
-  * Get inbox contents (list of messages containing id, type and resume tupples) 
-  * Move message to [trash|archive|...] 
-  * (Delete message entirely?) 
-  * Send [hospitalreferral|...] 
-  * Mark message as [read|unread|handled|...] 
-  * Get address by id. 
-  * Edit address (by id). 
-  * Create address. 
-  * Delete address. 
- 
-=====Internal Message Format====== 
-All internal messages are in UTF-8 encoding.\\ 
-All address ids maps to address entries in database on server. 
- 
-====Read Format==== 
-Contains: 
-  * Message id 
-  * Sender address id 
-  * Receiver address id 
-  * Message title 
-  * Message status 
-  * Message times (sent/received/read etc) 
-  * Message body (server generated resume based on MedCom XML) 
-  * Original MedCom XML in base64. 
-<code xml> 
-</code> 
- 
-====Send Format==== 
-Contains: 
-  * Sender address id 
-  * Receiver address id 
-  * A list of required fields 
yamms/yamms.1313573382.txt.gz · Last modified: 2011/08/17 11:29 by deva