Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register
STRATEGIC DEVELOPER  

Patterns of persistence

A new way to think about an old technique for dealing with databases

By Jon Udell  
May 30, 2003
 

Programmers spend time and effort translating between objects represented in high-level programming languages, such as Java, and structures stored in relational databases. Object databases can remove that impedance, automatically binding programming-language objects to database objects. But doing so transparently requires some deep magic.

Free IT resource

TechNet: More ways to know it, share it, and keep it running.

Sponsored by Microsoft

Free IT resource

Attend the SOA Executive Forum: Breaking SOA Bottlenecks SOAExecForum.com/may2007

Sponsored by InfoWorld

I got my first taste of it years ago working with ObjectStore (formerly ObjectDesign, then Excelon, and now Progress Software). You could make ObjectStore versions of standard Java classes (Hashtable, Vector) persistent, and you could also make your own user-defined classes persistent. But in order to do it, you had to postprocess the generated bytecodes. The postprocessor injected new bytecodes to intercept get-and-set operations and make the user-defined objects persistent, transactional, and able to cooperate with ObjectStore’s intelligent distributed cache.

Object databases have always been specialty items. But no matter what flavor of database you choose, there’s still that disconnect between programming-language objects and database storage. And the same old techniques are still being used to address it. For example, today’s implementations of the JDO (Java Data Objects) spec typically use the same trick that ObjectStore used back in 1997: They “enhance” bytecodes to make Java objects persistent and transactional. Vendors of JDO implementations include stalwarts such as Versant and Poet Software, which map JDO to their own object databases, as well as newcomers such as SolarMetric and LIBeLIS which work with relational and/or object databases.

Because bytecode enhancement is controversial, JDO implementations aren’t required to do it. Source-level enhancement is another way to add persistence, but vendors favor the bytecode approach because it’s less invasive. Since all JDO enhancers must be binary-compatible, you can in theory move a persistence-enabled class from one   implementation to another.

Although JDO can be used with J2EE, it runs parallel to it and is not explicitly supported by vendors of J2EE servers. They instead highlight the CMP (Container-Managed Persistence) features of EJB (Enterprise JavaBeans) 2.0. Marc Fleury, president and CEO of the JBoss Group, is interested in decoupling persistence from J2EE, even though he thinks that CMP 2.0 trumps JDO. With the forthcoming JBoss 4.0, he told me, even plain Java objects can be persistent, transactional, and cacheable. How? “Java is flexible enough to be supercharged with bytecode engineering so that it acts as a superlanguage,” says Fleury.

For object or relational databases, simple objects, and EJBs, the same underlying technique has been used to achieve persistence. When I see a repeating pattern, I listen to what it’s telling me. In this case, the message has little to do with the practice of hacking Java bytecodes and everything to do with an emerging discipline called AOP (aspect-oriented programming). Seen through the AOP lens, persistence is something you declare about an object, not something intrinsic to it. The “managed” middleware environments (J2EE, COM+) take a similarly declarative approach, as do the new breed of Web services management solutions. AOP is crossing from theory to practice, but it’s a profoundly unifying idea that will resonate throughout the industry.





 


 
Jon Udell is lead analyst and blogger in chief at the InfoWorld Test Center.

  More of Jon Udell's column
  Jon Udell's Weblog

Newsletter Check out all of our free newsletters!
Enter e-mail address:




 

TOP NEWS:


»  Four quick tips for choosing an IM security product
71 percent of businesses will invest in real-time messaging this year. If you're one of them, be sure to protect your enterprise

»  Forrester analysts ID hot IT jobs
Research group finds 16 IT roles with a promising future

»  Nvidia claims 10 hours of HD video on Tegra chip
The Tegra 600 and 650 can be used with hard disk drives and are designed partly for mobile Internet devices

»  Database vendors add Google's MapReduce
Greenplum and Aster Data Systems will support Google's programming technique, developed for parallel processing of large data sets across commodity hardware

»  Network management: Tips for managing costs
New technologies, changing requirements, and ongoing equipment maintenance and upgrades cost money, but there are ways to manage expenses

»  EMC targets SMBs, branch offices with new low-end storage
Celerra NX4 highlights include thin provisioning, snapshot technology for data recovery and backups, and Web-based console for management of storage volumes




Virtualization: A Step by Step Approach to Success
Your virtual machines can be up and running in a matter of minutes. HP and Citrix have integrated XenServer with HP ProLiant servers and management tools, powered by hardware-assisted Intel Virtualization Technology to enable high- performance, cost-savings solutions for server consolidation and disaster recovery. Sponsor: HP

»  Click here to view this Webcast
  Planning For A Disaster
This new, comprehensive Solutions Guide is your one stop source for Disaster Recovery. In it you'll learn how to reduce the likelihood of a disaster and to create a rock solid business continuity plan should you face a disaster situation. Sponsored by Equallogic

»  Click here to download now

- Special Advertising Partners -
WHITE PAPERS
 

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
INFOWORLD MARKETPLACE
 
» BUY A LINK NOW
 

FIND PRODUCTS AND COMPANIES
» COMPLETE PRODUCT GUIDE



TECHNOLOGY INDEX
• Applications
• Application Development
• Security
• Networking
• Wireless
• Platforms
• Hardware
• Data Management
• Storage
• Web Services
• Business
• Telecom
• Professional Services
• Standards

TECH WATCH 


What's the 411 on GOOG-411?
Just as Google has become synonymous with "performing a Web search," 411 is understood to mean "information" -- as in "what's the 411?" I was thus surprised to discover, from a billboard, no less, that the king of search is taking on the ...

Apple HTML source reveals 'iPhone Extreme'
"This one's a stretch..." reports AppleInsider. Um, yeah. Reporting on HTML code sightings of product names could be called a stretch, but iPhone Extreme has a ring to it. Now, that sounds like the product Apple should have released first, rather ...

COLUMNISTS

Unified under law
Ephraim Schwartz's Column and Blog (InfoWorld) - In the litigious world we live in, deploying a unified communications platform in your enterprise could...
» MORE COLUMNISTS

MORE INFOWORLD BLOGS


Open Sources 
Product Management
When I joined MySQL four years ago, there was quite a lot of debate about product management. We didn't actually have ...

Zero Day 
Botnet herders tending smaller flocks
New research backs up the theory that botnet operators are keeping their networks smaller in a continued effort to keep ...



• Advice Line
• Database Underground
• The Deep End
• Enterprise Mac
• Geeks in Paradise
• Grid Meter
• The Gripe Line
• InfoWorld Daily
• Inside IT
• IT Troubleshooter
• ITXtreme
• Open Sources
• ProdBlog
• Real World SOA
• Reality Check
• Security Adviser
• SMB IT
• The Storage Network
• Tech Watch
• Virtualization Report
• Zero Day

ADVERTISEMENT


RESOURCE CENTERadvertisement 

GOVERNMENT IT & POLICY
'If you don't go after the network, you're never going to stop these guys. Never.'
From the State Department, All the News for Inquiring Minds
TechPresident, the Internet Citizenry's New Consensus Taker



Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist