Answering Sleepycat

Sleepycat asks some interesting questions about a non-standard persistence API they are developing. By the way, non-standard is good. Ideas like this should be tried out in open source products first before baking them into standards. I applaud Sleepycat for taking this route instead of rushing into the JCP. Indeed standardizing in advance of implementation experience explains a lot of the problems in JEE that APIs like this one are designed to replace. Anyway, on to the questions:

1. If you have one, what is your favorite persistence approach for Java and how would you rate its usability compared to the usability of the Persistence API? What aspects of the Persistence API are more or less usable?

I tend to look at very low-level solutions for persistence: JDBC or XML files. I am extremely suspicious of any effort to serialize objects, especially across application boundaries. I prefer to roll my own serialization code. This also has the advantage of being extremely usable.

Other than that I can’t say anything because your link to the API keeps redirecting me to the main home page.

2. The Persistence API makes heavy use of Java 1.5 generics and annotations. Without using these new language features, we believe that usability would be lessened. Do you consider the use of these language features positive or negative, and why?

It’s a negative. I still use Java 1.4 for a lot of work, plus generics don’t actually work. The simplest forms are convenient for documentation purposes. However, you can’t rely on them at runtime.

3. The Persistence API, while it increases usability, does not add a high level query facility. Do you consider a high level query facility to be a requirement for a Java persistence solution?

Yes. It’s fairly important.

4. The Persistence API does not conform to an existing standard such as JDO. To do so, we believe that both usability and performance would be compromised. Do you consider conformance to a standard to be more important than such compromises?

No, it is not. Anyone who wants to use JDO can. This API is only for people who’ve rejected JDO.

One Response to “Answering Sleepycat”

  1. Frank Wilhoit Says:

    I’d agree with two and a half of your answers.

    The half is #1. Serializing objects across application boundaries is as necessary as it is difficult but it is not a persistence problem at all. It is a messaging problem. It is not something to be suspicious of, but something to solve. Enough proprietary solutions now exist that the common principles can be deduced and commoditized.

    I also probably don’t agree with #3, to within the precise meaning of “high-level”. Persistence ought to be thought of as a syntactic transformation. Data modelling brings semantics into the picture. Persistence and data modelling ought to be orthogonal. To me, a “high-level” query is one that is aware of the data model and therefore goes beyond the responsibility of persistence.

Leave a Reply