01 web 2.0 - more than a pretty face for soa

55
Web 2.0 More than a pretty face for SOA Gabriele Pellegrinetti [email protected] http://www.tecnetdati.com

Upload: tecnet-dati-srl

Post on 07-Dec-2014

344 views

Category:

Documents


4 download

DESCRIPTION

Web 2.0 has brought new life to the Internet, providing a more interactive user experience that is comparable to fat client desktop applications. Web 2.0 introduces new types of services that are designed to share presentation and multimedia objects (presentation services) and give the ability to develop a new application by combining services from different sites or applications (e.g. through Mashups). One of the popular components of today’s Web 2.0 is Rich Internet Applications (RIAs). They include new features to process information and interactive user interfaces based on Ajax, Flex, JavaFX, Silverlight, etc. The user no longer has to wait for a new page to load whenever he makes a request; some information retrieval now happens asynchronously in the background while the user is interacting with the GUI, while other requests can be managed by logic that runs on the client without requiring calls over the Internet to the server side. However, what users see is merely a facade. It is powered by server-side distributed Business services that process data according to client requests. The question then becomes how services should be designed to support the requirements of RIA clients. We will look at RIA support services that are included in a SOA infrastructure and are managed through SOA governance tools.

TRANSCRIPT

Page 1: 01   web 2.0 - more than a pretty face for soa

Web 2.0 More than a pretty face for SOA

Gabriele Pellegrinetti

[email protected] http://www.tecnetdati.com

Page 2: 01   web 2.0 - more than a pretty face for soa

Agenda l  Web 2.0 – new opportunities are

knocking l  Enterprise 2.0 l  Web 2.0 and SOA l  Web mashups l  Rich Internet Application l  Web 2.0 architecture example l  Tools for web 2.0 development l  RIA and the REST vs. SOAP debate l  extend SOA for supporting Web 2.0

Page 3: 01   web 2.0 - more than a pretty face for soa

Web 2.0 misunderstanding

l  Web 2.0 is really one of the most misunderstood terms floating around the Internet at the moment

My  company  is  web  2.0  compliant…  …  We  have  developed  many  AJAX  frontend  for  our  data  wharehouse…    

My  new  web  2.0  applica?on  is  very  beau?ful…  dynamic  menus,  special  effects,  …      

Page 4: 01   web 2.0 - more than a pretty face for soa

Web 2.0 is not…

Page 5: 01   web 2.0 - more than a pretty face for soa

What is, really, web 2.0

http://en.wikipedia.org/wiki/Web_2.0

Page 6: 01   web 2.0 - more than a pretty face for soa

web as a participatory platform…

http://www.briansolis.com/

Page 7: 01   web 2.0 - more than a pretty face for soa

Community

… person-centered

Socializes

Socializes

Produces

Uses

Communicates

Communicates

Publishes

Sells Buy Publishes

Reading

Download

Socializes

Page 8: 01   web 2.0 - more than a pretty face for soa

Some Web 2.0 tools

Page 9: 01   web 2.0 - more than a pretty face for soa

New opportunity for the enterprise

l  Companies can use Web 2.0 tools for: u  Improve teamwork among employees u  Create a collective intelligence u  Share information quickly u  Increase productivity u  Creating a corporate identity u  Maximize the reuse of applications and

services u  Use knowledge in the network u  - ...

Page 10: 01   web 2.0 - more than a pretty face for soa

Enterprise 2.0

l  Enterprise 2.0 is the strategic integration of Web 2.0 technologies into an enterprise's intranet, extranet and business processes.

l  Enterprise 2.0 implementations generally use a combination of social software and collaborative technologies like blogs, RSS, social bookmarking, social networking and wikis.

l  Most enterprise 2.0 technologies, whether homegrown, free or purchased, emphasize employee, partner and consumer collaboration.

l  Such technologies may be in-house or Web-based. l  Companies using YouTube for vlogging or a private

Facebook group as a modified intranet, for instance, are implementing a form of Enterprise 2.0.

Page 11: 01   web 2.0 - more than a pretty face for soa

Enterprise 2.0 benefit

Organizational agility

Cost-­‐saving

Revenue generation

Customer satisfaction

Employee satisfaction

Cross-org collaboration

Innovation culture

Maslow’s ROI Hierarchy for Enterprise 2.0

Organizational agility

Measurability of benefits

Impa

ct o

n or

gani

zatio

nal s

ucce

ss

soft

hard

Page 12: 01   web 2.0 - more than a pretty face for soa

Web 2.0 and SOA

Page 13: 01   web 2.0 - more than a pretty face for soa

Web Mashups

mashup is like a puzzle

Page 14: 01   web 2.0 - more than a pretty face for soa

Mashups classification

Mashups

Client-Side Mashups Server-Side Mashups

l  Are  done  en?rely  within  the  browser.    

l  All  the  code  for  accessing  services,  integra?ng  data  or  execu?ng  and  communica?ng  between  components  is  done  locally  aEer  the  page  has  been  downloaded.  

l  Move  some  or  all  of  the  work  back  to  the  server,  leaving  just  the  rich  client  interac?ons  in  the  browser.  

l  In  reality,  there  will  probably  s?ll  be  calling  of  services  from  the  client  but  most  of  the  applica?on  logic  or  integra?on  is  done  on  the  server.  

Page 15: 01   web 2.0 - more than a pretty face for soa

Client-Side VS Server-Side

l  There  are  advantages  to  server-­‐side  work:  u   more  control  over    

p  Performance  p  Security  p  Monitoring  p  Governance  p  …  

u  the  ability  to  integrate  an  unlimited  set  of  data  types  and  formats  in  live  or  in  batch  fashion.  

Page 16: 01   web 2.0 - more than a pretty face for soa

Client-side mashups architecture

My web 2.0 application

Application Server

Business service

DB Server

Business service

Business service

HTTP

External Application 1

External Application n

External Application 2

Browser

JavaScript DOM

Mashups Integration and Presentation

Logic

Widget RSS XFBML

Page 17: 01   web 2.0 - more than a pretty face for soa

Some Client-side mashups technologies

…  and  m

ore  … Screen Scraping

manage Extract

Compose

Web 2.0 Widget

Feed

Feed aggregator

RSS

XML Transformation

XML Transformer

XML Data

XML Data

XML Data XSLT

Page 18: 01   web 2.0 - more than a pretty face for soa

Client-side Mashups and SOA Service

(*) one of several taxonomies found in literature

SOA Service Taxonomy (*)

Infrastructural Service Layer

Application Service Layer

Orchestration Layer (Busines Process)

Security Messaging Logging

Presentation Layer Mashups Orchestration

Presentation Services Widget RSS

The mashups can be configured as

presentation services

Page 19: 01   web 2.0 - more than a pretty face for soa

Server-side mashups architecture

My web 2.0 application

HTTP

External Application 1

External Application n

External Application 2

Browser

JavaScript

DOM

HTML

Application Server

Business service

DB Server

Mashups Presentation

Logic

Mashups Integration

Logic

Video Stream RSS API

Page 20: 01   web 2.0 - more than a pretty face for soa

Server-side mashups technologies

…  and  m

ore  … …  Most  client-­‐side  mashups  can  be  configured  to  

run  server-­‐side  … Web Services

Mashups Integration

Logic

What you want

ETL Extract

Transform

Load

Data Federation and Integration

Page 21: 01   web 2.0 - more than a pretty face for soa

Facility: on-line Mashups Editor Yahoo Pipes - http://pipes.yahoo.com

A  new  model  for  applica?on  development

Page 22: 01   web 2.0 - more than a pretty face for soa

Facility: Data Integration Tools

http://www.talend.com

Page 23: 01   web 2.0 - more than a pretty face for soa

Standard web application framework

Server side presentation component

(i.e. JSP, PHP,…)

Internal application logic and local code

Browser

Web Server

1 – http call 2 - execute

3 - call

DB 4 – access to DB

5 - data

6 – page rendering

7 – html

8 – show page

4 – access to external application and services

Page 24: 01   web 2.0 - more than a pretty face for soa

Web 2.0 application framework

Browser

Web Application Server

1 – http call

3 – html

HTML Page RIA Component

Basic page rendering component

Business Logic Services

DB 5 – access to DB and external

application and services

External Mashups External Mashups External Mashups

2 - get

4 - call

4b – integrate mashups

5b – integrate mashups

3

Page 25: 01   web 2.0 - more than a pretty face for soa

Example: architecture of a social forum

Custom  App  

Custom  App  

Custom  App  

Custom  App  

Custom  App  

...  

Web 2.0 application

Youtube  

Flickr  

TwiSer  

SlideShare  

Feed  ...  

Core  

DB  File  

System  

Service/API  Admin  Console  

Web  Applica?on                

Forum  

Tools  

Front-­‐end    for  External    App  

User

User

Admin

Page 26: 01   web 2.0 - more than a pretty face for soa

Example: architecture of a blog

Web 2.0 application

Youtube  

Flickr  

TwiSer  

SlideShare  

Feed  ...  

Core  

DB  File  

System  

Feed  service  interface  Web  Applica?on                

Blog  Admin  Console  

BLOG  User  Interface  

User

User

Blog owner

External  App   External  App  ...  

RSS ATOM

Page 27: 01   web 2.0 - more than a pretty face for soa

Example: facebook platform

http://developers.facebook.com/

Page 28: 01   web 2.0 - more than a pretty face for soa

Rich Internet Application

Page 29: 01   web 2.0 - more than a pretty face for soa

Advantages of RIAs over HTML-based sites

l  Context continuity  u  Responsiveness  u  Produc?vity  u  User  persistence    

l  Data-intensive user applications l  Embedded rich media l  Transitions and user guidance l  Rich user experience

u  Interac?vity  u  Rich-­‐control  (tree,  paginated  table,  drag&drop,…)  

l  The power of stand-alone application in a web page l  …

Page 30: 01   web 2.0 - more than a pretty face for soa

RIA Technologies – AJAX Framework (1)

l  Ajax: Asynchronous JavaScript and XML l  With Ajax, web applications can retrieve data from the server

asynchronously in the background without interfering with the display and behavior of the existing page.

l  The use of Ajax techniques has led to an increase in interactive or dynamic interfaces on web pages.

l  The following technologies are required: u  HTML  or  XHTML  and  CSS  for  presenta?on  u  the  Document  Object  Model  for  dynamic  display  of  and  interac?on  with  data  u  XML  and  XSLT  for  the  interchange,  and  manipula?on  and  display,  of  data,  

respec?vely  u  the  XMLHSpRequest  object  for  asynchronous  communica?on  u  JavaScript  to  bring  these  technologies  together  

l  Despite the name, the use of XML is not actually required, nor do the requests need to be asynchronous.

Page 31: 01   web 2.0 - more than a pretty face for soa

RIA Technologies – AJAX Framework (2)

Page 32: 01   web 2.0 - more than a pretty face for soa

RIA Technologies – plugin-based framework

l  three main technologies  u  MicrosoE  Silverlight  u  JavaFX  u  Flash  Based  (Adobe  Flex,  OpenLazlo)    

l  A runtime is required u  Silverlight  àMicrosoE  RIA  run?me  u  JavaFX  àJava  Virtual  Machine  u  Flex  à  Adobe  Flash  Player  /  Adobe  AIR  

l  The main target is the development of multimedia applications u  high  quality  graphics  u  special  effects  u  audio  and  video  streaming  u  Anima?ons  u  …  

l  require more memory and >CPU than AJAX application l  High performance

Page 33: 01   web 2.0 - more than a pretty face for soa

RIA Technologies – the new HTML 5

l  HTML 5 is the next revision of the Hypertext Markup Language (HTML). l  HTML 5 will allow the Web browser to become a development platform. l  A primary goal for HTML 5 is to ensure interoperability among browsers so that Web

applications and documents behave the same way no matter which HTML 5-compliant browser is used to access them

l  HTML 5 is expected to offer numerous improvements over HTML 4, including: u  New  tag  u  New  parsing  rules  for  enhanced  flexibility  u  New  aSributes  u  Elimina?on  of  outmoded  or  redundant  aSributes  u  Immediate-­‐mode  drawing  u  Drag  and  drop  and  orther  RIA  features  u  Back  buSon  management  u  Timed  media  playback  u  Offline  edi?ng  u  Messaging  enhancements  u  Detailed  rules  for  parsing  u  MIME  and  protocol  handler  registra?on  u  …  

Page 34: 01   web 2.0 - more than a pretty face for soa

… but the presentation is only the surface …

l  the user sees: u  Graphically  advanced  applica?ons  u  Powerful  mul?media  capabili?es  u  Fast  and  responsive  user  interfaces  u  …  

l  but the  presenta?on  logic  of  mashups  and  RIAs  is  only  the  surface  l  …  behind  it  are  complex  business  and  data  integra?on  logic  …  l  …that  may  be  exposed  as  services…  l  …services  can  be  put  in  a  SOA  infrastructure…  l  …service  may  be  governed  by  “SOA  Governance”  l  …  

Server Side

RIA Presentation

RIA Presentation

Business Logic

Integration Logic service

Page 35: 01   web 2.0 - more than a pretty face for soa

Service… service… service… service…

Feed  

Web 2.0 app

Web 2.0 app

Web 2.0 app

Web 2.0 app

Mashups

Web 2.0 app

RIA

Web 2.0 app

Mashups RIA

Standard Application SOAP

JSON

API

Page 36: 01   web 2.0 - more than a pretty face for soa

RIA – communication protocol

l  In  order  to  communicate  over  networks  we  need  standardized  data  formats  and  protocols.    

l  But  how  do  we  move  forward  toward  this  goal?    l  One  popular  debate  centers  around  the  best  way  to  define  new  data  formats.    

l  XML  dominates  this  area  for  many  years  and  so  the  primary  ques?on  leE  is  how  and  whether  to  use  schemas  and  if  so,  what  schema  language  to  use.  

l  In  web  2.0  applica?on,  the  debate  is  mainly  about  choosing  between  WS-­‐*  and  REST  web  services  

Page 37: 01   web 2.0 - more than a pretty face for soa

WS-* webservices…

simplified view of the WS-* stack

Page 38: 01   web 2.0 - more than a pretty face for soa

WS-* webservices… full view

http://www.infoq.com/news/2007/03/innoq-ws-standards-poster

Page 39: 01   web 2.0 - more than a pretty face for soa

WS-* are the best choise… or no?

l  The main advantages of WS-* web services are: u  Based  on  standard  u  Easy  to  consume  u  Rigid  –  type  checking,  adheres  to  a  contract  u  Development    tools    and  facili?es  u  All  vendor  support  them  u  …  

l  …  but  JavaScript  have  problems  with  WS-­‐*:  u  Requires  complex  DOM  programming  u  Requires  a  lot  of  network  bandwidth  u  WS-­‐*  standards  are  incomplete  or  poorly  supported  u  introduces  cross-­‐browser  compa?bility  issues  u  …  

So ... what can we do?

Page 40: 01   web 2.0 - more than a pretty face for soa

The REST alternative

l  REST (Representational State Transfer) is a term coined by Roy Fielding in his Ph.D. dissertation to describe an architecture style of networked systems

l  REST is not a standard. You will not see the W3C putting out a REST specification. Why? Because REST is just an architectural style.

l  While REST is not a standard, it does use standards: u  HTTP    u  URL/URI    u  XML/HTML/GIF/JPEG/etc  (Resource  Representa?ons)    u  text/xml,  text/html,  image/gif,  image/jpeg,  etc  (MIME  Types)  

REST Ful REST Like REST

Page 41: 01   web 2.0 - more than a pretty face for soa

RESTFul web services

l  It  is  a  collec?on  of  resources,  with  three  defined  aspects:  u  the  MIME  type  of  the  data  supported  by  the  web  service.  This  is  oEen  

JSON,  XML  or  YAML  but  can  be  any  other  valid  MIME  type.  u  the  base  URI  for  the  web  service,  such  as  hSp://example.com/resources/  

u  the  set  of  opera?ons  supported  by  the  web  service  using  HTTP  methods  (e.g.,  POST,  GET,  PUT  or  DELETE).  

l  The  following  table  shows  how  the  HTTP  verbs  are  typically  used  to  implement  a  web  service.  

Page 42: 01   web 2.0 - more than a pretty face for soa

RESTLike web services

l  Many  systems  are  not  fully  resjull.  For  example:  u  Use  only  GET  and  POST  methods  u  Do  not  use  the  mimetypes  u  Use  a  parameter  to  specify  an  ac?on  to  perform  u  ...  

l  most  of  the  framework  for  developing  WS-­‐*  services  is  able  to  expose  RESTLike  services.  

WS-* Framework

Service Implementation

SOAP

REST

WS-* client

REST client

WSDL

Page 43: 01   web 2.0 - more than a pretty face for soa

What data format for REST?

REST

TEXT XML

JSON

YAML

CSV

Other  mimetype  defined  format

Page 44: 01   web 2.0 - more than a pretty face for soa

JSON: the best choice?

l  JSON (JavaScript Object Notation) is a lightweight data-interchange format.

l  It is easy for humans to read and write. l  It is easy for machines to parse and generate. l  It is based on a subset of the JavaScript Programming Language l  JSON is a text format that is completely language independent but

uses conventions that are familiar to programmers l  These properties make JSON an ideal data-interchange language. l  JSON is built on two structures:

u  A  collec?on  of  name/value  pairs.  In  various  languages,  this  is  realized  as  an  object,  record,  struct,  dic?onary,  hash  table,  keyed  list,  or  associa?ve  array.  

u   An  ordered  list  of  values.  In  most  languages,  this  is  realized  as  an  array,  vector,  list,  or  sequence.  

Page 45: 01   web 2.0 - more than a pretty face for soa

JSON Example

Page 46: 01   web 2.0 - more than a pretty face for soa

Putting it all together

Page 47: 01   web 2.0 - more than a pretty face for soa

Extending SOA for web 2.0

Extensions

SOA Infrastructure

Support of new

protocol

Support of new type of

services

Support of mashups

Extending governance

Page 48: 01   web 2.0 - more than a pretty face for soa

Support of new protocol and standard

l  ESBs are extended to support: u  Mashup  u  REST  protocols  u  Web  2.0  paSerns  

ESB

Web  2.0  client  

Web  2.0  client  

Web  2.0  client   …  

SERVICE   FEED   Web  2.0  app   …  

JSON RSS STREAM

XML HTTP STREAM

Extension for mashups

Page 49: 01   web 2.0 - more than a pretty face for soa

Introducing mashups pattern

Page 50: 01   web 2.0 - more than a pretty face for soa

Mashups pattern example – feed factory

Page 51: 01   web 2.0 - more than a pretty face for soa

Mashups pattern example – super search

Page 52: 01   web 2.0 - more than a pretty face for soa

Governance for web 2.0 services

l  Web 2.0 services and mashups (presentation services) can be managed through SOA governance u  Inventory  of  services  u  Insert  mashups  in  Services  

Lifecycle  u  Tracking  web  2.0  services  u  Extending  the  Service  Contract  u  Build  Guidelines  and  best  

prac?ces  to  design  and  develop  Mashups  and  web  2.0  services  

u  …  

Page 53: 01   web 2.0 - more than a pretty face for soa

Web 2.0 and service contract

Page 54: 01   web 2.0 - more than a pretty face for soa

Question and answer

Page 55: 01   web 2.0 - more than a pretty face for soa

thanks for your attention

Tecnet Dati s.r.l. Corso Svizzera 185

10149 – Torino Italy

http://www.tecnetdati.com

[email protected]