Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old July 18th, 2008, 10:45 PM
Ian Semmel
Guest
 
Posts: n/a
Default New to Java - Guidance Required

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.



  #2  
Old July 18th, 2008, 11:15 PM
Joshua Cranmer
Guest
 
Posts: n/a
Default Re: New to Java - Guidance Required

Ian Semmel wrote:
Quote:
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
Quote:
How are all these linked? I am thinking perhaps separate processes
communicating via JMS or sockets etc.
I would probably implement such a thing by using multiple threads (and
maybe thread groups), as opposed to separate processes. The UI has its
thread, the server its thread(s), and the database might or might not
get its own thread: it depends on how the API is designed.

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
  #3  
Old July 25th, 2008, 11:25 AM
wizard of oz
Guest
 
Posts: n/a
Default 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@NOJUNKrocketcomp.com.auwrote in message
news:a58gk.20741$IK1.5160@news-server.bigpond.net.au...
Quote:
>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.
  #4  
Old July 25th, 2008, 05:25 PM
Dave Miller
Guest
 
Posts: n/a
Default Re: New to Java - Guidance Required

Ian Semmel wrote:
Quote:
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.
A "web" app can be deployed on networks other than the internet. You
might want to look into using a framework.

--
Dave Miller
Java Web Hosting at:
http://www.cheap-jsp-hosting.com/
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,414 network members.