db4o open source object database
db4o :: Java Product News Blog

Syndicate This

Sunday, May 14, 2006

We have moved!

Java specific news about db4o, incl. RSS feed:
http://developer.db4o.com/blogs/product_news/archive/category/1006.aspx

Saturday, April 29, 2006

db4o 5.3 development release

db4o version 5.3 has been made available on the db4o downloadcenter page.

The new alias feature to translate classes, namespaces and package names between application and database opens a wide range of usecases. Here are some examples:

// Creating an alias for a single class
Db4o.configure().addAlias(
new TypeAlias("com.f1.Pilot", "com.f1.Driver"));

// Accessing a .NET assembly from a Java package
Db4o.configure().addAlias(
new WildcardAlias(
"com.f1.*, F1RaceAssembly",
"com.f1.*"));

// Using a different local .NET assembly
Db4o.Configure().AddAlias(
new WildcardAlias(
"com.f1.*, F1RaceAssembly",
"com.f1.*, RaceClient"));

// Mapping a Java package onto another
Db4o.configure().addAlias(
new WildcardAlias(
"com.f1.*",
"com.f1.client*"));


Aliases underline db4o's capability to access the same database concurrently from any platform, Java or .NET.


While working on dRS (db4o Replication System, also available here) we came up with an idea, how UUIDs and version numbers can also be used to provide information about the creation time and the modification time of an object. We have changed the generation of both number circles accordingly. Here is some pseudocode that explains how to get at the time values. In a future release we will make access a little more convenient.

// To turn generation of UUIDs and version numbers on.
Db4o.configure().generateUUIDs()
Db4o.configure().generateVersionNumbers()

// How to get at time values.
ObjectInfo objectInfo = objectContainer.ext().getObjectInfo(object);
long uuidLongPart = objectInfo.getUUID().getLongPart();
long versionNumber = objectInfo.getVersion();
long creationTimeInMillis =
TimeStampIdGenerator.idToMilliseconds(uuidLongPart);
long modificationTimeInMillis =
TimeStampIdGenerator.idToMilliseconds(versionNumber);

Enjoy the new version!

Development for version 5.4 is already well under way. There will be a strong focus on performance enhancements. Recent refactorings are already visible in our CVS.

Friday, February 24, 2006

db4o 5.2 production release

db4o 5.2 is now available as a production release.

- We have been working hard on optimizing insert, delete and commit performance. Our results for running multiple db4o versions against the PolePosition benchmark show excellent improvements. db4o 5.2 is considerably faster than db4o 4.6, even if FlushFileBuffers is turned on with our new release and turned off with the old one.

- Quite a lot of work has also been put into the Native Query Optimization Processor to allow it to optimize many more cases. Probably the most commonly used ones are String method calls. Queries like the following will now run optimized:

List <Employee> employees = db.query(new Predicate <Employee>(){
public boolean match(Employee e){
return e.getFirstName().startsWith("P");
}
});

- We have made a new sorting interface available both for Native Queries and for SODA queries. Again we have tried to follow the standards that Java provides as closely as possible. Sorting simply requires passing a standard java.util.Comparator.

- Our tutorial is now also provided in Japanese.

Enjoy the new version!

Our near-term roadmap available here still is valid. There will continue to be a strong focus on further performance improvements, a lot more than you would expect from the "Fast Collections" bullet point on the list.

Wednesday, February 01, 2006

db4o Replication System (dRS) powered by Hibernate

A first development release of db4objects' new db4o Replication System (dRS) is available for download.

dRS provides bi-directional object synchronization functionality for db4o object persistence systems and Hibernate relational persistence systems.

dRS brings the best of both worlds together:
Your enterprise data can stay where it is, in your existing relational database. On your client systems you can benefit from the ease of development, the performance and the low ressource consumption of the db4o object database. Data and objects can stay perfectly in sync, whether you use db4o as a peformance cache, for partially- or for fully disconnected systems.

Here is what the dRS system does exactly:

  • dRS generates Unique Universal Identifiers (UUIDs) and version numbers for all stored objects.

  • Since each stored object has a unique identity, objects can be replicated in multiple steps over multiple disconnected or partially connected persistence systems.

  • Version numbers allow querying for and replicating changed objects only.

  • The system automatically traverses changed members of replicated objects and replicates these changed members as well.

  • Conflicts (objects changed in both peers of a replication session) can be resolved using object-oriented conflict handlers and business rules of persistent classes.



Further information can be found on the dRS product sheet.

dRS is free under the GPL and available under a commercial license as well.

Please download, try it out and tell us what you think.

Tuesday, November 15, 2005

db4o 5.0 production release

The db4objects team is proud to announce the release of db4o 5.0 to production with a great innovation: Native Queries.

The benefits of using Native Queries:

- 100% compile time checked
Since all query code is written in your programming language (not in strings) all syntax errors will be detected by the compiler.

- 100% object-oriented
Native Queries allow you to use the full power of your programming language in queries. All constructs are legal: method calls, local variables, overriding, overloading. You can operate against the public facade of your classes (getters) or against the private implementation (fields), as you like.

- 100% refactorable
Since queries are now an integral part of your application, you can refactor all queries automatically with your development environment.

- More Productive
Your IDE will help you to write Native Query expressions by providing autocompletion.

- Fast
Under the hood db4o analyzes native query bytecode and converts it to run against database indexes.


You are invited to evaluate Native Queries against your requirements and experience the benefits.

Here is another Native Query example as an appetizer. It demonstrates two features:
(1) Queries allow multiple exit points. I use a guard pattern here.
(2) You can use local mutable variables in a query.

List <Product> products = db.query(new Predicate <Product>(){
public boolean match(Product product){
if(product.getLicense() == Licenses.GPL){
return true;
}
Float price = product.getPrice();
Vendor vendor = product.getVendor();
return price > 10
&& price < 100
&& vendor.getName().startsWith("d")
&& vendor.getCountry() == Countries.USA;
}
});


When you write Native Queries, don't forget that your IDE is very likely to provide features to fully automate all the typing work of generating the enclosing frame of a Native Query for you. A code template in Eclipse would let you write a Native Query with four keystrokes: n + q + CTRL + SPACE.


Additional noteworthy features in the 5.0 release:

- The index processor has taken a big peformance step forward for ranges.
- db4o uses a new freespace management system by default, based on the internal indexing algorithm. Index-based freespace management may be somewhat slower than the old RAM-based-system, but it guarantees ACID behaviour on systems that are frequently turned off (handhelds). If you want to use the old system, you can of course configure db4o to use it by calling Db4o.configure().freespace().useRamSystem().

Monday, October 31, 2005

db4o 5.0 dev build featuring optimized native queries

A first development build of db4o 5.0 is available for download. It includes a first optimized implementation of native queries.

Native queries provide the simplest syntax possible to express code that is to be run against all instances of a class (an extent) from within a query. db4o analyzes .NET IL code or Java byte code of native query expressions and runs queries with maximum performance against indexes and without instantiating the actual objects of the extent.

The following syntax example of a native query demonstrates type safety and calling properties / getter methods:

C#
------------
IList <Cat> cats = db.Query <Cat> (delegate (Cat cat) {
return cat.Father.Father.FirstName == "Occam"
|| cat.Father.FirstName == "Occam"
&& cat.Age > 3;
});



Java
------------
List <Cat> cats = db.query(new Predicate <Cat>() {
public boolean match(Cat cat) {
return cat.getFather().getFather().getFirstName().equals("Occam")
|| cat.getFather().getFirstName().equals("Occam")
&& cat.getAge() > 3;
}
});



At this point in time the db4o native query optimization processor already "understands" most queries that could have also been expressed with the SODA API, but it is not perfect yet.

It will be an ongoing task to teach the native query optimizer more and more C# and Java syntax so it will eventually provide the maximum performance possible for any querying code.

Our first optimizer implementations employ the third-party libraries Cecil (.NET) and BLOAT (Java). Many thanks to the maintainers!

Monday, October 03, 2005

db4o 4.6 production release and 5.0 M2 available

Version 4.6 is now production-ready. Download it now to take advantage of some of these new features:

  • ObjectSet (the object returned by db4o queries) now implements java.util.List and java.util.Iterator. This makes result processing much nicer by using a For-Each loop.
  • The query processor was considerably tuned. Most users should see an improvement in query execution speed when using indexing and deep object graphs.

On the bleeding edge, our engineers have been hard at work on the 5.0 Milestone 2 release. If you are using the M1 release, or are using .NET 2.0, please upgrade as soon as possible. Many bugs were fixed and performance is much-improved.

Powered by Blogger