Lessons Learned Implementing Object Databases

Download Report

Transcript Lessons Learned Implementing Object Databases

Object Storage
Past, Present, and Future
Douglas K. Barry
Principal
Barry & Associates, Inc.
13504 4th Avenue South
Burnsville, Minnesota 55337 USA
voice: +1-952-892-6113
fax: +1-952-892-5966
email: [email protected]
web: http://www.barryandassociates.com
Full disclosure

Background
• Training and industry practice in relational DBMSs
• Got involved in object DBMS technology in 1987

Current Practice
• Consultant in the area of selecting object DBMS
and object-relational mapping products
• Serve as the Executive Director of the Object
Data Management Group (ODMG)
Barry & Associates, Inc.
We will cover ...

Why object storage started the way it did

What is the current state of the industry

What impacts good object storage decisions

What distinguishes current object storage products

What will happen with object storage in the future

What standards will be important

What will characterize the major players in object
storage
Barry & Associates, Inc.
Why object storage started the
way it did

Need for high performance on complex data

Need for multi-user database access to
replace flat file single-user systems

Computer-Aided Design (CAD) drove many
of the requirements
Barry & Associates, Inc.
Complex data

often lacks unique,
natural identification

often has a significant
number of many-tomany relationships

often requires
traversing a graph
structure in the
application(s)
Barry & Associates, Inc.
Why not relational DBMSs?

Provided the desired multi-user database
access

But performance was terrible on complex
data
Barry & Associates, Inc.
Why performance was terrible
Objects in the
application
Server
Client
Impedance
mismatch
Tuples stored on disk
Barry & Associates, Inc.
Model mapping
Object
Application
Model
Mapping
DBMS
Server
Object programming
language uses one data
model (object model)
Model mapping translates
the two data models
DBMS server uses another
data model (relational model)
Barry & Associates, Inc.
C++ entered the scene




Object-oriented languages existed for some
time
The most notable language was Smalltalk
Others included Lisp (CLOS), Objective-C,
and Eiffel
C++, however, captured the market
Barry & Associates, Inc.
C++ binding for object DBMSs
Objects in the
application
Server
Client
No impedance
mismatch
Objects stored on disk
Barry & Associates, Inc.
C++ binding for object DBMSs






Possible to store any C++ data structure
directly with no mapping code
One model for both the application and
database
No impedance mismatch
Cache management
Performance was 100 to 1000 times faster
the relational DBMSs on complex data
Less code to write -- lower development costs
Barry & Associates, Inc.
Object DBMS cache management
Object
Application
Cache
DBMS
Server
Object programming
language uses an object
model
Cache management is
part of the binding with no
model mapping
DBMS server uses the same
object model as the object
programming language
Barry & Associates, Inc.
Object DBMSs use







Aerospace
Design
Financial
Manufacturing
Publication
Telecommunications
Transportation
Barry & Associates, Inc.
Object DBMS market size
1600
1400
$ Millions
1200
1000
800
600
400
200
0
1998
1999
2000
2001
2002
2003
2004
2005
Compound Annual Growth Rate (1998-2005): 46.9%
Source: Frost & Sullivan, www.frost.com
Barry & Associates, Inc.
Effect of Y2K on object DBMS
market



1998 and 1999 were low-growth years for
object DBMS products
A significant portion of new development
money went into Y2K fixes during these years
This had a major impact on the object DBMS
market since object DBMSs are primarily
used for new development
Barry & Associates, Inc.
What is the current state of the
industry





Relational DBMSs have maintained their
market
The relational DBMS market has effectively
become the object-relational market
Object DBMSs have exhibited a healthy
growth rate
Large disparity between market size for
Object DBMSs and Relational market
XML is entering the scene
Barry & Associates, Inc.
And Java has entered the scene

Significant use in new development

Created new demands for object storage
options
Barry & Associates, Inc.
And XML has entered the
scene


XML model is basically an object model
And like Java, XML has:
• Significant use in new development
• Created new demands for object storage options
Barry & Associates, Inc.
XML
<?xml version="1.0"?>
<?xml-stylesheet href="catalog.xsl" type="text/xsl"?>
<!DOCTYPE catalog SYSTEM "catalog.dtd">
<catalog>
<product description="Cardigan Sweater"
product_image="cardigan.jpg">
<catalog_item gender="Men's">
<item_number>QWZ5671</item_number>
<price>39.95</price>
<size description="Medium">
<color_swatch image="red_cardigan.jpg">Red</color_swatch>
<color_swatch image="burgundy_cardigan.jpg">Burgundy
</color_swatch>
</size>
<size description="Large">
<color_swatch image="red_cardigan.jpg">Red</color_swatch>
<color_swatch image="burgundy_cardigan.jpg">Burgundy
...
Barry & Associates, Inc.
XML is complex data

some nodes lack
unique, natural
identification

has a significant
number of many-tomany relationships

requires traversing a
graph structure in the
application(s)
Barry & Associates, Inc.
Java and XML are going to
drive object storage



Java appears to be the language of choice for
new development
XML will be used more extensively as time
goes on
The Java and XML object models will drive
the need for efficient object storage –
particularly in the middle tier
Barry & Associates, Inc.
Three-tier or n-tier architecture
Internet
XML
Middle tier
XML and Java
Bottom tier
Existing data
Barry & Associates, Inc.
Object storage growth will be
primarily in the middle tier
Internet
Middle tier
Bottom tier
XML
XML and Java
Existing data
Barry & Associates, Inc.
Middle-tier object storage
options

Object DBMSs (ODBMSs)

Object-relational mapping (OR Mapping)

Relational DBMSs (RDBMSs)

Native XML DBMSs
Barry & Associates, Inc.
What impacts good object
storage decisions



Need to know your application needs –
especially the nature of your data and how
you will use the data
Need to study the features of the various
products
Need to analyze how the features of products
fit or modify your application needs
Barry & Associates, Inc.
What distinguishes current
object storage products

Object DBMSs (ODBMSs)

Object-relational mapping (OR Mapping)

Relational DBMSs (RDBMSs)
Barry & Associates, Inc.
Object DBMSs

Object
Application
Cache



DBMS
Server


Tight binding with object
programming language
Application cache (some
also have a server cache)
No model mapping
DBMS and application
use same model
Highest performance on
complex data
Lowest development cost
Barry & Associates, Inc.
Object-relational mapping

Object
Application
Cache
Model
Mapping
DBMS
Server





Tight binding with object
programming language
Application & server
cache
Model mapping
DBMS and application
use different models
Moderate performance
on complex data
Moderate development
cost
Barry & Associates, Inc.
Relational DBMSs

Object
Application
Model
Mapping



DBMS
Server


Loose binding with
object programming
language
No application cache
Model mapping
DBMS and application
use different models
Lowest performance on
complex data
Highest development
cost
Barry & Associates, Inc.
More on model mapping
Barry & Associates, Inc.
Product classification summary
Product Type Performance on
complex data
Development Cost
ODBMSs
Highest – there is
Lowest – there is only
caching and no model one model
mapping
OR Mapping
Moderate – cost of
model mapping
depends on ratio of
reads to writes
Lowest – model
mapping and no
caching
RDBMSs
Moderate – model
mapping is separate
from application
Highest – model
mapping is not
separate from
application
Barry & Associates, Inc.
Consider ODBMSs when...

You have a new application that needs high
performance on complex data
• 10 to 1,000 times faster than relational DBMSs
depending on data complexity
• Allows for lower hardware costs to achieve
performance

You have a new application, but the data is
not necessary complex
• Allows for reduced development costs
Barry & Associates, Inc.
Consider OR Mapping when…


You have a new application that uses existing
data from one or more existing databases
You have a new application that uses
complex data, that has a high read to write
ratio
• Need to 10 to 100 reads of an object for every
write to meet performance of ODBMSs, or
• Plan on running with more powerful hardware to
meet the performance of ODBMSs
• Higher development costs than with ODBMSs
Barry & Associates, Inc.
Consider RDBMSs when...


You want to add some object characteristics
to an existing application/database to improve
performance
You want to develop a new application, but
your data is not complex
• Development cost, however, is higher than with
ODBMSs or OR Mapping products since you will
have more code to write
• Nevertheless, you probably have people who are
familiar with the RDBMS on staff
Barry & Associates, Inc.
Some architectural options
Internet
Middle tier
XML and Java
Bottom tier
Barry & Associates, Inc.
Options for new data
Middle tier
Object DBMS
RDBMS
OR Mapping
Object
Application
Cache
Object
Application
Model
Mapping
Object
Application
Cache
Model
Mapping
DBMS
Server
DBMS
Server
DBMS
Server
Bottom tier
Barry & Associates, Inc.
Options for using existing data
directly
RDBMS
OR Mapping
Object
Application
Model
Mapping
Object
Application
Cache
Model
Mapping
DBMS
Server
DBMS
Server
Middle tier
Bottom tier
Barry & Associates, Inc.
Object DBMS with relational
DBMS
Object DBMS
Object
Application
Cache
Middle tier
Object DBMS and RDBMS
Object
Application
Model
Cache
Mapping
DBMS
Server
DBMS
Server
Bottom tier
Barry & Associates, Inc.
Object DBMS with objectrelational mapping
Object DBMS
Object
Application
Cache
Middle tier
Object DBMS and OR Mapping
Object
Application
Cache
Cache
Model
Mapping
DBMS
Server
DBMS
Server
Bottom tier
Barry & Associates, Inc.
Middle-tier ODBMS/RDBMS
example
The Chicago Stock Exchange uses the Versant
ODBMS for its trading system in the middle tier.
The trading system stores data at the end of
the trading day in Oracle for running existing
back-office programs. There is a description of
the trading system along with architectural
diagrams at www.howstevedidit.com. This URL
will re-direct you to a Microsoft site that
provides several choices. Follow the Technical
Roadmap choice.
Barry & Associates, Inc.
What will happen with object
storage in the future

RDBMS vendors will universally adopt parts
of SQL: 1999 (SQL3)
• Will still have impedance mismatch with object
programming languages since the SQL: 1999
object model does not match with Java or C++

Tight object language bindings with caching
will become universal
• The JDO specification is the most likely candidate
for a standard
Barry & Associates, Inc.
What standards will be
important



SQL-1999 (www.incits.org)
ODMG 3.0 (www.odmg.org)
Java Data Objects or JDO
(access1.sun.com/jdo)
Barry & Associates, Inc.
More on SQL: 1999


Overriding principle is backward compatibility
with SQL-92
As a result of this principle, the SQL: 1999
object model does not match either Java or
C++ object models
Barry & Associates, Inc.
More on ODMG 3.0


Overriding principle is transparent
persistence for object languages
As a result of this principle, the ODMG 3.0
object model matches both the Java and C++
object models
Barry & Associates, Inc.
More on Java Data Objects


Overriding principle is to provide transparent
persistence to both object and relational
DBMSs
As a result of this principle, the JDO object
model matches both the C++ and Java object
models and provides an automatic mapping
to relational DBMSs where needed
Barry & Associates, Inc.
What will characterize the
major players in object storage





Ease of Java use
Performance with Java
Ease of XML use
Performance with XML
Ease of use with J2EE-compliant application
servers, including both container-managed
and bean managed-persistence
Barry & Associates, Inc.
Free online overview articles


Object databases:
www.odbmsfacts.com/articles
Object-relational mapping:
www.object-relational.com/articles
Barry & Associates, Inc.
Thoughts? Questions?
Barry & Associates, Inc.