The Apache Software Foundation (ASF) on Wednesday officially announced Apache Cayenne 3.0, promising new features and improvements to the open source Java framework.
Cayenne provides object relational mapping (ORM) as well as caching and persistence features for Java applications. With the new release, the Apache project is enhancing performance and making the framework easier to use.
"Cayenne is used in a number of production installations in many kinds of applications -- really any type of Java application that needs a robust database access," Apache Cayenne Vice President Andrus Adamchik told InternetNews.com.
Among the big sites that use Cayenne is NHL.com, the online home of the National Hockey League.
From a performance standpoint, Adamchik explained that concurrency has been improved greatly in Cayenne 3 over the Cayenne 2 release, which first debuted in 2006.
One way in which concurrency has improved is with an enhanced ObjectContext, the main object providing user applications with access to Cayenne. Originally, the ObjectContext element was designed as a dedicated object that could not be shared between users or requests.
"Now, it is fully shareable for the purpose of reading data," Adamchik said. "That dramatically improves read throughout. Write concurrency has also been improved."
Additionally, Adamchik noted that the "paginated query," designed to read hundreds of thousands of objects at once, is now at least an order of magnitude faster compared to 2.0.x due to better algorithms. He added that paginated query in Cayenne 3.0 is also using less memory than before, allowing it to fetch even more data.
"Another important performance optimization is automated cleanup of unused objects cached by an ObjectContext," Adamchik said. "As it is common to store ObjectContexts in HttpSession, the issue of them growing out of proportion plagued our users in the past. They often had to be cleaned up manually. Now they are self-cleaning."
Cayenne 3.0 also introduces the Pluggable Query Cache, which improves the way that Cayenne caches objects. Adamchik explained that in Cayenne 2.x, the cache worked only at the level of individual objects.
"Now the entire result of a query (i.e. a list of objects) can be cached transparently to the user and then reused over and over again when a similar query is executed at a later time, until it expires per configurable expiration policy," Adamchik said. "In the past users would have to implement a caching solution on top of Cayenne themselves, and doing it right in a big application can be rather non-trivial. Now it is all built in."
For both existing Cayenne users as well as those looking to pick up the tool for the first time, the CayenneModeler is the likely first stop. The goal of the CayenneModeler is to help with object relational mapping and, in some cases, with database management, making it a natural entry point to help new users to get started with Cayenne.
For existing users, Adamchik noted that all they need to do is open an old Cayenne mapping in the new CayenneModeler and it will prompt for an update and upgrade the mapping automatically.
The Apache Cayenne project is aiming to gain broader adoption with the new release, though there are some competitive challenges in the marketplace, such as the open source Hibernate project, led by Red Hat's JBoss middleware division.
"The ORM market is rather well established," Adamchik said. "So the main barrier to entry is breaking an existing perception that if you need an ORM, you should use Hibernate."
Looking ahead, the Apache Cayenne 3.1 release is now in active development with the first beta expected within the next 12 months. The Cayenne 3.1 release will include a dependency injection container, which is all about making Cayenne more customizable.
"Having a simple way to write extensions and customize framework behavior in previously unforeseen ways can be very important in complex enterprise environments," Adamchik said. "In parallel, we are applying bug fixes to 3.0, and we are preparing a 3.0.1 release that should go live pretty soon. 3.0.1 will be a maintenance release with no significant new functionality, focusing on bug fixes."