Search code examples
voltdb

VoltDB - Writing your own client or using JSON HTTP Interface


I am a bit confused in how should I perform my operation using VoltDB. There are two choice -

  1. Run VoltDB server, create a connection from the client and call your required procedure.
  2. JSON HTTP Interface provided by the VoltDB itself.

I have different applications which need to access the data stored in VoltDB, So I was writing code to connect and call required procedures, but later when I read about JSON HTTP Interface provided by the VoltDB I realized that the data can be accessed over the HTTP APIs without connecting each application with VoltDB.

Now I am confused which method should I choose and why?

I am pretty much in favor of using HTTP APIs provided by VoltDB. But what are the implications of it?


Solution

  • Well, the answer is pretty straightforward.

    If you have a situation where low latency is high priority, for example,

    1. storing/processing real-time data which can go to a high rate of transactions/sec.
    2. High insertion rates.
    3. High data query rates.

    Then using a real client will typically be the best solution, since you can have a persistent connection. This is not possible with the HTTP API, which needs to reconnect and re-authenticate for each call and use HTTP API for operational queries like fetching/storing data which has low hits.