I'm a software engineer who happens to use basex for our content management system. We current use the embedded basex option with Java. There is currently one apache tomcat server to one basex database. Now we are at position of using load balancing where we could have multiple tomcat servers talking to one basex database. Essentially, lets say we have 5 tomcat servers, we will have only one server writing to the only one basex database and the rest of the 4 tomcat servers reading from it. The problem is, after creating the 5 servers and configuring apache httpd server to have a load balancer, we notice a situation in which the first tomcat server opens the basex database and locks it from the rest of the servers access. Any attempt from tomcat server 2 to 4 to open the same database causes exception. How can we resolve this issue? Is there any simple approach to resolving this or BaseX is not designed for this purpose (i.e. one basex database being able to support multiple servers). Also is there a way of making the rest of the tomcat servers have only read access so it doesn't throw exception, etc? Please help.Thanks.
Hi iClays,
I probably know too less about your full system configuration, but if you have multiple clients to communicate with a single BaseX instance, it may be better to switch to the client/server architecture and send all requests to one BaseX server instance via our REST interfaces, the client API, or XQJ [1]. If you decide to stick with the embedded solution, you may need to spend much more time in getting to know our internal architecture.
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Developing
On Thu, Jan 16, 2014 at 6:20 PM, iClays a.rossj@yahoo.com wrote:
I'm a software engineer who happens to use basex for our content management system. We current use the embedded basex option with Java. There is currently one apache tomcat server to one basex database. Now we are at position of using load balancing where we could have multiple tomcat servers talking to one basex database. Essentially, lets say we have 5 tomcat servers, we will have only one server writing to the only one basex database and the rest of the 4 tomcat servers reading from it. The problem is, after creating the 5 servers and configuring apache httpd server to have a load balancer, we notice a situation in which the first tomcat server opens the basex database and locks it from the rest of the servers access. Any attempt from tomcat server 2 to 4 to open the same database causes exception. How can we resolve this issue? Is there any simple approach to resolving this or BaseX is not designed for this purpose (i.e. one basex database being able to support multiple servers). Also is there a way of making the rest of the tomcat servers have only read access so it doesn't throw exception, etc? Please help.Thanks.
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de