We now position LogicBlox as a database. Typically, a database is not enough to build complete applications. You typically have an application server of some kind that talks to the database and executes queries. On the Java platform you have JDBC for SQL databases. I already built a Clojure connector for LogicBlox before, so this time I thought I'd try building one for node.js.

The cool thing about node.js is

It's JavaScript -- awesome

It's asynchronous

It's a great platform for building efficient servers that primarily glue systems together

Most, if not practically all databases that I know of have some sort of authentication and authorization system. LogicBlox does not. In fact, support
for connecting to a LB database from another system is very limited.

The LB API server (samples/lb_api_server.js) exposes a LogicBlox server via a HTTP RESTful API and adds support for multiple users and authorization of users for specific workspaces, so you can create a user (as an admin) that can query a workspace, but not run 'exec' queries, or have access to other workspaces on the same server.

Documentation is limited due to time constraints, but the curl commands at the
top of lb_api_server.js should help understanding the idea.

The users and their permissions are stored in a users workspace which is automatically created when the server is
first started (and it does not already exist). The schema
for this can be found under sample/api_server_schema.logic, as well as the initial data (for the admin user) in sample/api_server_init.logic.