473,698 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.
Jul 18 '08 #1
3 2235
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
Jul 18 '08 #2
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" <is***********@ NOJUNKrocketcom p.com.auwrote in message
news:a5******** **********@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.
Jul 25 '08 #3
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:
http://www.cheap-jsp-hosting.com/
Jul 25 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

73
8016
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities as a standard portable part of the core language, the LISP package, and the java.lang package, respectively. Both have big integers, although only LISP has rationals as far as I can tell. Because CL supports keyword arguments, it has a wider range...
114
9842
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
37
4324
by: asj | last post by:
awhile back, eBay decided to switch from a Microsoft/.NET/Windows architecture on the backend to a J2EE one, which might explain why their java backend will handle up to 1 BILLION page views a day! the funny thing was eBay was one of the major case studies for .NET at the beginning, when there was still some hype about it. interesting post about a few java case studies: http://weblogs.java.net/pub/wlg/268 "I love looking through case...
235
11697
by: napi | last post by:
I think you would agree with me that a C compiler that directly produces Java Byte Code to be run on any JVM is something that is missing to software programmers so far. With such a tool one could stay with C and still be able to produce Java byte code for platform independent apps. Also, old programs (with some tweaking) could be re-compiled and ported to the JVM. We have been developing such a tool over the last 2 years and currently...
30
10932
by: Richard | last post by:
Level: Java newbie, C experienced Platform: Linux and Win32, Intel Another programmer and I are working on a small project together. He's writing a server process in Java that accepts input from processes I've written over a TCP connection. My processes are all written in C; his are all done in Java. He's new to Java, and I've never really used it. My input is basically a stream of 32-bit unsigned integers (e.g., the
12
5918
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it says: usage: java fit.FitServer host port socketTicket -v verbose I think this is because I do not understand the jython mechanism for inheritance (yet).
0
4188
by: systemania.com | last post by:
We have 3 contract positions open in Herndon Virginia for 3 JAVA/J2EE Developers. The contracts are Long Term (1 year ++). The rate is $45/h negotiable based on experience. To apply for this position please email your resume to consulting@systemania.com. *** US CITIZEN ONLY PLEASE **** Key Skills:
5
2511
by: javatech007 | last post by:
Hi, I've been at this question all day and still just don't know what to do. It's the last of all the questions I have to do and can't figure it out!! If anyone could help or give guidance it would be greatly appreciated!! Question: Write a class called shapes that accepts two variables into its constructor called a and b. Along with the getter and setter methods required, write a method called toPrinter() to output the coordinates of...
0
8675
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8897
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.