JavaScript filesystem database

I couldn’t resist and, after many conversations with Mário Valente, I challenged myself to build a complete JavaScript filesystem based database from scratch. In short, something like CouchDB but written in JavaScript and using a filesystem approach for document storage.

Some characteristics of this new database system:

  • fully written in JavaScript: nodeJS is my choice for its architecture and portability;
  • every document must contain only JSON data;
  • every document can be manipulated on the filesystem: the idea is to allow someone to edit a document using vim, for instance, without breaking anything. It also lets you easily backup, move or replicate your data without creating a heavy load on the database;
  • the underlying filesystem can be changed: changing the underlying filesystem offers numerous possibilities, like easy distribution (using OpenAFSXTREEMFS or others), replication (using finefs or others), and even attaching different backends (using FUSE, for example);
  • the system must be available through an HTTP REST interface: this makes it very easy to immediately integrate the system into any existing applications. Bonus points if the API is compatible with CouchDB;
  • queries must be performed using a MapReduce approach: this should make it very easy to perform queries on a large dataset.

So, right now I’m half way through it. I managed to write the backend and I’m on my way to the HTTP REST interface. I’ll create a github repo after I have something functional that can be easily built and tested.

What do you think of a system like this? Any features you’d like to add or change?

Posted in Software, Thoughts | Tagged , , , , , , , , , | 4 Comments

Recursive directory creation with nodejs

I’m doing some code in nodejs and I found the need to create directories recursively. Basically I need to have the same functionality offered by mkdir -p.

The fs lib doesn’t offer this functionality so I looked around but couldn’t really find anything that suited me. I finally gave up and I’m writing the function myself.

Here’s the code:

Update: I just converted this code into an extension to the original fs lib so that it’s easier to use. The extended lib is called node-fs and is available on GitHub.

Posted in Thoughts | Comments Off

Developing a Sales Model

Very interesting thoughts about developing a repeatable sales model:

Start with one or two salespeople and restrict them to a local geography. Make sure they’re selling effectively before hiring others. It’s far harder to change messaging and direction in a large distributed organization. With just one or two people, your sales team can get together face-to-face to discuss problems they’re seeing, as well as what’s working.

Original article: Accelerate Your Startup: Develop a Repeatable Sales Model on GigaOMtech.

Posted in Thoughts | Comments Off

It’s demo time

I’m doing a demo of the new tarpipe WordPress plugin on the WP Portugal meeting.

Posted in Thoughts | Comments Off

Testing a new tarpipe plugin

This is just a test of a new tarpipe WordPress plugin that I’ve just created.

Posted in Thoughts | Comments Off