Code Monkey home page Code Monkey logo

serendipity's Introduction

serendipity

A pure Go relational database system ported from and inspired by SQLite 3.

rationale

Starting with a baseline of SQLite 3.7.17 Amalgamation (which introduced memory-mapped I/O) my aim is to build a relational database engine which can be included in Go projects without forcing the use of CGO.

By porting the SQLite design to pure Go it should be possible to use native concurrency support instead of pthreads to better manage multiple database queries, with the hope that this design will suggest ways in which the engine can be further scaled to support multi-node clustering.

method

SQLite is a small but dense codebase and the amalgamation relies on a number of macros to customise the code at compile time. Go doesn't sit comfortably with macro systems so I'll be habd cranking these when alternative approaches are unclear. There are also features of SQLite which can be expressed very differently in Go than in C (such as stripping out pthreads) and where possible we'll be making these changes atomically.

Another key principle is that for every change to the codebase, there'll be a commit here in git so that I can explore alternate paths and backtrack if I get in a tangle. I don't usually code in quite such a disciplined manner so this will be a learning experience...

A key aspect of Go that I want to explore in this project is the use of interfaces so that where practical other projects can reuse the core serendipity engine whilst providing their own implementations for particular components.

Underneath SQLite is a very nice Relational Algebra Virtual Machine which I intend to rework in a similar vein to my GoLightly experiments. This is where the main gains for exploiting Go's native concurrency and memory management are likely to be found. And yes, that does mean that interoperating serendipity VMs with those for other systems is part of my road map.

And as a final challenge I'm going to try and play nicely with the standard SQL package so that serendipity can be a drop-in RDBMS for any project using that interface.

how to help

If you know either Go or the SQLite codebase well and you fancy helping I'd love to hear from you.

Whilst SQLite is in the public domain its test suite is not, so Serendipity will need a test suite before it's ready for production use. I am not planning on addressing this aspect until a substantial portion of the codebase has been converted. I WILL VERY MUCH WELCOME ANY HELP WITH BUILDING THIS TEST SUIT ASAP.

And if you're somebody who'd like to see this project succeed but who can't help with the coding, I accept donations via PayPal and will in future be looking for other ways to raise funds so I can make this a full-time effort.

serendipity's People

Contributors

feyeleanor avatar

Watchers

tony eve avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.