Cics Web 2.0 With Atom Feeds And Php - Presentation Transcript
CICS and Web 2.0 Tom Grieve [email_address]
Outline
What is Web 2.0 and what is a RESTful SOA?
Why is this relevant to CICS and CICS applications
How to use Atom to make CICS information available to more end-users
Outline
What is Web 2.0 and what is a RESTful SOA?
Why is this relevant to CICS and CICS applications
How to use Atom to make CICS information available to more end-users
What is Web 2.0 and what is a RESTful SOA?
What is Web 2.0*? Simple to use Simple to access
AJAX
Highly Interactive
Browser invoked services
JSON / XML / ATOM
Information exchange
JavaScript Friendly
REST
Easily invoked
HTTP-Centric Patterns
* A term coined by Tim O‘Reilly ( http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html )
What is Web 2.0?
From Wikipedia...
Web 2.0, a phrase coined by O'Reilly Media in 2003 and popularized by the first Web 2.0 conference in 2004, refers to a perceived second generation of web-based communities and hosted services — such as social-networking sites, wikis and folksonomies — which facilitate collaboration and sharing between users. O'Reilly Media titled a series of conferences around the phrase, and it has since become widely adopted.
Although the term suggests a new version of the World Wide Web, it does not refer to an update to Web technical specifications, but to changes in the ways systems developers have used the web platform. According to Tim O'Reilly, "Web 2.0 is the business revolution in the computer industry caused by the move to the internet as platform, and an attempt to understand the rules for success on that new platform."
(continued)
What is Web 2.0?
Advocates of the concept suggest that technologies such as weblogs, social bookmarking, wikis, podcasts, RSS feeds (and other forms of many-to-many publishing), social software, Web APIs, Web standards and online Web services imply a significant change in web usage. As used by its supporters, the phrase "Web 2.0" can also refer to one or more of the following:
the transition of web sites from isolated information silos to sources of content and functionality, thus becoming computing platforms serving web applications to end-users;
a social phenomenon embracing an approach to generating and distributing Web content itself, characterized by open communication, decentralization of authority, freedom to share and re-use, and "the market as a conversation";
enhanced organization and categorization of content, emphasizing deep linking;
a rise in the economic value of the Web, possibly surpassing the impact of the dot-com boom of the late 1990s.
Accessibility for Developers
A RESTful Web service is formed like a sentence – it simplifies how developers access services
Verb = HTTP Action (GET, POST, PUT, DELETE)
Noun = the URI of the Service (the document)
Adjective = MIME type of the resulting document
RESTful SOA
A RESTful SOA is an instance of SOA that uses concepts from the Web as the primary service architecture
Limiting choices to make it easier to implement a SOA
Primarily uses REST to represent and access services
Data is encoded as JSON or XML (including XML schemas like ATOM)
May use alternate approaches like JSON-RPC when appropriate
Supports Rich User Interfaces built using AJAX
Key aspects of building an effective RESTful SOA
Take advantage of your existing infrastructure wherever possible
Use well-established, ubiquitous technologies for scalability, performance and security
Build rich UI’s that run in any commodity browser
Make content simple and human readable
Where can a RESTful SOA apply?
When building Widgets for use in Mashups or RIA’s, or building feeds ( ATOM or RSS) for use in a browser or by an aggregator
When you want to make assets available to the web
In a form that it can be parsed by the widest range of technologies available
Where it may be consumed on either the client or server side
When the asset you are exposing is naturally resource-oriented
What’s the philosophical difference?
The key motivator of a RESTful SOA is its simplicity and its ubiquity
It’s about delivering content in the simplest possible way
HTTP is available everywhere; it’s like the air around us
With WS-* It’s not the body that matters, it’s the headers
WS-Security is about choice in the decision of encryption, identity tokens and digital signatures
WS-Addressing is about transport-neutral mechanisms of describing addresses
Even the WS-I standards are about allowing maximum flexibility within a fully agreed-upon framework of standards
You might want to choose WS* where you don’t have direct control of all the pipes.
WS-ReliableMessaging and SOAP over JMS are about choice in how you obtain qualities of service
Merging Enterprise SOA and RESTful SOA
If you take the route of developing for both Enterprise SOA and RESTful SOA then you can take advantage of two separate content pools
Services generated inside your enterprise
Services generated outside the enterprise
This gives you the best of both worlds and allows you to take advantage of all the communities served by your business
Services from Inside the Enterprise Services from outside the Enterprise New Content and New ways to reach Your communities
Attributes and advantages of a RESTful SOA
Simplicity
Many decisions pre-made, constrained choices
Fixed protocol (HTTP)
Fixed encryption model (HTTPs)
Fixed identity token exchange (Basic-Auth or standard HTTP schemes)
Ubiquity
Use the HTTP infrastructure and other technologies like JavaScript that already exist
Effortless use of services
Single, well-understood programming model (Javascript)
Lots of examples on the web
Copy-cut-and-paste programming to use services
Someone should be able to use a RESTful SOA Service without knowing they’re doing it!
Intuitive User Experience – using AJAX In the typical web application, each request causes a complete refresh of the browser page An Ajax application begins the same way. After the initial page loads, Javascript code retrieves additional data in the background and updates only specific sections of the page
AJAX is the acronym for A synchronous J avaScript a nd X ML
AJAX forces you to think about discrete services
Gives you a bottoms-up approach to defining services that can reveal new things about your enterprise
Service
XML, JSON and ATOM
XML is the standard representation for message format in RESTful services
The key difference from SOAP is that the XML represents only the body of a message
Thus a RESTful service will carry as its content only a simple, human-readable document that represents the “noun” of the service
JSON is an alternate standard format for succinct communication with AJAX clients
The vast majority of the clients of a RESTful service will be written in JavaScript
In recognition of that, JSON (JavaScript Object Notation) allows for rapid exchange of JavaScript objects, but also in a simple, human-readable format
JSON is built up from a collection of name-value pairs and ordered lists of values
ATOM is a key XML specification for content syndication
ATOM allows for better support for podcasting, updating, and extension than RSS provided
ATOM is also human readable and is easy to understand and parse
Extend your business processes
For your services to be useful they have to be reused; one of the key promises of a SOA is that it enables your enterprise for BPM
Many businesses act as though their business processes end at the corporate firewall; to take advantage of your business communities you need to extend your business processes out to your communities.
This entails several aspects
Make sure that you can expose your processes (and their results) to your communities
Make sure that you can consume RESTful services in your business processes
This is possible today through existing tools and RESTful approaches; but can be made simpler in future products and product releases
WebSphere sMash for quickly delivering Web 2.0 applications, and enabling mashups. WebSphere sMash
Improves developer productivity and efficiency through the support of dynamic scripting languages (Groovy and PHP)
Leverages Web 2.0 technologies for service invocation, service composition and data interchange
Visual tools for developers to build Widgets for use in Lotus Mashups
Outline
What is Web 2.0 and what is a RESTful SOA?
Why is this relevant to CICS and CICS applications
How to use Atom to make CICS information available to more end-users
Why is this relevant to CICS and CICS applications
What does this mean to CICS?
As far as CICS goes there are at least two ways that Web 2.0 can intersect with it:
Customers wanting to employ CICS apps as part of their Web 2.0 solution (CICS Customer Web 2.0)
Use of Web 2.0 technologies in the CICS portfolio of products and tools (CICS TS Web 2.0)
Elements of Web 2.0 that we ought to consider:
Enabling CICS apps in Mashups - typically browser or portal based aggregations
Enabling CICS apps to be Web Feeds
Encouraging the building of RESTful access to CICS applications
Using REST in our external APIs (e.g. systems management)
URLs, RESTful and tagging
“ Clean and meaningful URLs”
For everything!
REST
REpresentational State Transfer - See http://en.wikipedia.org/wiki/Representational_State_Transfer
How the Web has always worked...
HTTP POST|GET|PUT|DELETE are all the verbs you'll ever need
Everything else is a resource – with a representation of its state
Tagging
“ Remembering in public”
Associating audience-defined terms to things so that dynamic collections are formed
An example of CICS supporting a customer Web 2.0 application
CICS applications as Atom Feeds
Atom feeds provide access to data. CICS apps typically add some business level value over the top of raw database or file records.
Examples of what a feed could publish include:
New entries in file or table
Contents of a queue
... what else?
These in turn could have business value as new orders, new customers....
An illustration of what could be useful would be to provide an Atom feed that represents a Temp Stg queue. A CICS app then has a very simple way to populate a feed - simply write to the queue.
An example of CICS supporting a Web 2.0 application CICS COBOL APP EXEC CICS WRITEQ TS CICS TS v3 CICS Atom Server Simple HTTP application Atom (HTTP)
WEB 2.0 and ATOM
ATOM feeds are the basis for other Web 2.0 technology
Mashups, feed aggregators, blogs all support ATOM
Replaces previous RSS syndication standard
Comes in two flavours:
RFC4287 - Atom Syndication Format (2005)
Feeds and Entries
Targetted at producing feeds
RFC5023 - Atom Publishing Protocol (2007)
Services and Collections
Targetted to creating and updating resources
Using Atom Publishing Protocol to discover services and data AtomService Workspace Collection Entry <?xml version="1.0" encoding='utf-8'?> <service xmlns="http://purl.org/atom/app#"> <workspace title="My blog" > <collection title="My blog entries" href=" http://example.org/reilly/main " > <accept> entry </accept> </collection> <collection title="Pictures" href=" http://example.org/reilly/pic " > <accept> image/* </accept> </collection> </workspace> </service> Service Document Finding and filtering Returning refs to 'real' things <feed xmlns="http://www.w3.org/2005/Atom" xml:base="http://example.org/blog/entries"> <id>http://example.org/blog/entries</id> <title>My Blog Entries</title> <updated>2006-08-12T13:40:03Z</updated> <link rel="self" href="/blog/entries" /> <link href="http://blog.example.org" /> <entry> <id>tag:example.org,2006:/blog/entries/1</id> <title>Atom-Powered Robots Run Amok</title> <link href="http://example.org/2003/12/13/atom03"/> <link rel="edit" href="http://example.org/blog/entries/1" /> <updated>2006-08-12T13:40:03Z</updated> <author><name>James</name></author> <summary>Some text.</summary> </entry> <entry> ... </entry> ... </feed>
Create, Read, Update, Delete with Atom
HTTP defines the operations
POST to create entries and specific resources
GET to read
Service Documents
Collections
Specific resources
PUT to update entries and specific resources
DELETE to delete entries and specific resources
Create, Read, Update, Delete with Atom
HTTP defines the operations
POST to create entries and specific resources queue elements, records, rows, application objects,...
GET to read
Service Documents
Collections of entries on a queue, records in a file, rows in a table, application defined objects, ...
Specific resources queue elements, records, rows, application objects,...
PUT to update entries and specific resources queue elements, records, rows, application objects,...
DELETE to delete entries and specific resources queue elements, records, rows, application objects,...
Coping with lots of data
GET against a feed representing your customer database might return a very large number of entries!
Atom employs a simple, but powerful, paging scheme....
Why is this relevant to CICS and CICS applications
How to use Atom to make CICS information available to more end-users
How to use Atom to make CICS information available to more end-users
CICS and Atom on Transaction Server V3
To get early exposure, a SupportPac (CA8K)
Runs on CICS TS 3.1 and 3.2
Category 2
Released 20 th March 2008
Prereqs:
PTF UK34429 on CICS TS V3.1 or PTF UK34459 on CICS TS V3.2, for APAR PK58721
PTF UA31443 on z/OS V1.7, for APAR OA16303, or a later release of z/OS
See http://www.ibm.com/support/docview.wss?fdoc=aimcics&rs=1083&uid=swg24018619
Peter Havercan gave a teleconference entitled "Extending SOA and CICS with Web 2.0" on 11 June 2008. This teleconference explained how, with SupportPac CA8K, you can use existing CICS Web support facilities to deliver Atom feeds containing data from CICS.
To listen to the replay, go to http://www.ibm.com/software/os/systemz/telecon/11jun/index.html
Design for SupportPac CA8K
The resource to be published is specified in an XML configuration file
Only a portion of the CICS resource needs to be exposed as an ATOM entry
For example a single file record, or queue item, or a range of records or items
The selection of the resource portion is identified by the URL querystring:
0 comments
Post a comment