Forum: Building VoltDB Applications

Post: Best way to break up procedures?

Best way to break up procedures?
francis
Jul 17, 2012
As I mentioned earlier, I am in the process of converting an existing application to Volt from MySQL. I've only converted 3 out of 32 modules so far and my project.xml is nearly 200 lines long and have about 10 java SP.
Is there any way I can break up either the SP by module in their own folders and to break up my project.xml having each module's procedures pulled in?
Yes, I am working with a beast here. I have about 75 tables and probably just over 350 MySQL queries to convert to Volt.
Hm.. not really..
rbetts
Jul 17, 2012
There's no built-in way to sub-module a project file. One could script the assembly of the project file from smaller pieces, I suppose.
Ryan.
Thanks anyway. I am working
francis
Jul 18, 2012
Thanks anyway. I am working on merging as many of the procedures together. Things like the inserts and updates together, the multiple gets together, etc.
I seem to have found a
francis
Jul 23, 2012
I seem to have found a method. It took a bit of time to remember of Java, but this seems to be working.
I've created a procedures/modules folder and have broken up all the java in their respective modules folder (like procedures/modules/assets for assets).
In my run.sh I am doing:

function srccompile() { mkdir -p obj javac -classpath $CLASSPATH -d obj \ $(find procedures/* | grep .java) # stop if compilation fails if [ $? != 0 ]; then exit; fi } All seems to be working and there is some order in my files, which I like!