• Post Reply Bookmark Topic Watch Topic
  • New Topic

Architecture Design Suggestion Needed

 
Tamilthaaragai Muthukumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone !!
We are supposed to develop a Web Application for Employee Time Tracking with Biometric and RFID System (hardware) inputs as data to the software. We are considering two different approaches and it would be nice to receive some form of feedback before deciding on the one.

The important aspects that we are concerned about are Response Time, Workload, Scalability and performance of the application. It would be nice, if someone could throw light on which approach would be a better choice (We would be happy if you could suggest us something better than this too ).

APPROACH 1:
Client and Server are hosted separately.

CLIENT:
Presentation Tier:Browser Request handler -JSP,Spring MVC

SERVER:
-----(RESTful Web Service)----
Business Logic Tier: Spring MVC
Data Access Layer: Hibernate DAO

-------------------------------
Data Store Tier: DB server

--------------------------------
APPROACH 2:
All the 3 layers will be hosted together

Presentation Tier: View Logic - JSP+ Struts

Business Tier : Spring MVC

Data Access Layer: Hibernate

Best Regards !!
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the choice is between having the view layer (a client is something else) run in the same container/server as the middle and backend layers, or having it run in a different container/server?

I don't see that having a big impact on performance. All layers running in the same container/server has potential performance benefits (no network or inter-container traffic between them), but you can no longer scale them independently of the middle and backend layers. Whether that makes a difference depends on the traffic you expect, the response time requirements you have, and multiple other factors about which we know nothing.
 
Jayesh A Lalwani
Rancher
Posts: 2762
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are worried about scalability, the first thing you need to identify is what parts need to scale. Sure, you could design your application so every component can scale independent of the other. However, premature optimization is the root of all evil, and if you are building an architecture that fulfills a specific need, then ultra-scalability is premature optimization.

So, yeah, what parts need to scale. Right now, you have identified 3 components, Presentation, Business and Data. Remember, any given load will stress each component, but to a differrent degree. You need to identify what the bottleneck is

Is the Presentation the bottleneck? Based on what you have described, it's highly unlikely. If you were building a file sharing application that served huge files, you might have a heavy front end. But you never know. You need to look at your Presentation requirements. If you had a heavy presentation layer, you would need to seperate the Presentation from the Business in some sort of SOA architecture. Most likely, though, your biggest load will be serving up static content, and you can easily scale this up by putting it on some sort of Content Delivery Network, and but your dynamic presentation layer on the same infrastructure as business. Problem solved

Is the Business layer the bottleneck? It could be. Again, you need to look at your requirements. Are you doing something that requires billions or trillions of computations, then yes, you need to worry about scaling up the business layer. You might want to consider big data technologies that are designed to scale computations, for example, Hadoop, or Storm or Spark. Or are you expecting a huge volume of short and fast transactions that do not hit the DB? Then you might just simply need a cluster of web servers running your application, fronted by a load balancer

Is the Database layer the bottleneck? Sounds to me like this is where you are most likely to bottleneck. You are going to keep biometric information, right? whcih might have lot of elements in them? What's your back end technology? DOes it scale? What do you expect out of your Data layer? Is it mostly transactional? or do you need to run reports. DO you just keep adding data, or do you do lot of updates?

I'm afraid that in your initial analysis you are mistaking selection of tool (Hibernate DAO) for architecture. Selection of tool is an important part, yes, but in this case Hibernate DAO does nothing wrt scalability. When you talk about architecture, you need to consider what are the main drivers of the architecture design. And if one of the key drivers is performance and scalability of the application, then you need to consider whether all technologies in your stack support your performance and scalability goals. THis includes the selection of database, and the middleware technologies. Spring MVC and Hibernate DAO are going to do squat if your database is the bottleneck.
 
Rajit kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keep all layers togather instead of separation of layers and deploy it on clustered environment. The size of network vary on load factor too. Ensure load balancing mechanism in place and no single point of failure. You can define db server location based on read/write trips to database.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!