This might sound like a stupid question, why is locking not required for local mode? We could still have many clients logging in in local mode, all of which trying to update/create/delete a record. For example in my app, each client will have its own Data instance in local mode while in network mode each client will use the same remote instance to perform services, in this case the same Data instance is shared by all clients.
Well there is only one client, the requirments dont say the server is running at that time. but. If you want to cut down on programming, and time it would be better if you reused the same interfaces/classes in the stand alone mode. If you write the code right standalone mode should require that much more code. In my case my standalone mode differs only in how I instanciate my objects to create a server and a client. I reuse all objects other than my networking objects. [ November 15, 2004: Message edited by: Inuka Vincit ]
We could still have many clients logging in in local mode, all of which trying to update/create/delete a record.
Your question is a good one. The answer depends on the purpose of client using local mode. Requirement doesn't give emphasis on multiple users in local mode. I agree that it is possible.
As per my requirement The database and client must be started together in standalone mode. The server program must run alone The GUI and network client must run alone. are the only musts.
With these musts your questions can be answered if a clear understanding betwen database and server can be made. As per my understanding server consists of database plus network server.
In standalone mode network server need not be started. But you can start it and a client can talk with it. As Inuka said it is not a must to do.
What I am worried is that do I brake the integrity of the system if I initialize network server in local mode. Depends purely on the purpose of having local mode. I believe local mode can assist in changing application configuration. In that case it is better to have only one user in local mode. Otherwise user's reach inconsistent state during configuraton changes.
Remember the requirement talks more about customizing configurables (still optional) than other issues.
1If you read your requirements carefully you will see there are 3 modes: 1) client - provides user access to the database through a server over a network 2) server - accesses a database and provides a service to clients over a network. 3) standalone - provides user access to the database WITHOUT using the network.
The standalone mode MUST not use any networking. The requirements also are clear that only one program accesses the database file at a time. So you don't need to worry about multiple direct users of the file. All this says that there can only be one local user at a time.
Joined: Oct 12, 2004
Peter , You are right. Thanks for remonding me about this. My requirement says.
Non-Networked Mode The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.
So only single user is allowable in stand alone mode. Non-networked mode is the stand alone mode. [ November 16, 2004: Message edited by: jiju ka ]