I’ve developed a robust plan for migrating my favourite old codebases away from Java (an Oracle trademark) without breaking anything!
In-Place Migration To Pascal
As my existing handwritten Pascal compiler is reasonably well designed – though quite barebones – it turns out that it was very easy drop a new p-code interpreter straight in with the legacy database code written in Java.
This allows me to continue moving from working code without a risk of major breakages, by very slowly rewriting the server parts, the parser, the table engine and the storage layer into Pascal and testing against the original code (which I’ve also since made some fixes to). Ideally this can be done without destroying the original program flow so that new & old parts can run side-by-side in the same instance.
Other Advancements
The new (and JDBC-free) client library now also has some initial support for connecting to PostgreSQL for larger & full-featured databases, allowing the new codebase to stay very lightweight despite some duplication of functionality as it won’t need to compete with all those features.
Some work has also been done on a lower-scale database using the LittleD codebase, this works with the same protocol layer as the CleanFork stack but only supports minimal features, and could be useful for robotics or other use cases needing something smaller.
More Work To Do…
I’ve been making maximal use of Qwen AI to help find bugs and prototype frontend apps, although the core database stuff aside from some of the Pascal VM and some bugfixes will probably stay mostly hand-written.
Since I’ve already got a decent (and hand-written) plain C backend for my Pascal stack, eventually this should allow the entire database platform to be migrated to the SecureLang RD operating system – which I had originally planned to port apps to but has faced many practical delays.
Leave a Reply