moulding your enterprise with roa

32
Moulding your Enterprise with Resource Oriented Architecture Shiroshica Kulatilake Solutions Architect WSO2

Upload: shirok

Post on 14-Apr-2017

104 views

Category:

Technology


0 download

TRANSCRIPT

Moulding your Enterprise withResource Oriented Architecture

Shiroshica KulatilakeSolutions ArchitectWSO2

Agenda

• Needs of a Connected Enterprise• Resource Oriented Architecture - Concepts• How Resource Oriented Architecture complements

a Connected Enterprise• Building a Resource Oriented Enterprise

Architecture with WSO2

Fulfilling the Needs of a Connected Enterprise

Needs of a Connected Enterprise

• Distributed– Built on many interactions utilizing strengths of the

connected network– Connects across several boundaries

• Ubiquitous– Accessible via many end devices– Accessible from any location– Use of public modes for access e.g. Web

• Agile– Flexible interacting with multiple partners– Flexible in adapting to changing requirements– Time to market is very low

How would an Enterprise Achieve these Needs

By creating an Enterprise Architecture Vision

Defining Enterprise Architecture

An enterprise architecture (EA) is a conceptual blueprint that defines the structure and operation of an organization.

The intent of an enterprise architecture is to determine how an organization can most effectively achieve its current and future objectives.

From an Enterprise Architect’s POV

• Distributed– Integrate seamlessly with existing and new systems

– Ease of creating new services and composites

– Ease of exposing created services in a secure manner

• Ubiquitous– Ease of accessing exposed services in a secure manner– Create applications/mashups which are lightweight– Make use of common Web Technology

• Agile– Easy to learn and use technology – Able to design and build in a short time period

Defining an Enterprise Architecture

Resource Oriented Architecture- The Concepts

Resource Oriented Architecture

• Each and every interactable item in an enterprise is represented as a Resource

• Representational State Transfer (REST) is the pattern which is used to achieve this

• The complete system is modeled in a logical manner• Loose Coupling is advocated• State is determined based on the actions performed

on the resources and the representations

ROA : Unique Naming

• Resource names are unique in a global context• URL is the unique identifier in ROA• URL = URN + Context information

– http://wso2.com/customers/apac/1123

• It will have the context (where) plus the unique key

ROA : Logical Representation

• The URL will be an indefinite constant since clients depend on this

• It should not include – Implementational details

• http://wso2.com/customer.jsp?id=1123– Contractual information

• http://wso2.com/customers/apac/v1/1123

• Meta information can be added as parameters to the URL which would add more context and flexibility – http://wso2.com/customers/apac/1123?version:v1

• Self explanatory

ROA : Uniform Interfaces

• Accessing the resources should follow the same pattern– Action : Uniform Identifier

• ROA is based on REST which is powered by HTTP• For all resources the interface methods used are the

same– GET (Query), POST (Create), PUT (Update), DELETE (Remove)

– curl GET http://wso2.com/customers/apac/1123

• Uniform interfaces makes dealing with these resources much simpler for clients

ROA : Freedom of Form

• A resource can have many representations• Representation is independent of the name• The form should be defined in the HTTP request

header– curl -H “Accept: application/json” -O http://wso2.com/customers/apac/1123

• The Client has total control• The server simply responds with the information in

the required representation

ROA : Loose Coupling

• The client is only bound to the URL and Resource details that it received and not to the server

• Server implementation is independent and thus can be refactored when needed provided it sends out the same resource details

• Resource does not have any implementation specifics

ROA : Late Binding

• The first call may not provide the actual resource - but simply a collection with metadata– curl -H “Accept: application/json” -O http://wso2.com/customers/apac/– [“http://wso2.com/customers/apac/1123” , “http://wso2.

com/customers/apac/1126”]

• It would be subsequently that the actual resource is requested

• This enables the ability to do fine grained access control

ROA : HATEOAS

• Hypermedia As The Engine of Application State • Application state is transferred with the responses • Application state is transferred via links• The Client needs to

– interact with the server only via hypermedia

– figure out possible actions through the resource representation sent

GET http://wso2.com/customers/apac/1123

{

“name” : “Alice Grey”,

“ID” : 1123,

“promote”: “http://wso2.com/customers/apac/1123/promote”

}

When to use Resource Oriented Architecture

• Systems which have clearly defined entities, which have clear associations and can be logically modeled

• Systems which will evolve rapidly– Growth in entities– Change in server implementation

• Systems where the client needs to use lightweight web technologies

• Systems which can be developed quickly

ROA in a Connected Enterprise

• Distributed– Multiple entities(Systems and Things) with context and

association– Loosely coupled – Not bound to contracts / services– Can evolve easily into a large ecosystem

• Ubiquitous– Works on technology that supports ubiquity– Secure - OAuth, OpenID Connect– Lightweight with low overhead

• Agile– Easy to design – Simple yet powerful technology

Building a Resource Oriented Architecture with WSO2 Products

Steps to Build a Resource Oriented Enterprise Architecture• Identify the entities (nouns) in the system and their

relationships– Design the resources– Design the access methods (which verb action)– Determine security

• Identify how state can be represented via responses– Define additional resources plus links for state

• Design granularity – Determine metadata for resources– Identify security at each level of granularity

• Implement with REST

What does WSO2 offer ?

Platform of Platforms

Platforms which are well Integrated

Expose Base Services

- SOAP services- REST services

- REST services - SOAP services- REST services- OData services

Integrate Systems and Data

Expose Managed APIs

Provide Tools to Manage

Summary

• ROA in essence would be considering all entities as resources which are connected in a logical manner

• With ROA an enterprise can aim to be distributed, ubiquitous and agile

• Fits in well with the needs of a Connected Enterprise

• WSO2 middleware is capable of moulding your enterprise to be a connected one !

References

1. http://searchcio.techtarget.com/definition/enterprise-architecture2. http://inspire.ec.europa.

eu/reports/ImplementingRules/network/Resource_orientated_architecture_and_REST.pdf

3. http://www.infoq.com/articles/roa-rest-of-rest4. http://wso2.com/library/webinars/2015/09/resource-oriented-

architecture/5. https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.

htm6. http://wso2.com/library/webinars/2015/12/wso2-year-end-technical-

update-webinar/

Thank You