VoltDB.NET Unleashed: Post Webinar Wrap-up and VoltDB Studio Introduction

written by Seb Coursol on June 7, 2011 with 5 comments

I thought I’d take a quick opportunity to review some of the key highlights form the .NET Webinar, giving out some of the nicer code snippets, and officially introduce our new development tool: VoltDB Studio.

Filling a System.Windows.Forms.DataGridView

view.DataSource = null;
for (short i = 0; i < raw.ColumnCount; i++)
, raw.GetColumnName(i)
foreach (Row row in raw.Rows)
int n = view.Rows.Add();
for (short i = 0; i < row.ColumnCount; i++)
view.Rows[n].Cells[i].Value = row.GetValue(i);
view.Rows[n].Cells[i].ValueType = row.GetColumnType(i);

Key considerations

  • All access is thread-safe
    • Safe for multi-threaded application
    • Safe as shared connections for a website/service
    • OK to mix asynchronous and synchronous calls
    • OK to have long-running callbacks (they are Thread-Pooled)
  • Resilience
    • Connect to multiple nodes
  • Performance
    • Share: multi-threading on a single connection is faster
    • Production: No Tracing (ever) or Statistics (unless needed)
    • Avoid usage of IAsync WaitHandles: they are slow!

VoltDB Studio: A SQL development environment for Windows users

VoltDB Studio was built as a showcase for what can be accomplished using the .NET client library, as well as a useful tool for users considering deployment of VoltDB in an otherwise Windows-centric environment.


Modelled after SQL Server’s Management Studio, VoltDB Studio provides a familiar user interface with which you can:

  • Connect to your VoltDB databases.
  • Use the Object Browser to review schema and system objects.
  • Run ad-hoc queries and call stored procedures.
  • Perform basic database monitoring (Memory usage, Transactions, Latency).

Useful code snippets

VoltDB Studio actually extends the SQL support built into VoltDB to allow you to perform certain operations not natively supported by the server, specifically around stored procedure interactions, traditionally run directly from client code (not in SQL).

Pending core upgrades on the VoltDB engine, you currently have to declare your stored procedures in Studio before you can call them.

Declaring a procedure

declare procedure Vote bigint, tinyint, bigint


declare proc Vote bigint, tinyint, bigint

If your procedure has no parameters:

declare proc Results

Remember that procedure names are case sensitive

Executing a procedure

exec Vote 12345678901, 1, 2

Undeclaring a procedure

If you made a mistake in your definition, you can easily remove it by calling:

undeclare proc(edure) Vote

Where can you get ‘VoltDB Studio’?

VoltDB Studio is available free of charge as a tiny binary download on our downloads page.  It is a one-click install .NET application compatible with 32 and 64bit versions of Windows.  The .NET Framework 4.0 will automatically be installed by the setup program if needed.

Enjoy Studio and happy VoltDB development!