Distributed vs Non-distributed Architecture
July 13, 2007 2 Comments
Is distributed architecture more scalable than non-distributed architecture?
Many J2EE architects and developers tend to assume distributed architecture offers unmatched scalability. However this assumption is questionable.
Distributed Architecture
Distributed architecture splits the presentation tier and middle tier physically and
logically to run in different servers. This is a complex architecture with significant overhead. The architecture uses RMI between presentation tier and middle tier. This makes remote invocation a major determinant of performance and design consideration. It forces to minimize number of remote calls.
Strengths of this architecture
- It can support different type of clients by providing a shared middle tier.
- It permits the distribution of application components across different physical servers.
Weakness of this architecture
- It is a complex approach should be chosen only if the requirement dictates.
- It affects performance. Remote method calls can be hundred of times slower than local calls. This will determine the overall performance of the application.
- Distributed applications are hard to test and debug, because it is heavily dependent on container service.
- OO design is severely hampered by the central use of RMI.
- Exception handlings are more complex. Must handle both application failure and transport failure.
- Should rely on third party application server.
- Complex to deploy.
Non-Distributed Architecture
In this architecture, presentation tier and middle tier of the application run in the same server. So the business components can be accessed locally without remote calls; this will improve significant performance of the overall application. However it is vital that presentation tier and middle tier are kept logically distinct. The main risk in the web application is that blurred responsibilities between presentation and business logic components.
Strengths of this architecture
- Simplest architecture for web applications
- Application can be developed faster
- Can implement good OO design
- Scales well. Can cluster to handle larger number of request.
- Less cost, many open-source stable web containers are available.
Weakness of this architecture
- This architecture supports only web interface clients.
- The whole application run in a single server while it boost performance, components cannot freely allocated to different physical layers.
- Need to write code to manage transactions.
- Need to write code for concurrent threading issues.
In most cases J2EE is used to build web applications. Thus, a J2EE web-container can provide the entire infrastructure required by many applications. Except entity bean all other services can be used in web-container such as JMX, JMS, JDBC, JavaMail, Database Transaction and Connection Pooling.
Venkat .. the context and the example you explained is perfectly not suitable for distributed .I know what project was in your mind when you wrote that !!! . But one question ? Assume multiple systems for example a huge quotiing , pricing , billing and ordering system .. if we implement all in one centralized system and the number of users are also a considerable figure per day for each functions . in this case a completly loosley coupled asynchrounous distributed soa system would be imaginable right ? So Avarage case complexity would be a considerable figure in terms of performance and scalability right.
Given any system design have an best and worst case complexity.I am not an advocate of EJB though like you .. but an advocate of distributed SOA ..
IsDMCK xqddittxtuke