GnuCash Daily Source Diff

Derek Atkins warlord@MIT.EDU
05 Oct 2001 11:27:14 -0400


linas@linas.org (Linas Vepstas) writes:

> [..RPC..]
> > So that multple client engines connect to the server engine,
> > which in turn has a connect to the 'real' datastore. I may
> > be wrong in this. But if I'm right, the server engine needs
> > to have multiple sessions open at once.

Yes, Dave, your description is correct.

> Hmm.  Dunno. Never been there.  I can imagine multiple rpc servers.  
> But I can't imagine why one would need more than one session if all
> the clients are connecting to the same (single-threaded) process.

Actually the RPC Server is multi-threaded.  In fact, the RPC _client_
is multi-threaded as well (but the threading is purely limited to the
RPC code -- and it "looks" single-threaded from above).  The reason
it's done this way is that when a client connects to the server, it
has to set up state, but it doesn't know what state needs to be setup
(yet).

If you have multiple clients connecting to the same "book", you still
want the state to be separate between the clients.  In particular, if
you are using a 'file' based back-end, you definitely want the users
to be kept separate!

> That is, assuming they're all reading the same book .. hmmm ...
> OK, I admit, if there is one server serving up multiple books,
> then you'd need that ... yep, that's it ...

This is true as well. :)

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available