Do we need lock/unlock in local mode. i dont it is neccessary. In local mode, iam planning to have my client invoke bookseats directly from Data In Remote , server detects bookSeat call from client, it calls lock() bookSeats(0 unlock(). will there be any problem with Sun ? pls comment on this design.
You know...that's what I thought, but I tried recently running the local client and running a remote client with the server pointing to the same file that the local client is and surprisingly both clients are accessing the same file. Any thoughts?
posted 18 years ago
i dont understand why should we run the client as local & remote at the same time ? in real time scenario that is not going to happen. moreover there is going to only one instance of server sitting and accessing the db file. iam planning to code like this; client (bookseats) -----> Data(bookseats) LOCAL client (bookseats) -----> Server(bookseats) ----> Data(lock) Data(bookseats) Data(unlock) REMOTE MODE what do u guys think abt it?
posted 18 years ago
I'm not saying that there would ever be a reason to run Local and Remote at the same time. I'm just surprised that their is no error when you try it. I am not going to change my design at this point though. Anyone else think about this?
I dont get it??? Isnt the file you supply when your server startup the same one as the one you supply for the client local access. It is on the same machine and therefore will be the same database. You can have more than one Data class accessing the same file. Its like a Random access file.
Never be satisfied with anything less than the best and you will surely pass the test...
Wow, Who's on first. If both the server and the client are on the same machine, they probably most likely access the same db.db file. But if the Server is on one machine and the client is on a differenct machine, both should have it's own db.db file. If you run the client in local it uses the db.db file on the local machine, if it runs remotely, then it is accessing the db.db file on the server's machine indirectly through out Facade/Adapter/Data Access interface.