Re: Opinions on application design?



Monique Y. Mudama wrote:
> ["Followup-To:" header set to comp.lang.java.programmer.] On
> 2005-10-03, Roedy Green penned:
> >
> > There are three most likely approaches:
> >
> > 1. http get. The response can be text or binary, uncompressed or
> > compressed. This is the garden variety way to solve it. I would not
> > suggest adding extra layers like XML, SOAP etc since your app is so
> > simple that all you would be doing is adding overhead. You don't
> > need the flexibility.
> >
> > 2. raw sockets. This assumes a user has an extended session with
> > many requests one after the other. It also assumes you don't have
> > all that many users potentially connected at once.
> >
> > 3. datagrams. Presumes responses are short. You must handle lost
> > packets yourself. Particularly useful if there is peer to peer
> > communication.
> >
>
> Why would sockets in particular have more trouble with many users than
> other methods?

Because ,obviously, that have somthing to do how java handles
them:)

First : http is text based application protocol
It goes through sockets.(he probaby meant web server )

Second: raw sockets provide raw network protocol access
(probably he meant SOCK_STREAM type of sockets, not raw sockets)
SOCK_STREAM types provide reliable two-way sequenced communication
with connections.

Third: is connectionless unreliable socket protocol
with maximum data packet size limit. (good for dns requests,
streaming of music, video, etc)

HTTP server uses SOCK_STREAM type(you all know
famous port #80).

>
> This isn't just an idle question; we're looking at switching an applet
> from using http to raw sockets because of the HTTP limit on the number
> of simultaneous connections to a single server.

It is not just a matter of connections,
but also a http server task dispatch strategy.
It hase to *run something* for every connection.
Because of that, using facilities of http_server as substitution
for dedicated front end for database is not good.
If ,dedicated, in this case, server can for example serialize
writes from different connections in one request and provide multi
threaded accesses for read operations (eg one writer thread / 4 reader
threads on two cpu system, this is 5 connections to mysql) while
accepting as many connections as possible on the other end.
(this solution is ok for mysql's table level lock and thread per
connection strategy, it will survive several thousand external
connections).
This is impossible to achieve if task and connections
are handled by http server.
Ok it can be done if http_server is just used to pass through
connections to server, but this has large overhead and limitations
of running scripts in a web server.

Greetings, Bane.

.



Relevant Pages

  • Re: Futzing w/ HTTP response/request model
    ... to with HTTP. ... Check out 'Persistant Connections' section from ... But doing it with IIS is another story - I've dug and dug some more and ... The only way is to drop IIS and create my own web server. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [9fans] Styx/9p implementations in JavaME
    ... Cingular was capable of anything but http connections... ... a web server. ... Java, particularly in a JavaME environment. ...
    (comp.os.plan9)
  • RPCoHTTP always has 4 failures
    ... I've set up RPC over HTTP using SSL on a new server.. ... I've tried this from two different internet connections, disabled firewalls, ...
    (microsoft.public.exchange.admin)
  • Re: [Fwd: Re: Mainframe not a good architecture for interactive wasRe: What is the future of COBOL?
    ... WinInet Limits Connections Per Server ... It's about WinInet, not HTTP ... clients in general. ... simultaneous connections that they maintain to a given server. ...
    (comp.lang.cobol)
  • Re: SBS 2003 IIS BASED SERVICES FAIL INTERMITTENTLY
    ... If I read your post correctly, you have a switch where the SBS ... Run DHCP server on your SBS, and set all client machine nics to dynamic. ... Once you have your nics configured, run the Connect to the Internet wizard, ... QUESTION1 - what is REFUSING CONNECTIONS? ...
    (microsoft.public.windows.server.sbs)