Roy Thomas Fielding (2002) has defined Representational State Transfer (REST) as an coordinated sets of architectural constraints to increase scalability and decrease latency and network communication traffic in his PhD dissertation. There are three main elements in the REST architecture including: data elements, connecting elements and processing elements.
Roy has implemented this by defining REST characteristics such as stateless attributes which means that all the requests should contains all necessary information so there will be no need to store any contexts on the server. This attribute give us a limit on the Android client so we will be unable to store contexts on the server, so each requests must contain all the details. On the other hand in the server, since there will be no saved contexts, performance will be improved so it will be a perfect choice for high load server applications.
Another way to run a web service is to use SOAP (Simple Object Access Protocol). Paul Prescod (2005) has compared SOAP and REST in his research paper which provides information between these two architectures.
The reason that REST architecture is used to run web services on this project is to get benefit of the REST implementation advantages such as using standard HTTP protocol, defining URIs for each resources with REST in the web services. Also as discussed above, it will be a perfect choice for high scale enterprise applications.
By using REST we can reduce the bandwidth usage by caching resources in the REST web services. Roy T. Fielding (2000) describes caching requirements as “Cache constraints require that the data within a response to a request be implicitly or explicitly labeled as cacheable or none-cacheable. If a response is cacheable, then a client cache is given the right to reuse that response data for later, equivalent requests” .
Since we use mobile devices as client and bandwidth usage and connection on most of the networks are limited either by slow connections or a monthly usage, taking advantage of caching resources becomes critical for this project. Another advantage would be reducing the load on the server and makes this project more scalable.
Parastatidis et al (2010: 22) concludes that “By using REST architectural style we can get benefits such as loose coupling, self-description, scalability and maintainability”.
Android JBridge project focus on the REST architecture on the server and as explained above, EJBs might exists on different machines, so each session entity can perform operations on its own and it doesn’t require whole the system to link together at once Which will be another advantage of the system. If a machine crashes, other servers can continue operation and the system will be up and running.
Roy T. Fielding and Richard N. Taylor. Principled design of the modern web architecture. ACM Trans. Inter. Tech., 2(2):115–150, 2002.