Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

How Would You Design This Application?

Thread view: 
John - 24 Feb 2006 01:56 GMT
I'm looking for some ideas on which combinations of Java language
features, third party tools and design patterns would apply to the
design of the following type of system subject to certain constraints as
described below.

This is to be a distributed client-server system.

J2EE is NOT an option.

SERVER
This task manages a database on behalf of multiple clients. All requests
and responses must be synchronous. The database is relational but the
server must work with an object-oriented representation of the data therein.

The server must be a singleton.

If it crashes then something must restart it.

CLIENT
Must be Swing based.

Retrieves lists of database objects managed by the server with which to
populate its GUI.

User selects an object via the GUI, enters additional data via that same
GUI, and issues a synchronous add/update/delete transaction to the
server upon clicking the appropriate button. Client app must wait for a
response from the server before continuing.

All clients must display a "live" view of the internal state of the
objects that the server is maintaining on their behalf. In other words,
if client 'A' updates an object then the GUI of client 'B' should
reflect that change automatically.

OPTIONS CONSIDERED SO FAR

Hibernate - for the ORM. I'm okay with this part.

RMI - While this seems a natural fit to the system's design, in
prototyping it I find a number of problems. For instance:

    An "activatable" server can be successfully launched on demand but
if/when the server exits normally or crashes I can't get RMID to
relaunch it. Perhaps I am doing something wrong?

    The RMIRegistry and RMID are additional tasks that must be launched
prior to the server. This requires non-Java, OS-specific scripting to
achieve. I'd prefer an all-Java, OS-independent approach.

    It's not clear to me how I would effectively apply the notion of an
Observable object in an RMI environment. This seems particularly murky
to me since the objects are also being managed by Hibernate. This is
probably the design aspect where I could use the most assistance.

SWING - I have concluded that plain Swing, without some sort of higher
level framework to streamline the process, is not worth coding. I have
looked at JGoodies and SWIXML, and each has its benefits, but they don't
cooperate with one another. So their potential value is lost to me.

I am also totally PO'd at having to write a custom model for every
blasted JTable and JList in the GUI as there are many lists of objects
to be managed by the server on behalf of the clients. Grrr.

Thanks for listening.
Roedy Green - 24 Feb 2006 07:26 GMT
>This task manages a database on behalf of multiple clients. All requests
>and responses must be synchronous. The database is relational but the
>server must work with an object-oriented representation of the data therein.
see http://mindprod.com/jgloss/sqlvendors.html
http://mindprod.com/jgloss/pod.html
http://mindprod.com/jgloss/hibernate.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 24 Feb 2006 07:29 GMT
>The server must be a singleton.
>
>If it crashes then something must restart it.

To pull that off you will need some PC that keeps monitoring its
heath. It would unwise to expect the server to that itself. It maybe
too sick to notice.

The PC either reboots or powers off and powers on the server.  The
server has a login script of services (start with out intervention)
that get things going again.

Google for UPS vendors. They may bundle such software with their
products.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

tom fredriksen - 24 Feb 2006 16:22 GMT
> This is to be a distributed client-server system.

What do you mean by this, it can only be one or the other i.e.
distributed or client/server system.

> CLIENT
> Must be Swing based.

You should perhaps have a look at XUI (an addition to swing)

> OPTIONS CONSIDERED SO FAR
>
> Hibernate - for the ORM. I'm okay with this part.
>
> RMI - While this seems a natural fit to the system's design, in
> prototyping it I find a number of problems. For instance:

Have a look at SOAP for this part, its the modern RPC which is w3c
standardised. It doesnt have the object features that RMI has.

You could also have a look at javaspaces(blitz) as a distributed storage
and communication mechanism, which support listeners on objects and changes.

/tom
James McGill - 24 Feb 2006 17:20 GMT
> > This is to be a distributed client-server system.
>
> What do you mean by this, it can only be one or the other i.e.
> distributed or client/server system.

I'm wondering why not.

Why couldn't a distributed system of server nodes be accessed by
clients?  I use a system that fits that description, although I wouldn't
call it a "distributed client-server system" exactly.
tom fredriksen - 28 Feb 2006 09:49 GMT
>>> This is to be a distributed client-server system.
>> What do you mean by this, it can only be one or the other i.e.
[quoted text clipped - 5 lines]
> clients?  I use a system that fits that description, although I wouldn't
> call it a "distributed client-server system" exactly.

My point is confusion of definition. A distributed system is both a
server and a client.  Ie. a node in such a system can be both or either,
depending on the architecture of the system. So, it was merely my
intention to point out the confusion. Calling it both is a "butter on
lard" statement.

/tom


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.