Forum: Building VoltDB Applications

Post: scala for stored procedures

scala for stored procedures
twine
Feb 1, 2013
While going through the helloworld example, I realized that the stored procedures have a lot of redundant typing. The only things really needed are the parameters and a sequence of SQL statements. Scala is a great language to write the stored procedures in to avoid this redundant typing.
Also, I would like to suggest an internal DSL in addition to the SQL based external one so that type and other error checking can be done by Java/Scala compiler.
jhugg
Feb 4, 2013
While going through the helloworld example, I realized that the stored procedures have a lot of redundant typing. The only things really needed are the parameters and a sequence of SQL statements. Scala is a great language to write the stored procedures in to avoid this redundant typing.


We are working to make it easier to use other languages for stored procedures. This is a bit of an experimental area, but we are actively working with a contributor to bring Clojure support to VoltDB. I think I've heard of people already using Scala, but the work for Clojure might help Scala as well. See this ticket to track progress: https://issues.voltdb.com/browse/ENG-4322.

Also, I would like to suggest an internal DSL in addition to the SQL based external one so that type and other error checking can be done by Java/Scala compiler.


I think we plan to make SQL the singular interface to state in VoltDB for some time. We do expose auto-generated CRUD procedures for tables; they use the form "TABLENAME.insert". More info can be found here: http://voltdb.com/docs/UsingVoltDB/ChapSimplify.php#SimpleAutoProcs.
jhugg
Feb 4, 2013
While going through the helloworld example, I realized that the stored procedures have a lot of redundant typing. The only things really needed are the parameters and a sequence of SQL statements. Scala is a great language to write the stored procedures in to avoid this redundant typing.


We are working to make it easier to use other languages for stored procedures. This is a bit of an experimental area, but we are actively working with a contributor to bring Clojure support to VoltDB. I think I've heard of people already using Scala, but the work for Clojure might help Scala as well. See this ticket to track progress: https://issues.voltdb.com/browse/ENG-4322.

Also, I would like to suggest an internal DSL in addition to the SQL based external one so that type and other error checking can be done by Java/Scala compiler.


I think we plan to make SQL the singular interface to state in VoltDB for some time. We do expose auto-generated CRUD procedures for tables; they use the form "TABLENAME.insert". More info can be found here: http://voltdb.com/docs/UsingVoltDB/ChapSimplify.php#SimpleAutoProcs.