01 web 2.0 - more than a pretty face for soa
-
Upload
tecnet-dati-srl -
Category
Documents
-
view
344 -
download
4
description
Transcript of 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
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
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, …
Web 2.0 is not…
What is, really, web 2.0
http://en.wikipedia.org/wiki/Web_2.0
web as a participatory platform…
http://www.briansolis.com/
Community
… person-centered
Socializes
Socializes
Produces
Uses
Communicates
Communicates
Publishes
Sells Buy Publishes
Reading
Download
Socializes
Some Web 2.0 tools
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 - ...
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.
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
Web 2.0 and SOA
Web Mashups
mashup is like a puzzle
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.
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.
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
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
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
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
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
Facility: on-line Mashups Editor Yahoo Pipes - http://pipes.yahoo.com
A new model for applica?on development
Facility: Data Integration Tools
http://www.talend.com
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
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
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
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
Example: facebook platform
http://developers.facebook.com/
Rich Internet Application
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 …
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.
RIA Technologies – AJAX Framework (2)
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
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 …
… 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
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
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
WS-* webservices…
simplified view of the WS-* stack
WS-* webservices… full view
http://www.infoq.com/news/2007/03/innoq-ws-standards-poster
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?
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
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.
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
What data format for REST?
REST
TEXT XML
JSON
YAML
CSV
Other mimetype defined format
…
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.
JSON Example
Putting it all together
Extending SOA for web 2.0
Extensions
SOA Infrastructure
Support of new
protocol
Support of new type of
services
Support of mashups
Extending governance
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
Introducing mashups pattern
Mashups pattern example – feed factory
Mashups pattern example – super search
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 …
Web 2.0 and service contract
Question and answer
thanks for your attention
Tecnet Dati s.r.l. Corso Svizzera 185
10149 – Torino Italy
http://www.tecnetdati.com