Software Architecture in Practice - PowerPoint PPT Presentation

About This Presentation
Title:

Software Architecture in Practice

Description:

Distributed objects could communicate and interact with each other ... Fonte: http://info.borland.com/techpubs/jbuilder/jbuilder2005/enterprise/images ... – PowerPoint PPT presentation

Number of Views:1272
Avg rating:3.0/5.0
Slides: 25
Provided by: anapaulac
Category:

less

Transcript and Presenter's Notes

Title: Software Architecture in Practice


1
Software Architecturein Practice
  • RiSEs Seminars
  • Basss et al. Book Chapter 16
  • Fred Durão

2
Summary
  • J2EE/EJB (Chapter 16)
  • The J2EE Architectural Solution
  • The EJB Architectural Solution
  • EJB Programming
  • Deployment Descriptors
  • System Deployment Decisions

3
J2EE/EJB A case study of an Industry-Standard
Computing Infrastructure
4
History
J2EE/EJB Chapter 16
  • In early 1990s was developed CORBA on which
  • Distributed objects could communicate and
    interact with each other seamlessly and
    transparently.
  • After, Sun Microsystems pushed the Java
    programming Language to support RMI (Remote
    Method Invocation)
  • The Microsoft release the framework .Net
  • In 1997 Sun Microsystems releases the framework
    J2EE/EJB

5
Requirements and qualities
J2EE/EJB Chapter 16
  • The Wimbledon Tennis tournament experienced
    almost 1 billion Web access in 1999, with 420.000
    hits per minute (7000 per second) during one
    match
  • J2EE/EJB aims to
  • Provide a component-based architecture for
    building distributed OO applications in Java
  • Scalability e.g. web access
  • Availability 24/7
  • Security - AA
  • Usability access in different forms
  • Performance latency
  • Portability run in a variety of computing
    platforms
  • Interoperability server side components
    implemented on different vendors
  • Extensibility e.g. struts, JSF

6
Architectural Solution
J2EE/EJB Chapter 16
  • 3 major features
  • A multi-tiered distributed application model
  • A server-side component model
  • Built-in transaction control
  • Components and Services
  • EJB server-side component
  • JSP
  • Java Servelt
  • JMS Java Message Service
  • JNDI
  • JTS Java Transaction Service
  • JCA Java Connector Architecture
  • COM Bridge
  • RMI over IIOP
  • JDBC
  • Fontehttp//java.sun.com/j2ee/appmodel.html

7
The EJB Architectural Approach
J2EE/EJB Chapter 16
Fonte http//info.borland.com/techpubs/jbuilder/j
builder2005/enterprise/images/ejb-architecture.gif
8
The EJB Architectural Approach 2
J2EE/EJB Chapter 16
  • Session Beans
  • Stateless session beans
  • Stateful session beans
  • Entity Beans
  • Container Manager Persistence
  • Bean Manager Persistence

9
The EJB Architectural Approach achieving
qualities
J2EE/EJB Chapter 16
Goal Tactics Used
Availability/Reliability Heartbeat Transactions Passive Redundancy
Implementation Transparency Maintain existing interfaces Semantic Coherence
Interoperability Adherence to defined protocols
Performance Configuration Files Load balancing Maintain multiple copies
Scalability Load balancing
10
EJB - Programming
J2EE/EJB Chapter 16
  • To create EJB server-side component, the
    developer must provide two interfaces
  • Home
  • Contain the life cycle methods of the EJB
  • Remote
  • Business methods offered by the bean

11
EJB Programming 2
J2EE/EJB Chapter 16
12
EJB Entity Bean
J2EE/EJB Chapter 16
13
EJB Interface Home
J2EE/EJB Chapter 16
14
EJB Remote Interface
J2EE/EJB Chapter 16
15
Deployment Descriptor
J2EE/EJB Chapter 16
  • It is XML document associated with an EJB that
  • Describes the type of the bean (session or
    entity)
  • Describes the classes used for home, remote and
    the bean classes
  • Specifies the transactional attributes (access
    control)
  • Specified if the persistence in the entity bean
    is handled automatically by the container or
    performed explicitly by the bean code
  • This the SEMANTIC COHERENCE tactic implemented

16
Deployment Descriptor ejb-jar.xml
J2EE/EJB Chapter 16
17
Database Descriptor
J2EE/EJB Chapter 16
18
State Management A performance decision
J2EE/EJB Chapter 16
  • Stateful Session Bean
  • Must be used to atomic actions
  • else may high the overhead in terms of
    application performance
  • Stateless Session Bean
  • Many request to the server
  • and persist the data on later
  • E.g. shopping cart

19
Entity Bean to Use or Not Use? Thats the
question
J2EE/EJB Chapter 16
  • Typical e-commerce system with an 85 read-only
    and 15 update transaction mix when implemented
    with entity beans achieved only half of this
    performance
  • Causes of degradations
  • Containersare the black boxes
  • Bad state management
  • Additional beans participate in the transaction

20
Distribution and Scaling Issues
J2EE/EJB Chapter 16
  • Two ways of increasing the processing power in
    the server tier
  • Scaling up, or vertical scaling
  • Adding memory or faster processors in a single
    machine
  • Scaling out, or horizontal scaling
  • The server application is distributed across more
    the one machine
  • Increased redundancy
  • Cost efficiency

21
Distributed Transactions
J2EE/EJB Chapter 16
  • Two phase commit protocol is often essential in
    building enterprise-wide system
  • Is it always necessary?
  • What about the overhead involved in managing
    them?
  • What about several remote calls that pass over
    the network?
  • What about the architect experience for that?

22
Resource Pooling Transactions
J2EE/EJB Chapter 16
  • Connections to the databases do not need to be
    re-established continuously, thus improving
    application performance

23
Dependence on Java Virtual Machine Performance
J2EE/EJB Chapter 16
  • If the heap size is big, garbage collection will
    be infrequentand this can slow down the server
    processing, giving the impression that the server
    is slow in unresponsive

24
References
J2EE/EJB Chapter 16
  • Bass L., Clements P. and Kazman R. Software
    Architecture in Practice. Second Edition, 2003.
  • a luz no fim do túnel pode ser um trem vindo em
    sua direção
Write a Comment
User Comments (0)
About PowerShow.com