New to Java - Guidance Required

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ian Semmel

    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.
  • Joshua Cranmer

    #2
    Re: New to Java - Guidance Required

    Ian Semmel wrote:
    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.
    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

    Comment

    • wizard of oz

      #3
      Re: New to Java - Guidance Required

      From your "business layer" you would use jdbc to communicate with the
      database. From your "presentati on 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@ NOJUNKrocketcom p.com.auwrote in message
      news:a58gk.2074 1$IK1.5160@news-server.bigpond. net.au...
      >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.

      Comment

      • Dave Miller

        #4
        Re: New to Java - Guidance Required

        Ian Semmel wrote:
        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:
        This domain is under new ownership. Looking for JSP hosting? Visit jvmhost.com for professional JSP hosting solutions.

        Comment

        Working...