• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

load balance and clustering

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a few java web applications running on websphere v6 express, I need to know what's the best approah to synch the backend data used by the applications on two machines given the following configuration:
1.The backend data are stored on the file systems and on databases(ms access for now, but will be moved to db2, mysql or cloudscape in the future).
2. both machines are windows server 2003
3. the two machines will be load balanced through the web hosting provider.

Obviously when I load balance from the front end, the data become an issue. I don't know much about clustering. Is it the best solution to synch the data?
details,links and sights are appreciated.
thanks in advance
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Those are some pretty general J2EE design pattern questions, and there's many ways you can go (btw might want to move this to the EJB/J2EE forum). Do you want to cluster the databases and the web servers, or just the web servers?

In general, its probably better to have a single devoted database server and cluster web servers to it, although your business requirements might require other solutions. If you can specify more details about the system you need such as number of users, amount of data, frequency of transactions, we might be able to give you more specific pointers.
 
jonathan Greens
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Scott,
regarding the database part, what if I have dynamic data stored as flat files on the file system, in this case, can I cluster them?
in the second case where I put these data on a single dedicated server, how can I cluster webservers to them?
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Databases are never tied to a particular application server, so there's no reason the database and application can't be the same machine or separate machines. In the admin console you specify the database connection for both local and remote data sources regardless of where they are housed.

For non-database data store solutions, such as flat data files, its really up to you to design your own methods for clustering and access. Unless you have a JDBC driver that will work on the flat files (for MS Access files I believe there is one for example), there's not much the server can help you with.

As far as clustering web servers to a specific database, WebSphere network deployment manager supports multiple servers communicating in a cluster environment. Look up some tutorials/books on how to set such a system up as it is a little beyond the scope of a single post.
 
jonathan Greens
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So for flat files such as XML Files residing in some directory structures there's basically no standard clustering technology, right? So if I have two servers in the cluster, I have to put two separate copies of these files on the two servers and then sync them from time to time, right?
If I put these files on one of the two servers in the cluster, is it impossible and impractical for the other server to access/modify these files?
thanks for the elaboration.
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not have these files be on a shared network drive? This way they are always accessing the same copy. Its not really the clustering that's the problem, its more the transaction management and locking that will hurt.

I think where I'm having trouble following you is that usually you only cluster in high-volume and use environments. For example when thousands/millions of users are accessing the same database at once. But with flat files, only one file can be written at a time so this is equivalent to locking an entire database (or entire table depending on how many flat files you have), which you would never do in any database environment with a lot of traffic. Therefore, flat file storage and clustering never go together unless there's some transaction/database manager distributing the work.

Keep in mind that if we're talking about a repository of files (like a storage system), this would be different, but in your original post you mentioned that all the database data would be in files, so I'm assuming this is not a repository. If you're going to go through the trouble to cluster your server, adding database support is trivial.
[ December 16, 2005: Message edited by: Scott Selikoff ]
 
author
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To get the benefits of clustering, you need WAS ND, not WAS express. WAS ND provides plug-ins for popular web servers like Apache or IIS. These plugins will load balance from the web server tier to the app server tier.

I suggest reading this Red Book:
http://www.redbooks.ibm.com/abstracts/sg246392.html?Open
 
jonathan Greens
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks guys.
Scott,
you are right, flat files will not scale if there's a large number of users. I might have to migrate the data part from xml files to a database like db2.
do I need to cluster the database as well or does the database just sits on one machine?
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You usually cluster application servers before clustering a database and in most smaller-medium systems its not required. There's no general answer though. You have to take into account the hardware, the network connection, the database software, and most importantly the expected number of users and database load.

I'd recommend starting off with a single database and application server and add more as you need, unless you know for sure clustering will be an integral part of your system. For smart database management systems, the database software supports transparent clustering, ie the application server is oblivious to the database clustering.
[ December 20, 2005: Message edited by: Scott Selikoff ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic