Upload
wso2
View
1.902
Download
0
Tags:
Embed Size (px)
DESCRIPTION
This presentation at the AFITC 2009 (Air Force Information Technology Conference, August 24 - 27, 2009), Montgomery, Alabama by Sumedha Rubasinghe presents Open Source Data Services for strategic SOA utilising WSO2 Data Services Server.
Citation preview
Open Source Data Services for Strategic SOA
utilisingWSO2 Data Services Server
Sumedha Rubasinghe2009 Air Force Information Technology Conference
Montgomery, Atlanta
Agenda
SOA & Enterprise Data Need for SOA Data Services Introduction Features Architecture Use Cases Getting started & help
Hi.. Mattson here.. I am an architect
Introducing Mattson ...
My manager wants to see salary incrementsdone in HRM system to bereflected in Payroll....
These systems do notsupport a programmable interface..
Oh..Payroll system is usingan Informix database whileHRM writes to a MSSQL database...
Another scenario
Build a Travel Expense Management System HRM – MSSQL Training Mgt – Spreadsheet Payroll - Informix
Ways of solving
Method 1– Create a new data store
– Pull relevant data from HRM, Payroll & Training Mgt Systems
– Store it to match new application’s requirements
– Now comes another application…
– More overhead
– Redundant data• Inconsistency• Update anomalies
Ways of solving (contd..)
Method 2– Connect to 3 data sources & extract data– Three different access mechanisms
Data access mechanisms
Direct access to databases (JDBC,ODBC,..etc)
�
Use of O/R mapping frameworks (Hibernate, Ibatis,...)
�
Enterprise Java Beans (EJBs)
�
CORBA Custom APIs
Positioning of data access code..
Application developers like to deal with business process related logic
Changes in data source configuration Should be transparent to application logic Should have minimal (if not any) effect on business
logic
Method 2
Concerns− Data access code VS business logic implementation− Difficult to reuse− Difficult to maintain− Difficult to test− Error prone
Ways of solving... (contd)
Method 3− Single layer to fulfill enterprise data access
requirements (Data Services)Governed by,
− More and more data being generated− Growing demand for consolidated, consistent
information− Mashups− Interoperability & standards
Data Services?Tell me about it...
Data Service ?
Well defined request/response formatEncapsulates data oriented logicLoose coupling (application & data store)Data store specific configurationsManagement & QoS features
WSO2 Data Services Server
Simple Example
Expose Employee Contact data in a MySQL database table as a data service
Table Structure
GUI Wizard
Data Service Configuration<data name="ContactInfoService"> <config> <property name="org.wso2.ws.dataservice.driver">com.mysql.jdbc.Driver</property> <property name="org.wso2.ws.dataservice.protocol">jdbc:mysql://localhost:3306/dataservice_sample</property> <property name="org.wso2.ws.dataservice.user">dsuser</property> <property name="org.wso2.ws.dataservice.password">user123</property> <property name="org.wso2.ws.dataservice.minpoolsize">1</property> <property name="org.wso2.ws.dataservice.maxpoolsize">5</property> </config>
<query id="contactInfoQuery"> <sql>select firstName,lastName,extension,email from employees where lastName = ?</sql> <param name="name" sqlType="STRING" /> <result element="Employees" rowName="ContactInfo"> <attribute name="LastName" column="lastName" /> <element name="FirstName" column="firstName" /> <element name="Extension" column="extension" /> <element name="Email" column="email" /> </result> </query>
<operation name="getContactInformation"> <callquery href="contactInfoQuery" > <withparam name="name" queryparam="name" /> </callquery> </operation></data>
Data Services Description Language
In-house developed language for writing data services
Maps service requests to your SOA to queries operating on your database objects (tables, views, procedures & functions)
Maps query results to XML responses Available online @
http://wso2.org/wiki/display/wsf/Data+Services+and+Resources
WSDL for the servicehttp://<IP>:<PORT>/services/ContactInfoService?wsdl
How to access a data service?
Multiple Data Source support
Secure Channel
Transformation
Federation
Caching
High availability
Throttling
Architecture
Challenges RDBMS – specific or generic JDBC drivers Directories – specific drivers, API Flat files, Spread sheets – different APIs Different data types Access control mechanisms
Architecture
Data Services are SOA equivalent of the Data Access Object(DAO) Pattern
DS deal with different data sources similar to what DAO does
But, DS operate on a different layer
How to access a data service?
Accessing a data service – Java Client
Accessing a data service – REST
http://198.18.191.140:9763/services/DataServiceSample1/employeesByNumber/1001
Accessing a data service – Try It
Monitoring
– Monitor System statistics– Running logs– Message Tracing– Dynamically configurable Logger– Exposes statistics via JMX– Dashboard – Google Gadgets
Use Case 1
A mashup/ javascript/ Google Gadget wants to access data in a backend database
Use Case 2
Re-using existing Master Data
Use Case 2
Use Case 3
Master Data Update
Use Case 3
Use Case 4
Content filtering based on logged in user
Use Case 4
Use Case 5
Service enabling enterprise data
Use Case 6
Integrating with an external system
Use Case 6
Use Case 7
WSO2 Product Platform
That's lot of information...Now I would like to try these out myself. How do I get started?
How to get started?
Download binary distribution from – http://wso2.org/projects/data-services-server/java
Latest is v2.0 Unzip
• Run bin/wso2server.sh (on Unix) or bin/wso2server.bat (on Windows)
• Management console– https://localhost:9443/carbon
– admin/admin
Help.. I messed it up...
How to get help?
Online forum(http://wso2.org/forum/404)
Mailing list ([email protected])
Active community of external users Ample free documentation on wso2.org If needed, we provided commercial support on
– Getting started
– Deployment
– Custom development
– Production support
I would like to have some URLs for reference.
Useful references
WSO2 Oxygen Tank for Web Service Developers– http://wso2.org
Data Services HOWTOs Page
– http://wso2.org/library/3183 WSO2 Data Services project page– http://wso2.org/projects/data-services-server/java
Summary
•Introduced WSO2 Data Services•Features•Use cases•Getting started
Thank [email protected]
(on behalf of WSO2 DS team)