• 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

Proposed architecture

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure if this is the right forum to discuss. If not please suggest which forum I should post my question to.

The below is not at all related to SCEA certification.

I have to design a heavy traffic web application and would like to discuss the technical architecture of same.

The requirement is as below:

Design a retail mart which wants to get into business of selling products online. The retail mart has a variety of products and it has 2 main geographies to serve (US and Japan). The web application should provide localized content based on the geography from where the user is accessing the web application.
The application needs to have online payment functionality and the purchased items should be shipped to customers within 5 working days.

The application needs to be have following NFRs
- Scalable. There is likelihood that the application usage would grow over time and thus the architecture should be scalable to attend to increasing volmes
- Performance: The application should have quick response time. The reponse time should be equivalent in both geographies(USA and Japan)
- High availability application
- DR: In case of a server failure the DR site should be up and running with latest data within 1 hr

Can you help me propose an effective architecture for this application.

Below is my take on the architecture:

Logical architecture:
Web application with following tiers:
Presentation Tier:
Comprises of Servlets/JSP with Strut2
Would use Struts capability to give localized content based on resource bundles

Middle Tier
Consist of Application Layer and DAO layer
The application layer would contain all the business logic.The layer would be implemented using Spring with POJOs
The DAO tier would integrate with Oracle database. The DAO objects would use Hibernate for interacting with database. We would utilize Hibernate's 2nd level cache (using JBoss Tree cache) to cache very frequently purchased items data so that same item can be fetched from cache 2nd time around.
The cache would be "transactional" cache and would be refreshed whenever an item is updated or deleted.
The DAO would use stored procedures for specific functions which require quicker response.(Not clear here)

Database Tier
Would use stored procedures

For delivery module:
The module will be responsible for taking orders and then ensuring that items are shipped to customer address

This module would be designed as a asynchronous application as it is a offline activity. The billing module would send orders as JMS messages which the delivery module would pick up and process. Please comment on this.

To handle the NFRs below is the proposal:
- Scalable. There is likelihood that the application usage would grow over time and thus the architecture should be scalable to attend to increasing volmes
Soln: The application would be multi-clustered deployment which would be front ended by a load balancer. This would ensure that we can add a new cluster as and when a need arises

- Performance: The application should have quick response time. The reponse time should be equivalent in both geographies(USA and Japan)
Soln: I would like to have physical server in each of these locations(ie one in USA and one in Japan). My question is how would I divert the trafic from japan to the physical server located in Japan
Is there any reference material which I can read to understand this aspect of deployment more.

- High availability application
Soln: Would be handled through multi-cluster deployment

- DR: In case of a server failure the DR site should be up and running with latest data within 1 hr
Soln: I am at a loss wrt solution for this requirement

I would like to know if there are any suggestions/opinions/recommendation anyone has on the above architecture
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Soln: The application would be multi-clustered deployment which would be front ended by a load balancer. This would ensure that we can add a new cluster as and when a need arises



Where do you store session state ? In the DB ? Can the DB scale with the application tier ?

My question is how would I divert the trafic from japan to the physical server located in Japan
Is there any reference material which I can read to understand this aspect of deployment more.



Lookup routers / load balancers that have affinity.

 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this is not about the SCEA exam, I'm moving it to our JEE forum. (JEE or Spring would be the most appropriate places.) Since you didn't decide whether to use Spring, I'm going with the more general one.
 
Pankaj Kumarkk
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My question is how would I divert the trafic from japan to the physical server located in Japan
Is there any reference material which I can read to understand this aspect of deployment more.



Lookup routers / load balancers that have affinity.



Can you elaborate a little.
I have 2 questions here:
My soln is to have a physical server located in 2 geographies and the users of each geography feed from the server in their geography. This would mean that the both the app and DB needs to be in each geography.
Q1: Is this architecture good enough. Are there any better option
Q 2. How do we keep the data synchronized between 2 DB servers(so that same item can not be bought twice).
Q3: How do I configure the Lookup routers / load balancers for each georgraphy
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Q 2. How do we keep the data synchronized between 2 DB servers(so that same item can not be bought twice).



You are talking about the request being idempotent. It does not necessarily have to do with synchronizing the 2 databases. How do you differentiate a duplicate request from a user wanting to buy the same item in 2 different orders ?

There are ways to synchronize a DB over the network. It is expensive and any system that wishes to scale should adopt a model that is eventually consistent.

Q3: How do I configure the Lookup routers / load balancers for each georgraphy

This is low level detail. It is best left to a Network Operations Control team. From an architecture perspective, all one needs to know is that such technology exists and can be configured. You can route by IP proximity for example
 
Pankaj Kumarkk
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Deepak,
Thanks for the response. I think I didn't provide enough information regarding the database configuration.

Q 2. How do we keep the data synchronized between 2 DB servers(so that same item can not be bought twice).
You are talking about the request being idempotent. It does not necessarily have to do with synchronizing the 2 databases. How do you differentiate a duplicate request from a user wanting to buy the same item in 2 different orders ?



Essentially I have a requirement to give same performance for users located in US and Japan. For this requirement, I intend to have 2 physical servers located in vicinity of US and Japan.
Thus the deployment structure would be

In US
Application Server + DB Server

In Japan
Application Server + DB Server

Thus I have copy of application and DB server set-up in 2 geographies. Since both these have common data therefore I I need to ensure that the data in 2 DB servers is in sync. Thus I asked how to keep data synchronized in 2 DB servers.


Q3: How do I configure the Lookup routers / load balancers for each georgraphy

This is low level detail. It is best left to a Network Operations Control team. From an architecture perspective, all one needs to know is that such technology exists and can be configured. You can route by IP proximity for example


Can you refer me to any link/reference where I can learn more about it. I intend to do a working POC for my architecture and thus want to set-up a working sample module.
 
reply
    Bookmark Topic Watch Topic
  • New Topic