Re: New to Java - Guidance Required



From your "business layer" you would use jdbc to communicate with the
database. From your "presentation layer" to your "business layer" there are, as you have discovered, there are lots of options.

You could:
* use sockets and define your own message formats.
* use RMI (Remote Method Invocation) this allows you to call a method (e.g. x = max (1,2)) - but the method (through the magic of RMI) actually runs elsewhere.
* create a web service which you request it to perform a task for you and it sends you a response.
* Use a Message queue to deliver messages to a consumer (e.g. a Message Driven Bean or a JMS listener).

All of these do essentially the same thing, communicate a request from the client to a service asking it to do something for you.
The choice of which one (or ones to use) will depend upon what you need to achieve.

For example, I'm currently working on a project where I need a client to be able to send a request and get a response. If the service is down, then the client is inoperative. We've elected to use a Web Service because it is a request/response architecture.

On another recent project we also needed to deliver requests to a service and get a response back. However, if the service was down we needed to capture the client requests and deliver them when the service was back up (i.e. the client continued to operate in an offline mode). Persistent message queues worked well for this because the client could put the message in the queue and forget about it. If it got a response back it did something with the response otherwise it just skipped that step.

In yet another instance I needed to have a continuous two way dialogue between an applet and the server from which it came - in this particular case I had to use sockets.

So in short the choice of method depends upon understanding what you need, what each mechanism provides and what you are willing to do.

I'd suggest doing a search for Java networking or Java client server or similar.

Hope this helps



"Ian Semmel" <isemmelNOJUNK@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:a58gk.20741$IK1.5160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am not new to computing, but I am to Java and wonder if anyone could point me in the right (or a) direction.

Specifically, how are multi-tiered applications put together. There appears to be multiple paths available and it all gets a bit confusing (to me).

If, for example, I have something like (this is not a web app):

- a front end which controls a number (variable at runtime) of terminals/workstations.
- a database later
- a main business layer
- other things

How are all these linked? I am thinking perhaps separate processes communicating via JMS or sockets etc.

Is this how it's done or are there better ways.

Sorry if this is way off.

.



Relevant Pages

  • Re: How to remove HTTP Header [Expect: 100-continue]
    ... RESPONSE to redirect, then client makes another requests and gets a 200 Ok. ... > CLIENT:: Request ... The Java Client Header look ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Response blockieren
    ... Ein Client sendet einen Request an den Webserver. ... Danach sendet der Linuxrechner eine Nachricht an den Windows-Sever. ... Und jetzt würde ich gerne die Webseite-Klasse informieren, dass der Response ...
    (microsoft.public.de.german.entwickler.dotnet.asp)
  • Returning SoapFault as Envelope
    ... I have two web services, where first application receives a request and ... sends the request to the second web service. ... it the client application receives Error 404. ... SoapEnvelope response = new SoapEnvelope; ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: XML Web Service Client allows at maximum two asynch Requests
    ... This limitation is due to the HTTP specification that one client should have ... at most two concurrent connections to one web server. ... > sends the response. ... > Request 1 ...
    (microsoft.public.dotnet.framework.webservices)
  • System.Net.Socket.Receive(...) bug?
    ... I have simple client/server game that uses sockets to transfer different ... The server and the client are running on the same machine. ... I send a request from the client ...
    (microsoft.public.dotnet.languages.csharp)