About Nitin Kumar

Nitin Kumar works as a Solution Architecture in Wipro Technologies specialize in SOA. He has over twelve years of experience in information technology architecting and developing software systems, focus mainly on JEE solutions.

SOA and REST with Grails

I discussed on my previous article about REST and how to leverage RESTful web services on Grails platform. We will further discuss Grails on SOA & REST and try to visualize architecture in details.

REST and SOA are different architecture pattern with lots of commonality to make application highly interoperable.

As per Thomas Erl SOA is “SOA is a term that represents a model in which automation logic is decomposed into smaller, distinct units of logic. Collectively, these units comprise a larger piece of business automation logic. Individually these units can be distributes.”

Both SOA and REST architecture considerations are independent of technologies and represents how data communicate between and what guideline need to follow during data transfer between distributed systems to make them more interoperable.

RESTful web services with conjunction with SOAP can bring REST’s simplicity, flexibility, and low overhead without compromising the power or manageability of service-oriented solutions and architectures.

Without debating on RESTful and SOAP I would like discuss further that how we realize both using Grails application framework

Below diagram depicts realization of SOA and REST using grails:
grails-soa-rest
Components: A components Is an encapsulated, independent part of systems build based on Object – Orients software principles. It will be accessed by Service layer by well-defined interfaces. Service components could be POJO based Grails Domain or Grails’ plug-ins or plain Groovy or Java components.

Composites Services: A services uses individually developed components and wired them to bring high reusable, flexible and extensible business services which could be exposed and consumed by distributed systems. This is one level above than Components layer and could be Groovy, JAVA or Grails defined services. Spring’s Dependency Injection pattern will be leveraged to access components.

Service Resources: This layer contains all the business services use by resource services in the form of GET, POST, PUT and DELETE. Service Resources Resource Services are light weight, stateless and independent services communicate with consumer via HTTP(s) protocols over various data format such as XML, JSON, MIME, Byte etc. Service resources access business process or composite service and expose into outer world on HTTP(s) protocols.

Business Process: A process is considered to be an abstract specification of business aligned IT functions and used by resource services or distributed system. Business processes orchestrate/ choreograph business composite services to perform well-defined business functionality. These processes depend on the services layer to provide the building blocks for necessary functionality. Grails provide automated dependency injection powered spring core DI for Groovy and Java and Grail Services.

Integration (ESB): This layer provides a mechanism to expose the services. The resource services expose using RESTful web services and business processes and services exposes using SOAP based web services. It may also provide message transformation, routing decisions, and protocol conversion capabilities.

Quality of Services: This layer provides services to enable infrastructure services for the solution and ease runtime environment management and monitoring.

Conclusion: SOA and REST both are architectural style can be used together to deliver scalable, interoperable solution in enterprise environments.

References:

 

Reference: SOA and REST with Grails from our JCG partner Nitin Kumar at the Tech My Talk blog.

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

JPA Mini Book

Learn how to leverage the power of JPA in order to create robust and flexible Java applications. With this Mini Book, you will get introduced to JPA and smoothly transition to more advanced concepts.

JVM Troubleshooting Guide

The Java virtual machine is really the foundation of any Java EE platform. Learn how to master it with this advanced guide!

Given email address is already subscribed, thank you!
Oops. Something went wrong. Please try again later.
Please provide a valid email address.
Thank you, your sign-up request was successful! Please check your e-mail inbox.
Please complete the CAPTCHA.
Please fill in the required fields.

Leave a Reply


− 8 = one



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy | Contact
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Do you want to know how to develop your skillset and become a ...
Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you two of our best selling eBooks for FREE!

Get ready to Rock!
You can download the complementary eBooks using the links below:
Close