Remoting client keeps TCP connection open

This forum is for programmers who have questions about the source code.
Post Reply
fcarlier
Posts: 75
Joined: Tue Jun 19, 2007 3:12 am
Location: Ghent, Belgium

Remoting client keeps TCP connection open

Post by fcarlier » Tue Aug 21, 2007 10:56 am

Hi,

I noticed that the remoting client keeps the Tcp connection to the server open, until the program is closed.

That seems like a little bit of overhead to me: I assume that most of the time, Open Dental doesn't really use that connection. Let's assume that the tcp connection is only used 1% of the time.

Now switch to the server side: say the server has 100 clients. That's 100 open connections, 100 threads running on the server (which is a lot). However, if we can assume that only 1% of the connections are actually being used (*), that would amount to only 1 active connection on the server. If only the active client would have an open connection, there would only be one connection to the server, and only one thread.

Since both threads and network connections are "expensive" (and limited!) resources, it may be worth investigating if something can be done about it, in the long term? I know, it works, and don't fix what ain't broken. I don't really tend to do anything about it, but it may be worthwile to keep an eye on this for the future (let's say you'd one day start with hosted open dental -- I assume it may become an issue then).

Frederik.

(*): This is, of course, bad statistics. All 100 clients may be doing "something" at the same time, still resulting in 100 active connections.
Frederik Carlier

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Wed Aug 22, 2007 7:54 am

I would hardly say it "works". I don't know of any offices actually using it. We need to move to true web services as the way of the client talking to the server. In other words, the "connection" portion of the code needs a total rewrite anyway.
Jordan Sparks, DMD
http://www.opendental.com

Post Reply