Transactions without Transactions
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Alex Blewitt on Sep 16, 2009
The OSGi Alliance has just released the OSGi 4.2 specification. Although early drafts of it have been made available, this is the final release version.
Some engines, like Equinox and Felix, have already begun working towards providing 4.2 compatibility with their earlier 3.5 and 2.0 releases (respectively). However, as OSGi 4.2 had not been released at the time, they couldn't claim to be OSGi 4.2 compliant. Now that the release has been done, it's a matter of time before the teams on each determine what still needs to be done (if anything) in order to meet the specs.
What does the release hold? InfoQ covered a sneak preview of what to expect, but now that the spec is finally here, these are the things to know:
Framework launching. Although it's been possible to run embedded OSGi engines from with Java applications (such as Equinox's servlet bridge), these approaches have been tied to a specific engine. Wrappers, like Pax Runner, have made it relatively easy to bootstrap any engine but by encoding engine-specific knowledge in them. Now, these will be launchable by a transparent mechanism which means it should be possible to launch an OSGi runtime without worrying which is used. This should allow an application to be tested under both Equinox and Felix simply by replacing the appropriate JAR on the bootstrap classpath.
Remote Services. Formerly known as Distributed OSGi and RFC 119, Remote Services is the new name for the technology that will connect OSGi VMs together. Remote Services takes the concept of a service (which is key to most dynamic OSGi applications) and provides a mechanism to export those services to remote consumers (and to be able to consume remote services locally). Unlike other approaches (such as RMI) a remote service does not need to implement a different interface or throw checked exceptions. It also doesn't try to pretend that everything will work; but given that OSGi services are dynamic, the expectation is that a service can come and go in an OSGi environment in any case.
Bundle Tracker. OSGi has long had a Service Tracker, which keeps an eye on services that come and go; the Bundle Tracker is an extension of that concept for tracking bundles. It was previously possible for a service to see bundles coming and going dynamically with a BundleListener, but the BundleTracker takes it to the same usability as the ServiceTracker does for ServiceListener. This can be used to perform the kind of dynamic registrations that the Blueprint Service or Declarative Service does in reading (and processing) metadata. For example, a web based engine might automatically scan newly installed bundles for web.xml and auto-register servlets via the HttpService on their behalf.
Service Hooks. In addition to determining what services are present, it's also possible to intercept events between services, and optionally, filter them. This could be used to implement a role-based permissioning model or to enable different sets of functionality based on product capability. Another approach is to provide proxying (or load balancing) by intercepting another bundle's events and hiding them, to be proxied by another mechanism (such as Distributed Services) at a later stage. In addition, listener hooks could bring these up on demand without having been first registered.
There are a number of other changes to the specification, such as OSGi bundles being given their own MIME type (application/vnd.osgi.bundle), the ability to specify a Bundle-Icon and Bundle-License, and changes to declarative services to permit a reduced set of permissions (package friendly instead of protected). The DS schema also permits other XML elements which can help in passing in service-specific information. In addition, applications managed by the application admin now have a mechanism to acquire the return value of the application when it is finished.
Equinox 3.5 already provided some of the OSGi 4.2 support, and Apache Felix had a passing test set earlier on in the month (prior to the 4.2 spec being passed). It is likely that the official results of the 4.2 spec and test kit will be clarified before the end of the month.
InfoQ asked Richard Nicholson, Founder and CEO of Paremus, makers of the Paremus Service Fabric OSGi cloud, what they thought of the new release:
"Our experience building distributed OSGi-based systems over the last few years makes us especially pleased to see the arrival of the OSGi 4.2 specification release which introduces a standard for Remote Services and the Blueprint Service."
What do you think is the most noteworthy part of OSGi 4.2?
18 agile and lean practices for effective software development governance
Using Drools? See what you're missing! Get the Power of Drools with the Assurance of Red Hat
Monitor your Production Java App - includes JMX! Low Overhead - Free download
Improve Java Garbage Collection, Runtime Execution, and JVM visibility with Zing
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.
John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.
Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.
Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.
No comments
Watch Thread Reply