Developers

All you need to develop for Actorbase.

Note

If you haven't done it yet, please read the user's manual first.

About the project

The project is completely open source with MIT Licence.

The code is available on GitHub and you can find what you need in the summary page. For every problem please use the GitHub issues manager.

Compile a project

Actorbase is a project developed using the Scala programmig language, that uses SBT to manage the building process. The easiest way to start developing with Actorbase is to import the project folder into an IDE (Integrated development environment) that supports SBT (like JetBrains Intellij or Eclipse).

If you want to manually build the project from the command line, these are the steps to do:

      1) Download the code projet from GitHub.
      2) Download and install SBT.
      3) Open the terminal and go to the project directory.
      4) Write and enter: sbt compile
      5) Write and enter: sbt run

Use the JVM driver

Download the driver library and import it into your project.

The steps to interact with an Actorbase server are the following:

Create a new connection:
val connection = Driver.connect("address", port, "username", "password")

Execute a query:
connection.executeQuery("Query")

Close the connection:
connection.closeConnection()

Talk to the database server

The protocol

The Actorbase server uses a custom protocol for incoming requests:


N. bytes 1 1 4 1 var 1 1
Value 0 1 Query length Operation code Query 0 2
If you want to build your own driver connector you have to follow this exact sequence of bytes.

Connection

In order to connect you have to send login username password to the server. It will reply with a Y if the login is successful or N otherwise.

Send a query

To query the database you only have to send the string coded in UTF-8. It will reply with the reply string coded in UTF-8.