Many factors determines the scalability and performance of Opinio. Some of these issues requires understanding of the underlying database structure.
Remember, that the performance of the application is not better than the weakest link. In other words, the weakest item of one of the below:
The server hardware. This seems very obvious, but it cannot be stressed enough. If you have very high loads on your surveys, you may need to upgrade your server. Opinio is very disk-intensive, because it needs to store responses constantly. This dictates a fast storage system. If you are running the database on a different server than the application server, then it is most important with a fast disk for the database.
Opinio itself is mostly CPU intensive, so if the database resides on a separate server, you will be well off with a fast CPU on the server running the application.
The network. Without a fast network connection, you may never be able to reach high loads for Opinio. This is especially important if the database is on a separate server - then you will need a fast link between the application server and the database. Also the network link between the application server and the users are important.
The database. A properly tuned database is important to get the most out of your current setup. We have tried to identify all the needed database indexes for fast lookups. But it is difficult to guess at the usage pattern of all users. So if you are using the product differently than how we predicted, then you may have to tune the database in some way or another. Please refer to the tuning section in the documentation for your database.
Special notes for HSQLDB: This database has few tuning options. This is the database that comes with Opinio (built-in). Properly configured, it is a very fast and performant database. By default, the server is running in a Servlet that Opinio connects to. It is done this way to make the installation easier. It is not the best way to run the database, however. To make it faster and more stable, HSQLDB should be configured to run as a stand-alone server. HSQLDB can be started from the command-line:
Then go to the Opinio folder, and type in the following:
java -cp WEB-INF/lib/hsqldb.jar org.hsqldb.Server -database WEB-INF/data/survey
Edit the WEB-INF/web.xml file, so that the HSQLDB servlet is not started. To do this, locate the line
<!-- Database servlet -->
..then delete or comment out the entire <servlet>...</servlet> with all its contents
Edit the WEB-INF/opinio.properties file. Comment out the line (by inserting a #-sign in front of it):
objectplanet.persistence.jdbcURL=jdbc:hsqldb:http://localhost:8080/opinio/hsqldb
Then uncomment this line (remove the #-sign):
#objectplanet.persistence.jdbcURL=jdbc:hsqldb:hsql://localhost
Start the application server.
The JDBC driver. This piece of software provides the connection between Opinio and the database, and is very important. Choose a driver that is proven to work even at high loads. If you are using the built-in database (HSQLDB), then you do not need to obtain a JDBC driver. For any other database, you will need to get one. See other databases for how to use other databases. For an extensive list of available JDBC drivers: http://industry.java.sun.com/products/jdbc/drivers