PDA

View Full Version : Chepersy ODBMS on the way to v0.9



Chebmaster
09-07-2008, 11:42 AM
It never occured to me that I was creating a real database management system - but that's what my Chepersy is. :lol:

I decided to evolve it, so I totally rehauled the API, removed many architectural limitations and adapted it such way that it can now work with the compression streams.

v0.8.92 (an 0.9 with many features not yet implemented) is mildly tested and ready to be presented to you, my fellow Pascal programmers. 8)
I lost my password from sourceforge and the restoring email just doesn't come. So you can download the thing from

http://www.chebmaster.narod.ru/soft/libs_pers_e.html

The manual is now embedded right into that page.

And don't forget: game is just a database with pretty interface, so a good database must be the core of each good game!

Chebmaster
10-07-2008, 12:21 PM
0.8.93. The same URL. Two severe bugs fixed. :oops:

Robert Kosek
10-07-2008, 01:17 PM
Now that I actually understand what you're doing with this, beyond persistence and making it possible to save a game, I can make use of this. Helps that I'm a web programmer who does (My)SQL.

It does still seem a bit hackish. Is there any hope for the future in making it seem more stable and stand alone? Just wondering. :)

Chebmaster
10-07-2008, 03:03 PM
Now that I actually understand what you're doing with this, beyond persistence and making it possible to save a game,
As I understand it, and ODBMS is a database engine that is tightly integrated into the language itself, erasing the border between your program and the data itself. To really integrate, we'd have to change Pascal itself, so there are hacks and workarounds instead.


It does still seem a bit hackish. Is there any hope for the future in making it seem more stable and stand alone?
I want it to be stable and plan to base all my serious projects upon it. But its architecture grew far beyond what it was intended for, and is now a patchwork of new code and wrappers around old solutions. The problem with stability is the lack of testing. The test program I wrote and included with the package proved less than adequate, and my game engine is too undeveloped to prove a challenge to chepersy. It's a vicious circle: to get proper testing it needs users, but to use it you need to use it as a foundation for your work, and I doubt anyone would do that without proper testing and guarantee of stability.

I doubt this thing or something similar can exist without some hacks and assumptions: you'd need to seriously expand Pascal itself, including RTTI and type handling. But I think its only real weak point now is the routine that creates dynamic arrays of arbitrary type. There's no way around this: it assumes the array's layout in memory and assumes that all arrays use the same allocator as the array of byte. Would that change - it'll break and there would be no way to keep it compatible with the future compiler versions.

It is as "standalone" as it can be - i.e. it's a basis you build your application upon. It will probably never be a full-featured database engine, I'd rather focus on it being extensible by the end-user. For example, in my game engine there is a resource manager built on top of it that connects the object structure to the "outside world" represented by files and OpenGL handles.

There are three key components two of which are implemented and somehow tested but the third one is still at the planning stage.
1. Persistence - Ok.
2. Converter between the data structure versions - Ok (works transparently as a part of persistence)
3. Object graph parser - planning in progress.
As I understand it, only when the third comes online could you call chepersy a real database. I want it to have such features as ability to mark which objects to save, to perform partial saving of the data structure. The initial ides was of an immense game world that is generally packed into a large file and only a small part of it around the player is unpacked and operating. I'd like for this to be transparent to the objects themselves, but I doubt it is architecturally possible.

Chebmaster
11-07-2008, 01:19 PM
0.8.94
- Added the feature of walking the object graph, finally making Chepersy a real database - see the "Walking the graph" section in the manual.
- The test example updated to show off this new feature.
- Added the missing license files
- Fixed chepersy_defs.inc being sewn into chepersy.pas while it should be referred via {$include ...} and possible illegal characters (zero-width spaces) in the source code.
- Cleaned up one debug-write trash string.

Manual at http://www.chebmaster.narod.ru/soft/libs_pers_e.html
Download at https://sourceforge.net/projects/chepersy/

The graph walking is a very simple feature to use (and it took me half a day to add it), but it increases the system's power immensely. Basically, you create your own callback procedure, then Chepersy calls it once for each object in the graph.

Chebmaster
19-07-2008, 07:45 PM
0.8.95
- Added the feature of selective saving objects by mask (see the manual)
- Added support for classes that aren't descendants of TTrulyPersistent (see the manual and the test example now featuring TStringList)
- Corrected the error handling mechanism
- Removed the necessity of calling ClassesRegistrationStart and ClassesRegistrationEnd.

Chebmaster
06-08-2008, 05:49 PM
0.8.96
- Removed the support for classes that aren't descendants of TTrulyPersistent: it caused a fatal bug, the very algorithm was wrong :(
- Corrected one typo in constant name

Chebmaster
24-08-2008, 07:49 PM
0.8.97
0.8.97
- Fixed one major bug concerning registering several pointer-type fields when only the last one was properly marked as skipped. After loading these fields contained random trash instead of nil.
- Fixed one minor bug with class name not being reported in the error message.

Chebmaster
21-12-2008, 05:29 PM
0.8.98
- Added support for the metaclass type fields
(for class factories and such)