Forum: Building VoltDB Clients

Post: VoltDB DOs and Don'ts Q

VoltDB DOs and Don'ts Q
gambitg
Oct 6, 2010
One of the VOLTDB don'ts is:
Don't call ClientFactory.createClient() more than once in each client application.
I gather it means not to have each GET and PUT stateless. But just have one connection at start of app and the rest of GET and PUT use that connection. So with VoltDB is the suggestion to always use some sort of cookie to authenticate an extended web application that has several GET and PUTs over time ?
Thanks.
re: VoltDB DOs and Don'ts Q
tcallaghan
Oct 8, 2010
Unless you are writing a client application that needs to connect to multiple VoltDB clusters, you only need one ClientFactory.createClient() in your application. After creating your client, you then connect to one (or more) of the servers in your cluster. This connection is persistent and remains open for the life of your client application.
I'm not sure I understand what you were asking with regards to a "cookie", can you elaborate?
-Tim