What are the pitfalls of an embedded connection to Derby over a network?

"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!

Specifically regarding the database corruption, I believe there are (at least) two fundamental problems with having the database on network-shared storage: (1) when Derby is attempting to allocate space by growing a file, the filesystem may report the allocation as successful even though in fact the disk is full; (2) when Derby is attempting to ensure that a disk write is in fact fully written to disk, the filesystem may report the data as being written to disk even though in fact it is still only written to memory Either of the above problems, if they occur at just the right time, can cause a database corruption.

Specifically regarding the database corruption, I believe there are (at least) two fundamental problems with having the database on network-shared storage: (1) when Derby is attempting to allocate space by growing a file, the filesystem may report the allocation as successful even though in fact the disk is full; (2) when Derby is attempting to ensure that a disk write is in fact fully written to disk, the filesystem may report the data as being written to disk even though in fact it is still only written to memory. Either of the above problems, if they occur at just the right time, can cause a database corruption.

I'd say that you should pay attention to what the documentation says. The folks who developed Derby are unlikely to give advice that limits Derby's applicability without good cause.(And I can understand why multiple application instances sharing a embedded Derby db would be problematic. Derby would assume that it didn't need to worry about multiple instances reading and updating, and may not flush data in the order needed to allow this to work safely.

Such flushing should not be necessary ... unless you are using Derby in a way that you are not supposed to. ) Besides, why would you not take the approach of using the Network Server version of Derby?

Marcos Vandel - well it sounds like the business requirements have changed ... if people are now trying to share embedded databases. You either need to tell them to "stop doing that", or you need to switch your product to use the client/server version of Derby. – Stephen C Feb 8 at 16:42 There is nothing "technically" stopping us from using the client/server version of Derby.

Our current configuration was done to satisfy business requirements for the industry our software targets and the environment it operates in. – Marcos Vandel Feb 8 at 16:55 Stephen, perhaps you should read the original post a bit more carefully. I am not asking whether people think this configuration is a "good idea" or not but rather what specific issues we could expect by using Derby in this fashion.

And no, the business requirements most certainly have not changed. – Marcos Vandel Feb 8 at 17:16 @Marcos Vandel - perhaps you shouldn't assume that I didn't read and understand your original question. Besides, it has already been answered.

I thought you might want to solve your problems, but apparently not. – Stephen C Feb 8 at 21:32.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions