Tuesday, July 30, 2013

SOA Life Cycle


Hello everyone, this article will show how SOA Life Cycle works and what happens in each one of the stages.

Model

The first step in a service-oriented architecture project has little to do with technology and everything to do with your business. The first step is to establish what these business activities or processes actually are.

In the model phase you start by gathering business requirements and then you design and optimize their desired business process.

By simulating, or modeling, your business processes before you write a line of code, you gain a much deeper understanding of them before looking for trying to build software that helps you carry them out.
 
Assemble

After business processes are modeled and optimized, developers can implement them by building new services or by reusing existing services, and then assembling them to form composite applications. The assemble phase is about finding functionality that already exists and service-enabling it.

Deploy

When they are modeled and assembled, the assets that make up your SOA are deployed into a secure and integrated environment. The deployment needs to meet the performance and availability needs of your business.

Manage

The deployed system must be managed and monitored, both from an IT and business perspective. Information gathered during the manage step is used to gain real-time insight into business processes, enabling better business decisions and feeding information back into the life cycle for continuous process improvement. You deal with issues such as quality of service, security, and general system administration.

In this step, you monitor and optimize the system, finding and correcting inefficiencies and problems.
Because SOA is an iterative process, the completion of this step is the start of a new model phase.


Source:
http://pic.dhe.ibm.com/infocenter/esbsoa/wesbv7r5/index.jsp?topic=%2Fcom.ibm.websphere.wbpm.scenarios.esb1.doc%2Ftopics%2Fcwesb_security.html
VW003 - Introducing the Value and Governance Model of Service-Oriented Architecture, IBM Corporation, 2007.

Monday, July 22, 2013

What is Service Oriented Architecture (SOA)?

This article will give you an introduction about what is Service Oriented Architecture (SOA) and the different roles that interact with this.

Let's start, describing a Service:

From a business view, a service is what is needed to support the business process. Think about what your company does on a day to day basis and break those business processes up into repeatable business tasks or components.

What is a Service?

A repeatable business task.


A service is an application component deployed on a network-accessible platform hosted by the service provider. Its interface is described by a service description to be invoked by or to interact with a service requester.

Services are functions or operations accessible across a network with:
  • Well-defined interfaces.
  • Well-defined quality of service capabilities.
  • Well-known endpoints. An endpoint is a destination on the network that receives service requests.
Service providers
  • Offer services with published interfaces, policies and endpoints.
Service consumers
  • Use services and access them securely and reliably.
Service mediators, handlers and intermediaries
  • Provide extensible discovery, selection, metering, monitoring, logging, and more qualities of service.

Describing the SOA architectural style

You can adopt the architectural style that SOA supports by:
  • Breaking business processes up into repeatable business tasks or components.
  • Assembling the solution by snapping components together.
  • Becoming service-oriented.

What is a Service Orientation?

Building on the definition of a service, service orientation is a way of integrating your business as linked services and, more importantly, the outcomes that they bring.

What is SOA?


SOA is the IT architectural style that supports the service orientation thought process and makes it a reality.

Services are repeatable business tasks. Business processes are a series of services snapped together like building blocks. SOA is an architectural style that makes this possible.

SOA helps make building and adjusting composite applications fast and easy.


SOA in different Roles

Business Managers

SOA provides business managers with capabilities to expose a set of services to clients and partner organizations.

Business Architects

SOA is an architectural style that requires a service provider, requester, and a service description. It addresses characteristics such as loose coupling, reuse, and simple and composite implementations.

Implementation

SOA is a programming model complete with standards, tools, methods, and technologies such as Web Services.

Operations

SOA is a set of agreements among service requesters and service providers that specify the quality of service and identify key business IT metrics.

In the next articles we will continue to talk about SOA.



Source: VW003 - Introducing the Value and Governance Model of Service-Oriented Architecture, IBM Corporation, 2007.

Tuesday, July 16, 2013

REST - Pagination

Pagination is essential when retrieving information from webservices. Sometimes, we have scenarios like mobile applications where a large amount of data can bring problems.  This article aims to show how Facebook API deals with this, and also display an example of query string pagination using JAX-RS (Jersey) and JPA (Hibernate).

The Facebook's platform supports three types of pagination using query string: 

Cursor-based
  • before - This is the cursor that points to the start of the page of data that has been returned.
  • after - This is the cursor that points to the end of the page of data that has been returned.
  • limit - This is the number of individual objects that are returned in each page.

Time-based
  • until - A Unix timestamp or strtotime data value that points to the end of the range of time-based data.
  • since - A Unix timestamp or strtotime data value that points to the start of the range of time-based data.
  • limit - This is the number of individual objects that are returned in each page.

Offset-based
  • offset - This offsets the start of each page by the number specified.
  • limit - This is the number of individual objects that are returned in each page.
Example
This example will stick to the Offset-based pagination, but you can choose the one that fits your requirements.

@GET
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public List<Order> getOrders(
 @QueryParam("offset") Integer offset, 
 @QueryParam("limit") Integer limit){
  
 Query q = _em.createQuery("from Order");
 if(offset != null){
  q.setFirstResult(offset);
 }
 
 if(limit != null){
  q.setMaxResults(limit);
 }
 return (List<Order>) q.getResultList();
}

The URL to access this would be:
/** 
* This URL would return the limit of 20 orders starting from order number 20.
**/
http://www.ivanjunckes.com/resources/orders?offset=20&limit=20

The previous code shows a good path for doing pagination with REST and JAVA. However, there are some other ways of doing pagination, but this is a topic for another article.

See you later!

Source:
https://developers.facebook.com/docs/reference/api/pagination/