Service Data Objects
Service Data Objects
, a specification being developed by the OSOA, "aims to provide consistent means of handling data within applications, whatever its source or format may be."
I look at SDOs as Data Transfer Object
s on steroids. An SDO:
- Makes data transferable between applications – like a DTO, it's a dumb data object that's serializable
- Hides how the data was accessed – the data source can be a database, EJB, stream, etc.
- Lets the data be used off line – the SDO can work disconnected from the data source
- Keeps track of changes – so all changes can be committed at once when the SDO is reconnected to the data source
SDO was originally developed by IBM and BEA, and is already in recent versions of WebSphere Application Server and WebLogic. There's been some effort to make them a Java standard, JSR 235: Service Data Objects
, but that hasn't gained much participation from other vendors.
SDO has become intimately related to Service Component Architecture. An SCA defines a component that performs a service, and another SCA component can call the first one to invoke the service. When one SCA invokes another, the data passed between them (parameters and return types) is passed as SDOs. When both SCAs are implemented in Java, the invocation is Java RMI, and the SDO is a serialized Java object. When the SCA invocation is a Web service (aka WSDL/SOAP/HTTP), the SDO is serialized as an XML document. When the consumer or provider is just a Web service impl, not an SCA, the SDO is again passed as XML. But this enables the data object to appear as XML (or a binary object) on the wire, but as a full Java (or whatever language) object with type safety in the application. The SDO framework takes care of the serialization/deserialization (aka marshalling/demarshalling) at run time.
SCA and SDO are built into WebSphere Process Server and WebSphere Enterprise Service Bus. Standardization of SCA and SDO has been turned over to the OSOA. The specs are being implemented in open source in the Apache Tuscany project.
Other resources:
Blog postings: