DB4O is an object database. It allows you to store objects (at whatever state they happen to be in) and retrieve them for use later.
This can be really useful if:
1. You want a simple, quick way to store data
2. You want to create an application that can run without an SQL database
3. You hate SQL (or SQL hates you)
I did some research and found a guy named Todd Sharp who installed db4o for Coldfusion. He hasn't released his code, so that got me thinking: "Hey, I know some Java and I know how to install Java classes in Coldfusion. Why don't I do it myself?"
So I tried it, and it worked! But... I've run into a couple serious issues that I can't seem to figure out.
Firstly, after about four or five "save" operations, the database becomes corrupt. No matter how simple the objects are, this always happens. If I can't figure this out, my experiment is basically a failure.
Second, I cannot store CFCs. If I try, my CPU goes full throttle until I kill Coldfusion. I'm guessing this is due to the underlying complexity of CFCs, but it sure puts a damper on things. I've been using CF 8's JSON functions to "simplify" my Coldfusion objects like so: DeserializeJSON(SerializeJSON(myCFCinstance))
Does anyone else have any experience with db4o? I'll provide my source code and installation instructions to anyone who wants to try it.
Here is a great tutorial for db4o
My system specs:
Java version: Open JDK 1.6.0_0
CF Version: 8,0,1,195765
OS: Ubuntu 9.04 (2.6.28-11-generic)
Hardware: Dell Vostro 1000
Monday, June 8, 2009
db4o in Coldfusion, anyone?
Posted by Russ at 11:00 PM 4 comments
Labels: cfcs, coldfusion, db4o
Subscribe to:
Posts (Atom)