This webinar (done in December,2007) shows how the new Data Services capability in WSO2's Web Services Application Server can become a key component in your SOA/Data strategy. Using simple screens and a basic knowledge of SQL, any database programmer or administrator can configure and expose Data Services. As well as major databases such as Oracle, DB2 and MySQL, you can also extract data from Excel and CSV files.
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Adding Data into your SOA with WSO2 WSAS
1. Adding Data S ervices into
your S OA
with
WS O2 WS AS
G len Daniels
(g len@ ws o2.com)
&
S umedha R ubas ing he
(s umedha@ ws o2.com)
2. WS O2 B ackg round
●
Founded in August 2005 by leaders in XML and Web
services technologies & standards, and open source
●
Building complete SOA platform, all 100% open
source
●
Founders / leading contributors to all key Apache
Web services / SOA projects
●
Selling support, training and services around the
software & solutions
●
Global corporation with R&D center in Sri Lanka and
offices in US & UK, totaling 60+ employees
3. Today's Talk : Data S ervices
●
Data is the lifeblood of the Enterprise
– But too often it's trapped in batch-land
– Bottlenecks can delay realization of SOA
benefits
●
Service partitioning can confuse things
– Service objects don't “own” things like
“Customer”
●
An explicit Data Service layer is convenient and
effective
4. How C an Data S ervices Help?
●
Ability to access most up-to-date data using a
service call (brings you to the front of the wave)
●
Single layer for accessing all the data needs of your
SOA
●
QoS / Security pattern is identical for data
●
Optimization efforts will be available to all the
service consumers
●
Developer productivity – save time on developing
similar data access mechanism for different
applications
5. S umedha R ubas ing he
●
At WSO2 since Nov 2006
●
Deals w/both customers and code
●
Key contributor to Axis2, WSAS
●
Technical lead for Data Services
6. Problem
●
Data locked away in monolithic application silos
●
No unified away of accessing data
C halleng es
●
SOA demands access to data in heterogeneous data
sources
●
Business users does not differentiate between
application functionality or data access
●
Financial & budgeting constraints
7. Alternative approaches to data acces s in
a S OA
●
Direct access to databases (JDBC,ODBC,..etc)
●
Use of O/R mapping frameworks (Hibernate,
Ibatis,...)
●
Enterprise Java Beans (EJBs)
●
CORBA
●
Problem
– Each approach demands different way of
access
– Developer time spent on data access, rather
than implementing business functionality
●
Thus comes the need for Data services
8. Data S ervices in a nuts hell
A mechanism to take relational data locked away in
databases and make them available as WS-* style Web
services or as a set of REST style web resources
9. WS O2 Data S ervices , WS AS & Axis 2
●
WSAS is an enterprise ready web services application
server built on top of Axis2
●
Data Services run on top of WSO2 Web Services
Application Server (WSAS)
●
First appeared on WSAS 2.0
●
Growing feature list with every new release
●
Open source product
10. Data S ervices 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
12. Data S ervices Des cription Lang uag e
●
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
●
Let's see a simple example
13. S imple example
●
Expose a table in MySQL database as a service
●
Table Structure
TABLE Employees(
employeeNumber INTEGER,
lastName VARCHAR(50),
firstName VARCHAR(50),
extension VARCHAR(10),
email VARCHAR(100),
officeCode VARCHAR(10),
reportsTo INTEGER,
jobTitle VARCHAR(50));
●
Create a service to get contact information using
lastName
– ContactInfoService -> getContactInformation(String name)
24. S upported Data S ources
●
Relational Databases
– Any database accessible via JDBC
– Tables, views, stored procedures, functions
●
URL accessible Comma Separated Value (CSV) files
●
Microsoft Excel (97 – 2003) spread sheets
– operation per work book
●
Coming up
– Support for LDAP Trees
26. B uilt-in connection pooling
●
Apache DBCP as the built-in pooling manager
●
Greatly increases the performance
●
Ability to connect to
Data sources bound to
JNDI name
●
Use a pooling manager
of your choice
27. S ecuring your s ervices
●
WSAS supports WS-Security using Apache Rampart
●
Control who accesses your data services using user
name tokens
●
Transmit responses over HTTPS
28. 'Try It' for tes ting s ervices
●
Test your data services without leaving WSAS console
●
Ability to dynamically change the configuration & see
the results
29. WS AS Manag ement C ons ole
●
Monitor system usage
●
Statistics gathered include:
– Service usage
– Endpoint load
– Overall system performance
●
Enable tracing of a running system and capture
service level message traces
●
Configure system level logging and monitor logs
directly from the console
●
Monitoring via JMX
30. Many more features
●
Access Throttling
●
High availability via Clustering
– Tribes clustering module
●
Caching
●
Reliable Messaging
31. Advantag es
●
Portability
●
Unified access to heterogeneous data sources
●
Full WS-* stack support
●
Less hassle to DBAs – no need to open up database
over network
●
Very simple – even a DBA can configure it
●
Ability to optimize underlying queries with minimal
(or none) disruption to service consumers
●
Single layer to access data requirements of SOA –
optimization effects every consumer
32. G etting s tarted ...
●
Download WSAS (http://wso2.org/projects/wsas/java)
●
bin/wso2wsas.sh(bat)
●
Browse https://localhost:9443
●
Navigate to Services > Define Data Service
●
samples/DataServices
33. G etting s tarted ...
●
Many online resources on WSO2 Oxygen Tank
(wso2.org)
●
How to use MySQL 5 INOUT variables in Data Services? (http://wso2.org/blog/sumedha/3082)
●
How to call MySQL 5 Stored Function from Data Service? (http://wso2.org/blog/sumedha/3029)
●
How to call MySQL 5 stored procedure from Data Services?(http://wso2.org/blog/sumedha/2623)
●
How to call MySQL 5 view from Data Services? (coming up)
●
Data Service in 2 minutes - Movie (coming up)
●
Getting started with Data Services using Oracle (http://wso2.org/blog/sumedha/3051)
●
Getting started with Data Services using WSO2 WSAS-2.0 (http://wso2.org/blog/sumedha/2573) -
using Derby as database
●
Getting started with Data Service Samples - Movie (http://wso2.org/blog/sumedha/2590) - using
Derby as database
●
Mailing list (wsas-java-user@wso2.org)
34. Profes s ional S ervices & s upport
●
WSO2 is the leading provider of Open Source support
for Apache WS projects
●
With over 50 employees in three geographies we can
offer first class support
●
Range of support options up to 24x7 production
●
Support Backed by key Apache and OSS committers
●
More information - http://wso2.com/support/
36. S ummary
●
Service enable data locked away in relational
databases
●
Support for tables,views, functions & stored
procedures
●
Data Service Description Language
●
Not limited to RDBMS (CSV,EXCEL,...)
●
Improved QoS using WSAS capabilities
●
Professional support
37. Training s
●
Introduction to Data services (Tuesday 29th) from
9.00 am to 12.00 noon (PST)
●
Advance Data services (will be advertised in future)
●
Visit http://wso2.com/training/ for more
information
38. Future webinars
●
19th February
– Event Streaming Processing with WSO2 ESB &
Esper
●
Register now for the next one at
– http://wso2.on.raindance.com