Re: IPC looking for simple/best way to communicate

From: Jim Gibson (jgibson_at_mail.arc.nasa.gov)
Date: 01/10/05


Date: Mon, 10 Jan 2005 14:00:47 -0800

In article <41e2ee32.4481027@news.sonic.net>,
<whansen_at_corporate-image_dot_com@us.com> wrote:

Top-posting fixed (please don't top-post).

>
> On Fri, 07 Jan 2005 12:29:16 -0800, Jim Gibson
> <jgibson@mail.arc.nasa.gov> wrote:
>
> >In article <41ded263.3951491@news.sonic.net>,
> ><whansen_at_corporate-image_dot_com@us.com> wrote:
> >

[ previous advice on sockets vs. shared memory snipped]

> >
> I'm starting to think that Shareable may be the way to go unless I
> want to go to a server/client connection. I already mentioned that I
> have found a way to use Shareable for communication instead of for the
> actual list and that sped things up a great deal.
>
> A server would work like this:
>
> Server accepts connections on given port. Connection can be just a
> request or a request with a removal. Sever accepts any removals and
> removes them from it's list and then replies with the next data item
> from it's list for the client to run. Disadvantage - each process must
> connect to the server once for each itteration. What happens if the
> server is busy with another process. Advantage - Very exact control
> over the list. The server can easily make sure the list is run evenly
> where the current model uses a randomization so that the processes
> won't all be running the same list in synyc.
>
> Now the server process would be very simple. It just maintains the
> list and gives out the next element. But I wonder if a single process
> could deal well with 150 or more requests per second. I think I'd just
> have to program it and give it a try. Can anyone comment on this? What
> would happen if the server was not avialble? I'm assuming the
> requesting process would just wait for the port to be clear. Again
> this would be much less important in the actual use when it slows down
> to 5 requests per second.

A server can handle only a limited number of queued requests for a
socket connection. The default is 5, The actual maximum number is
system-dependent and may be set by a parameter to the listen()
function. This is the number of connections that are pending but
incomplete. It takes an exchange of 3 IP packets to complete a
connection. If a client attempts to connect to the server while the
number of pending, incomplete connections is equal to the maximum, the
client will likely get a "connection refused" response from the server.

So whether or not the socket server approach will work depends upon 1)
how often a client requests a connection, and 2) how long it takes the
server to complete a client request. Only you have the answers to those
questions.

My money is still on a shared memory solution.

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



Relevant Pages

  • Re: What doesnt lend itself to OO?
    ... > system design within that context seriously). ... >>The first line exists in the server. ... > objects between client and server i.e. as far as the client code is ... the message data packet data in the server between requests, ...
    (comp.object)
  • Re: .Net Scalability problem
    ... LoadRunner will peak out a server with a few virtual users. ... To get an idea of load, ... Fire off the test client and watch the number of ... > So I think that the MTC generate concurrent connection and per ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection lost at same time every hour (sometimes)
    ... After making the two following alterations on the server the problem seems ... After analyze your ipconfig on SBS and client, ... Then, other connection is good, ...
    (microsoft.public.windows.server.sbs)
  • Re: server disconnection - very often
    ... Reason of permanent popups is VMware server aplication on clients. ... Run CEICW to configure the network of SBS: ... Two network adapters - manual router connection to broadband ... Uninstall VMware on client. ...
    (microsoft.public.windows.server.sbs)
  • Re: Lan setup 2 nic
    ... The external nic only has TCP/IP enabled. ... Ipconfig of the server is looking good, but the client is still missing the ... > connection so we have a 2 nic with router setup now. ...
    (microsoft.public.windows.server.sbs)