Forum: Building VoltDB Applications

Post: Running VoltDB with PHP

Running VoltDB with PHP
sumitk1
Jan 23, 2012
Hi,

I have my existing application in PHP and MySql and I wanted to try out VoltDB. I was able to write and run the sample Java project but after searching a lot I am still not sure about few things:



  1. Is all my Stored Proc gonna be written in Java always?
    At present my SP are plain ".sql" files so will I have to port them in Java?
  2. To run my PHP code to do an insert/delete/update in VoltDB do I only do it with Json Http interface as described here: ProgLangJson
  3. I have a CentOS 5.6 on 64 bit machine so do I need to rebuild voltdb.so?
    If Yes I am trying the steps from voltdb-client-php GitHub but when I try to svn checkout - https://svn.voltdb.com/clientapi/cpp/, it asks for authentication. Should I do it?


    I searched the forum quickly so I am sorry if I this question is being repeated. It would be really helpful if you can direct me to any link.

    Thanks
Hi Sumit, 1) Stored
jpiekos
Jan 24, 2012
Hi Sumit,


1) Stored Procedures need to be written in Java. Note that VoltDB will generate basic CRUD procedures automatically, and simple (one line) SQL stored procedures can be defined in XML.

2) If you'd like to invoke insert/delete/update, you can invoke the stored procedure direction, or alternately, if you prefer, you can use the JSON API. Your choice.

3) VoltDB supports CentOS 5.6 or later, so you should be able to download the kit and run, no need to rebuild VoltDB libraries.

John Piekos