This exercise consists on creating a REST service that allows external applications to create and manage message lists, basically there are two contexts:
- User management: Services that allow the register, update or removal of users
- Messages management: Services that allow message exchange between registered users
So the service will allow users to be registered, send messages between them and retrieve all the messages directed to a specific user.
User Roberto gets registered and wants to send a messages to user Marines (which is already registered), he then sends a message to the service and the message gets queued into Marines' messages list. Marines then can get the her list of messages and reply to Roberto using the same service Roberto used in first place.
- Register Roberto: POST http://host/user/roberto
- Send message to Marines: POST http://host/message/roberto/marines?msg="Hola Marines"
- Marines gets her message list: GET http://host/message/marines
- Marines replies to Roberto: POST http://host/message/marines/roberto?msg="Como anda ese camba?"
- Roberto gets his message list: GET http://host/message/roberto
- Only registered users can send and receive messages
- JSON must be used as communication protocol
- Users and messages must be stored in the server (file storage, database, etc.)
- Messages must store the sent and seen dates
- Ruby(language) and Sinatra(framework) must be used
- The project must be send as a ZIP file or as a public repository (github, bitbucket)
- The project must include a README.md file that describes how to make it run and how to test it, example: https://github.com/chkal/todo-mvc
- Additional points are given if you provide a UI for the project (HTML)