Discussion:
Remoting Confusion!
(too old to reply)
Steve McCall
2008-06-02 11:02:46 UTC
Permalink
Hi all,

I hope someone can help, I'm in dire need of it!


I've been tasked with creating a client server application that acts as an
interface to a document management system's api.

So far I have been going ok, I've created a remotable object from a class I
have written that wraps around the api and holds higher level functions that
act upon the api (e.g. appending documents to files)

I have also created a client that works and can access the api.


So far, so good...


The problem I have is when more than one person wants to use the client at
the same time when a database operation is in progress

The document management app wont allow this and returns the error
"databaseinuse"

Ideally, what I would like to do is to be able to have a queue on the server
that will process the requests and send back information to the client (how
long the wait will be etc), but I don't have a clue where to start.

Is it even possible?

At the moment, the remotable type is single call as I didn't intend any
information to be stored about the state by the server between the different
clients. I just wanted it to be a dummy server in effect.


Would it be wiser to implement some kind of threading on the client (I need
to do that anyway!) that will instruct the client to wait a random amount of
time before retrying the operation?

Please help!!

Steve
Jeff Winn
2008-06-21 18:31:38 UTC
Permalink
If the document management application won't allow multiple calls to its
database at a time, you may want to use a singleton instance rather than a
single call of your remote object. You'll be able to implement a queue
mechanism in the remoted class to handle the database being in use. However,
in doing so your clients will not know the outcome of the request they
placed to the server.
Post by Steve McCall
Hi all,
I hope someone can help, I'm in dire need of it!
I've been tasked with creating a client server application that acts as an
interface to a document management system's api.
So far I have been going ok, I've created a remotable object from a class
I have written that wraps around the api and holds higher level functions
that act upon the api (e.g. appending documents to files)
I have also created a client that works and can access the api.
So far, so good...
The problem I have is when more than one person wants to use the client at
the same time when a database operation is in progress
The document management app wont allow this and returns the error
"databaseinuse"
Ideally, what I would like to do is to be able to have a queue on the
server that will process the requests and send back information to the
client (how long the wait will be etc), but I don't have a clue where to
start.
Is it even possible?
At the moment, the remotable type is single call as I didn't intend any
information to be stored about the state by the server between the
different clients. I just wanted it to be a dummy server in effect.
Would it be wiser to implement some kind of threading on the client (I
need to do that anyway!) that will instruct the client to wait a random
amount of time before retrying the operation?
Please help!!
Steve
Loading...