Title: Web Architecture
1Web Architecture
2Introduction
- Architecture concept in software development
- From the point of the Unified Process
- Physical architecture
- Computational nodes distribution over the network
- Software component-computational node mapping
- Modern architecture concept
- Architectural design patterns
- Separation of concerns
- There is no way to represent the software
architecture with current tools (UP-UML)
3Java Web Applications Propagation
- Strong support from software producers
- Sun Microsystems. JEE
- BEA Systems, Weblogic
- IBM, WebSphere
- Netscape (Sun) iPlanet
- Orion Oc4J Oracle 9IAS
- And Strong support from the open source world!
- www.apache.org Development of the apache web
server, the most used in the world. - Jakarta.apache.org. Frameworks and support
classes to support server side web apps
development over JEE. - www.jboss.org EJB Container.
4Architectural Models Evolution
- Model 1
- Model 1.5
- Model 2
- Model 2X
Servlets/JSPs
MVC Model
Multichannel
5Architectural model 1 CGI Applications
- The most primitive ones.
- CGI Web apps.
- Presentation, business and persistence
responsibilities mixed. - The user state is stored in the client PC and
each request is a complete transaction
(Transaction Script)
6Architectural model 1.5JSP Servlets
- Separation of responsabilities
- JSPs for the presentation logic (Navegability,
rendering, etc.) - Embedded Beans implement business and persistence
responsabilities. -
7Architectural model 2MVC
- Evolution of the 1.5 model
- It incorporates the MVC pattern.
- Controller Navigability
- Business and Persistence Beans
- Presentation JSPs
8Architectural model 2MVC with Struts
- Struts the reference implementation of the MVC
that apache provides to implement web apps. - http//www.apache.org/struts
9Architectural model 2XMultichannel Applications
- Evolution of the model 2 to build multichannel
applications - Reference implementation STXX
- http//stxx.sourceforge.net/
- XML XSLTs based solutions
10General Aspects in Web Architecture
- Scalability
- Separation of Concerns
- Portability
- Componentize support services
- User session management, entity caching
- Design patterns use
11ScalabilityImportance?
- Main characteristic of Web applications
- Possible fast increasing of the number of users.
- Its important
- Right sizing of the system
- Adaptability of the system when the demand
increases. - Options
- Horizontal scalability
- Vertical scalability
- Cluster of Servers
12Horizontal Scalability
- We clone the system and balance the load
System
System
Internet users
System
System
13Horizontal Scalability. HW Balancer
- Selects the target machine for the HTTP request
based on pre-configured algorithms (Round Robin,
LRU, etc.) - So, the clone is selected randomly.
- Problem No warranty that different request from
the same user served by the same machine. -gt
There is no session maintenance in the server -gt
determines the design! - Session must be managed by the developer
explicitly by - Cookies
- Database
- Its HW-gt Its FAST!
14Horizontal Scalability. SW Balancer
- They examine the request at HTTP level to
guarantee user session maintenance. - Different requests from the same user are managed
by the same server. - Slower then HW balancers
- Cheap solutions
- Ex., mod mod_jk for apache.
15Horizontal Scalability. HTTP HW Balancer
- HW devices that examines the request at HTTP
level. - In the middle of the other ones.
- Warranty of session maintenance.
- Faster than SWB but slower than HWB.
16VerticalScalability
- We implement logic separation of layers in a way
that we can separate them physically. - We need a kind of Middleware to allow remote
invocation
17Scalability with Cluster of Serves
- Common in the commercial Application Servers
(Weblogic, WebSphere, iPlanet, etc.). - It can be defined as horizontal or vertical.
- Distributes and scale the system transparently to
user and administrator. - Guarantees that regardless of which server
process the request, it will have access to the
session of the user. (Session replication) - Session replication is costly and can decrease
system performance.
18Separation of concerns
- Base idea for the layer separation
- Different responsibilities should not be managed
by the same class. - Current trend in web app.
- n-layers architecture
- Based on the three layers model
- Presentation
- Business
- Persistence
- Independence between layers
19Separation of concerns
20Separation of concerns
21Presentation layer
- All around presentation logic responsibilities
- Navigability
- Input data validation
- Output data formatting
- Internationalization
- Presentation composition.
- Etc.
22Business layer
- Business responsibilities or logic
- Its the result of the functional analysis
- The set of business rules obtained from the real
world analysis.. - Must be independent of other layers
23Persistence layer
- Anything related with persistence logic, like
operations - insert
- delete
- update
- searches
- Etc.
- Not always based on relational databases.
24Portability
- An application should be able to be adapted to
different physical deploying environments. - The task of adapting to a new deploying
environments should be reduced to configuration
task. - Example Customer that doesn't want to be forced
to use EJB components.
25Componentize support services
- support or infrastructure services? Domain
independent components - Breaking separation of layers?
- Form the infrastructure layer
- Ex.
- Log service
- Pool JDBC
- Configuration Service
- Authorization service
- Etc.
26User Session Management
- Very Delicate Aspect!
- Entity caching in
- Httpsession object
- Application Context
- Information expiration
- Data refresh
- System performance? We are using server
resources!
27Design patterns use
- What is a design pattern?
- GOF 94 Design Patterns
- Moreover of being an standard solution, they are
a communication tool! - Gets software development faster
- Turns maintenance easier.
- Starting to be integrated in the CASE tools(Rose,
Together, etc.).
28Thanks!!!
- ?
- Dr. Daniel Fernández Lanvin
- University of Oviedo