
Message-Oriented Communication
- RPC (Remote Procedure Calls) and ROI (Remote Object Invocations) enhanced access transparency.
- Client should blocked until its request has been processed.
- Message-Oriented Communication can solve the problems by 'messaging'.
- If the other party is not executing at the time communication is initiated, message queuing systems allow processes which are exchanging information.
Resource Oriented Communication
- A resource-oriented architecture (ROA) is the structural design supporting the inter-networking of resources.
- ROA is considered a RESTful architecture. REST (representational state transfer) is defined by Roy Fielding, co-author of the HTTP specification and co-founder of the Apache HTTP server project, as an architectural style that exploits the existing technology and protocols of the Web, including HTTP and XML.
REST stands for REpresentational State Transfer. REST was developed along the HTTP/1.1 protocol. And HTTP/1.1 adheres to it.
Concepts
1)

2)

A client can be either transitioning between states or be at rest. A client is considered to be transitioning between states while one or more requests are outstanding.
3)

A client in a rest state is able to interact with its user. A client at rest creates no load on the servers or the network.
The constraints of REST
The REST architecture describes six constraints to implement the concept.
1) Client-server
- Clients are concerned with the presentation to the user and the application state. So, Servers are concerned with data storage, domain model logic etc. have a separation of concerns.
- No client context is stored on the server between requests. Each request from any client contains all of the information necessary to service the request, and any state is held in the client. The server can be stateful, this constraint merely requires that server-side state be addressable by URL as a resource.
3) Cache-able
- Clients are able to cache responses. Responses must, implicitly or explicitly, define themselves as cache-able or not.
4) Uniform interface
- A uniform interface between clients and servers simplifies and decouples the architecture. This enables each part to evolve independently.
5) Layered system
- A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way. Layers providing load balancing, security or shared caching can be added or removed very easily this way.

Both Restlet and Jersey are two of the most popular implementation of JAX-RS used for developing RESTful web services in Java ecosystem but there are a couple of other implementation also exist e.g. Apache Wink, Apache CXF, and JBoss RESTEasy.
Jersey RESTful Web Services framework is open source, production quality, a framework for developing RESTful Web Services in Java that provides support for JAX-RS APIs and serves as a JAX-RS. Jersey provides its own API that extends the JAX-RS toolkit with additional features and utilities to further simplify RESTful service and client development.
Restlet
One of the first open source framework for developing RESTful web services in Java. Restlet Framework helps Java developers build better web APIs that follow the REST architecture style. It supports all REST concepts (Resource, Representation, Connector, Component, etc.) and is suitable for both client and server Web applications. Another advantage of using Restlet framework is that Restlet based program can run as a standalone Java application.


References:
[1] https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf
[2] http://www.infoq.com/articles/rest-introduction
[2] http://www.infoq.com/articles/rest-introduction
No comments:
Post a Comment