Search code examples
sessionrestsingle-user

REST for session-based single-user service?


I'm thinking about implementing a server for remotecontrolling a device as a RESTful service. Unlike most restful services known from the web it could only serve one client in a meaningful way at a time. Do you think that REST is still a valid option or would you see this single-user, session-based scenario as a sign to choose another way to interact remotely?


Solution

  • You could certainly follow many of the principles behind a REST architecture for your service, but it doesn't sounds like you really need most of them. REST is better suited for larger long lived systems with lots of disparate clients.

    Now, HTTP, on the other hand, could easily be leveraged to create simple service for you needs. But, HTTP != REST. REST is an architecture, HTTP is a protocol.