Forums Register Login

Data integrity in database

+Pie Number of slices to send: Send
according to SUN assignment standalone mode must not use networking
so (as i understand) a client will access the server through the RMI but the
standalone mode would start an instance of the server and access through
it to the database. since they are 2 different server, there is a possibillity of
concurrent accessing the database. (clients and standalone)

am i right?
+Pie Number of slices to send: Send
According to the instructions there will be at most 1 application accessing the database file at any time, so that would be the standalone application or the network server, but never both at the same time
+Pie Number of slices to send: Send
Hi,
Allow me to participate in this conversation, what Roel De Nijs said:

According to the instructions there will be at most 1 application accessing the database file at any time, so that would be the standalone application or the network server, but never both at the same time



you can achieve this by using FileChannel.tryLock(), it helps in giving the JVM the exclusive lock over the file so now other process can lock it.

I hope you find it helpful.

+Pie Number of slices to send: Send
 

instructions.html wrote:You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server.


The instructions clearly indicate that you don't need a lock over the file. So there is no need to add extra complexity to your program, because it will be unused. So your application has extra code, which have to be maintained, but will never be used.
We noticed he had no friends. So we gave him this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 827 times.
Similar Threads
Locking
Urlybird 1.2.1 - Clarifying network/standalone requirement
NV:where should creat,delete operation be?
nx:All of URLy Bird1.1.3 about record lock
URGENT help needed, URLyBird
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 08:03:43.