SlideShare uma empresa Scribd logo
1 de 32
MIDDLEWARE TECHNOLOGY
A. MARTIN, Asst., Prof.,
Dept. of IT,
Sri Manakula Vinayagar Engg.
College, Puducherry.
Presented By:
OBJECTIVE
 Various computational logic’s.
 Classification of client-server
architecture.
 Middleware Logic and its need.
 Types of Middleware.
 Server side components – EJB.
CONTENTS...
Introduction about Computational
Logic’s.
Single-Tier , Two-Tier, and Three-Tier
Applications.
Middleware Services and N-Tier Architecture.
Types of Middleware Logic.
Server Side Components – EJB.
Types of EJB.
Roles in EJB.
Conclusion
When you develop a computer or
software application - Logic’s required,
Business Logic
Data Logic
Presentation Logic
Data Driver Logic
Transaction Logic
Security Logic
INTRODUCTION
CLIENT SEVER APPLICATIONS
Server
 It is an entity which have resources that
can be shared by all of its clients.
Client
 It is an entity which takes or consumes
resources from the server.
Client/Server Architecture
 It is an architecture to develop an
application which is based on layering of
logic’s.
Single Tier Architecture
All the logic’s kept in a single place or
intermixing of various logic.
Presentation Logic
Business Logic
Data Logic
A STANDALONE
APPLICATION
A COMPUTER SYSTEM
Disadvantage
 Changing of one logic affects the
other parts of logic.
 It is difficult to modify the
changes.
Data Logic
PRESENTATION
LOGIC
BUSINESS LOGIC
Client 1 Client 2 Client N
Server
DATA LOGIC
Two Tier Architecture
Two Tier Architecture
Two levels of layering.
Advantage - Any modification in database
server which in reflects all the clients.
Disadvantage - Any change in one client
cannot be reflected in other clients.
Server Side
Programs
PRESENTATION LOGIC
BUSINESS LOGIC
DATA LOGIC
Client 1
Client 2
Client N
Three Tier Architecture
Three Tier Architecture
Three levels of layering.
Advantage - Any modification in server side
program which reflects all the clients.
It is good for medium size applications.
Disadvantage
Not suitable for large scale applications or
enterprise applications…
The intermixing of business logic with other logic
leads to complexity.
Issues on Three-Tier Architecture
LOAD BALANCING
 Server with lightest load.
 If Server overloaded – different server
should be chosen.
TRANSPARENT FAIL-OVER
 If a server crashes or if the network
crashes can clients rerouted to other
server without interruption of service.
TRANSACTIONS
 What if two clients access the same row
of the database simultaneously.
 What if the database crashes?
DYNAMIC REDEPLOYMENT
 How do you perform software upgrades
while site is running?
 Machine down or keep running.
THREADING
 Processing multiple client requests
simultaneously – server multi-threaded
SECURITY
 The servers and databases need to be
shielded from unknown users.
Issues on Three-Tier Architecture cont…
LOGGING AND AUDITTING
 If something goes wrong, is there a log
that we can consult to determine the
cause of the problem.
OBJECT LIFE CYCLE
 When client traffic increases or decreases
respectively.
 The objects that live within server need to
be created or destroyed.
Issues on Three-Tier Architecture cont…
Together these services are called
MIDDLEWARE services.
Middleware services are available in Multi-
tier architecture.
Nowadays most of the applications are
developed using Middleware technology.
E.g.: EJB, CORBA, DCOM, .NET Framework.
MIDDLEWARE
MIDDLE
WARE
LOGIC
BUSINE
SS
LOGIC
PRESENTATION
LOGIC
DATA
LOGIC
APPLICATION
SERVER
Client 1
Client 2
Client 3
Client N
Multi-tier Architecture
 In the past most of the companies built
their own Middleware.
 The application servers were born to let
you buy these middleware services,
rather than build them yourself.
 Application servers allow developers to
focus on server side application
development and NOT WORRY about
middleware services.
 E.g. Web Logic, IBM Web Sphere,
Sun’s J2EE Server.
APPLICATION SERVERS
TYPES OF MIDDLEWARE
 Explicit Middleware
 Implicit Middleware
EXPLICIT MIDDLEWARE
our business logic is intertwined with the logic to call these
middleware APIs.
EXAMPLE
 transfer(Account account1, Account
account2, long amount) {
 // 1: Call middleware API to perform a security
check
 // 2: Call middleware API to start a transaction
 // 3: Call middleware API to load rows from the
database
 // 4: Subtract the balance from one
account, add to the other – Business Logic
 // 5: Call middleware API to store rows In the
database
 // 6: Call middleware API to end the transaction
 }
 Example - Traditional distributed object
technologies such as CORBA, DCOM, or RMI
IMPLICIT MIDDLEWARE
 Write your distributed object to contain only
business logic.
 Do not write to complex middleware APIs.
 For example, here’s the code that would run
inside the distributed object
transfer(Account account1, Account
account2, long amount) {
// 1: Subtract the balance from one
account, add to the other }
REQUEST INTERCEPTOR
 Declare the middleware services that the
distributed object needs in a separate
descriptor file, such as a plain text file.
 For example, you might declare that you
need transactions, persistence, and a
security check.
 The request interceptor intercepts
requests from the client, performs the
middleware that your distributed object
needs and then delegates the call to the
distributed object.
IMPLICIT MIDDLEWARE (Gained through
declarations).
Newer, component-based technologies (EJB,
CORBA Component Model, and Microsoft COM+)
Enterprise Java Beans (EJB)
Enterprise Java Beans (EJB) is a server – side
component architecture that simplifies the process
of building enterprise – class distributed
component applications in java.
Multi-tiered Architecture
In multi-tiered application the various components
that make up application are logically separated,
across levels or layers of the network-computing
environment.
Distributed Applications
In distributed applications the communication lies
between two or more different objects running on
different machines.
SERVER SIDE COMPONENTS
 Applications should be constructing as group of
components.
 Component is code that implements a set of well-
defined interfaces.
 Components are not entire application – they
cannot run alone.
 Components can be used as puzzle pieces to solve
some larger problem.
EXAMPLE
 Pricing Component – computes the prices of
goods.
 Shipping Component – Cargo Shipping –
Tracking the cargo status.
PRICING RULES
 Base prices – ordering for single hard disk.
 Quantity discounts – ordering for more than
10 speakers.
 Bundling discounts – ordering for both hard
disk and speakers.
 Preferred customer – big-name customers
 Locale discounts – depending upon where
customer lives
 Overhead costs – shipping and taxes.
 Each company develops – wastage of resources
 Generic pricing component – reused for different
customers.
EXAMPLES
 U.S POSTAL SERVICE - compute shipping costs
for mailing packages.
 AUTOMOBILE MANUFACTURER – determine
prices for car
 ONLINE TEXTILE SHOPPING – determine
prices for cloth items.
REUSABILITY - COMPONENTS
Types of EJB
SESSION BEANS
 Session beans model business process.
 They are like verbs because they are actions –
action could be anything.
 They contains business process – related logic.
 E.g.:- adding any numbers, Credit card
verification, etc.,
ENTITY BEANS
 Entity beans model business data.
 They contain data-related logic.
 They are like nouns because they are data
objects
 E.g.:- a product, an order, an employee or a
credit card.
Clients interacting with an EJB
component system
Roles in EJB
EJB encourages participation of more than six different
parties,
The Bean Provider
 Supplies business components or enterprise beans.
The Application Assembler
 Make components fit together
 Writes applications that combine components.
The EJB Deployer
 How to deploy beans within servers
 Customize the beans for specific environment.
The System Administrator
 Oversee the stability of the operational environment
 Monitoring of the deployed system.
The Container and Service Provider
 EJB Container or Application server
 This is the runtime environment in which the bean lives.
 BEA’s Weblogic
 IBM’s WebSphere
 Oracle’s Oracle 9i
 JBoss open source application server.
The Tool Vendor
 Integrated Development Environments – IDEs
 IBM’s visual age for Java
 Borland’s JBuilder.
Time to interact

Mais conteúdo relacionado

Mais procurados

Client server based computing
Client server based computingClient server based computing
Client server based computing
Mohammad Affan
 
Topic3 Enterprise Application Integration
Topic3 Enterprise Application IntegrationTopic3 Enterprise Application Integration
Topic3 Enterprise Application Integration
sanjoysanyal
 
App designer2 in peoplesoft
App designer2 in peoplesoftApp designer2 in peoplesoft
App designer2 in peoplesoft
Venkat Jyesta
 
ETL Profile-Rajnish Kumar
ETL Profile-Rajnish KumarETL Profile-Rajnish Kumar
ETL Profile-Rajnish Kumar
Rajnish Kumar
 

Mais procurados (20)

EAI example
EAI exampleEAI example
EAI example
 
Client server based computing
Client server based computingClient server based computing
Client server based computing
 
Java unit 4_cs_notes
Java unit 4_cs_notesJava unit 4_cs_notes
Java unit 4_cs_notes
 
J2 ee tutorial ejb
J2 ee tutorial ejbJ2 ee tutorial ejb
J2 ee tutorial ejb
 
Mba ii u v enterprise application integration
Mba ii u v enterprise application integrationMba ii u v enterprise application integration
Mba ii u v enterprise application integration
 
Meeting Mobile and BYOD Security Challenges
Meeting Mobile and BYOD Security ChallengesMeeting Mobile and BYOD Security Challenges
Meeting Mobile and BYOD Security Challenges
 
BizTalk Server- Schema
BizTalk Server-  SchemaBizTalk Server-  Schema
BizTalk Server- Schema
 
XML Unit 01
XML Unit 01XML Unit 01
XML Unit 01
 
Topic3 Enterprise Application Integration
Topic3 Enterprise Application IntegrationTopic3 Enterprise Application Integration
Topic3 Enterprise Application Integration
 
Informatica Online Training
Informatica Online Training Informatica Online Training
Informatica Online Training
 
J2EE Architecture Explained
J2EE  Architecture ExplainedJ2EE  Architecture Explained
J2EE Architecture Explained
 
Ra framework 0.1
Ra framework 0.1Ra framework 0.1
Ra framework 0.1
 
Mallikarjun_Konduri
Mallikarjun_KonduriMallikarjun_Konduri
Mallikarjun_Konduri
 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
 
Modernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standardsModernizing SCA through new Object Management Group (OMG) standards
Modernizing SCA through new Object Management Group (OMG) standards
 
App designer2 in peoplesoft
App designer2 in peoplesoftApp designer2 in peoplesoft
App designer2 in peoplesoft
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web Application
 
An Inference Sharing Architecture for a More Efficient Context Reasoning
An Inference Sharing Architecture for a More Efficient Context ReasoningAn Inference Sharing Architecture for a More Efficient Context Reasoning
An Inference Sharing Architecture for a More Efficient Context Reasoning
 
ETL Profile-Rajnish Kumar
ETL Profile-Rajnish KumarETL Profile-Rajnish Kumar
ETL Profile-Rajnish Kumar
 
Canonical data model
Canonical data modelCanonical data model
Canonical data model
 

Semelhante a N - Tier Applications, Enterprise Java Beans, Component technologies

enterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdfenterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdf
EidTahir
 
Differences Between Architectures
Differences Between ArchitecturesDifferences Between Architectures
Differences Between Architectures
prasadsmn
 
Client Server Architecture
Client Server ArchitectureClient Server Architecture
Client Server Architecture
suks_87
 

Semelhante a N - Tier Applications, Enterprise Java Beans, Component technologies (20)

icv
icvicv
icv
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
client-server-architecture.ppt
client-server-architecture.pptclient-server-architecture.ppt
client-server-architecture.ppt
 
client-server-architecture ss.ppt
client-server-architecture ss.pptclient-server-architecture ss.ppt
client-server-architecture ss.ppt
 
[IJET-V2I2P8] Authors:Ms. Madhushree M.Kubsad
[IJET-V2I2P8] Authors:Ms. Madhushree M.Kubsad[IJET-V2I2P8] Authors:Ms. Madhushree M.Kubsad
[IJET-V2I2P8] Authors:Ms. Madhushree M.Kubsad
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 
soa1.ppt
soa1.pptsoa1.ppt
soa1.ppt
 
E-Business And Technology Essay
E-Business And Technology EssayE-Business And Technology Essay
E-Business And Technology Essay
 
Resume
ResumeResume
Resume
 
Enterprise java unit-1_chapter-2
Enterprise java unit-1_chapter-2Enterprise java unit-1_chapter-2
Enterprise java unit-1_chapter-2
 
enterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdfenterprisejavaunit-1chapter-2-210914075956.pdf
enterprisejavaunit-1chapter-2-210914075956.pdf
 
Differences Between Architectures
Differences Between ArchitecturesDifferences Between Architectures
Differences Between Architectures
 
Client Server Architecture
Client Server ArchitectureClient Server Architecture
Client Server Architecture
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Ashish tripath
Ashish tripathAshish tripath
Ashish tripath
 
J2 ee archi
J2 ee archiJ2 ee archi
J2 ee archi
 
Web based booking a car taxi5
Web based booking a car taxi5Web based booking a car taxi5
Web based booking a car taxi5
 
chapter 2.pdf
chapter 2.pdfchapter 2.pdf
chapter 2.pdf
 
Distributed Systems in Data Engineering
Distributed Systems in Data EngineeringDistributed Systems in Data Engineering
Distributed Systems in Data Engineering
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Último (20)

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 

N - Tier Applications, Enterprise Java Beans, Component technologies

  • 1. MIDDLEWARE TECHNOLOGY A. MARTIN, Asst., Prof., Dept. of IT, Sri Manakula Vinayagar Engg. College, Puducherry. Presented By:
  • 2. OBJECTIVE  Various computational logic’s.  Classification of client-server architecture.  Middleware Logic and its need.  Types of Middleware.  Server side components – EJB.
  • 3. CONTENTS... Introduction about Computational Logic’s. Single-Tier , Two-Tier, and Three-Tier Applications. Middleware Services and N-Tier Architecture. Types of Middleware Logic. Server Side Components – EJB. Types of EJB. Roles in EJB. Conclusion
  • 4. When you develop a computer or software application - Logic’s required, Business Logic Data Logic Presentation Logic Data Driver Logic Transaction Logic Security Logic INTRODUCTION
  • 5. CLIENT SEVER APPLICATIONS Server  It is an entity which have resources that can be shared by all of its clients. Client  It is an entity which takes or consumes resources from the server. Client/Server Architecture  It is an architecture to develop an application which is based on layering of logic’s.
  • 6. Single Tier Architecture All the logic’s kept in a single place or intermixing of various logic. Presentation Logic Business Logic Data Logic A STANDALONE APPLICATION A COMPUTER SYSTEM
  • 7. Disadvantage  Changing of one logic affects the other parts of logic.  It is difficult to modify the changes.
  • 8. Data Logic PRESENTATION LOGIC BUSINESS LOGIC Client 1 Client 2 Client N Server DATA LOGIC Two Tier Architecture
  • 9. Two Tier Architecture Two levels of layering. Advantage - Any modification in database server which in reflects all the clients. Disadvantage - Any change in one client cannot be reflected in other clients.
  • 10. Server Side Programs PRESENTATION LOGIC BUSINESS LOGIC DATA LOGIC Client 1 Client 2 Client N Three Tier Architecture
  • 11. Three Tier Architecture Three levels of layering. Advantage - Any modification in server side program which reflects all the clients. It is good for medium size applications. Disadvantage Not suitable for large scale applications or enterprise applications… The intermixing of business logic with other logic leads to complexity.
  • 12. Issues on Three-Tier Architecture LOAD BALANCING  Server with lightest load.  If Server overloaded – different server should be chosen. TRANSPARENT FAIL-OVER  If a server crashes or if the network crashes can clients rerouted to other server without interruption of service. TRANSACTIONS  What if two clients access the same row of the database simultaneously.  What if the database crashes?
  • 13. DYNAMIC REDEPLOYMENT  How do you perform software upgrades while site is running?  Machine down or keep running. THREADING  Processing multiple client requests simultaneously – server multi-threaded SECURITY  The servers and databases need to be shielded from unknown users. Issues on Three-Tier Architecture cont…
  • 14. LOGGING AND AUDITTING  If something goes wrong, is there a log that we can consult to determine the cause of the problem. OBJECT LIFE CYCLE  When client traffic increases or decreases respectively.  The objects that live within server need to be created or destroyed. Issues on Three-Tier Architecture cont…
  • 15. Together these services are called MIDDLEWARE services. Middleware services are available in Multi- tier architecture. Nowadays most of the applications are developed using Middleware technology. E.g.: EJB, CORBA, DCOM, .NET Framework. MIDDLEWARE
  • 17.  In the past most of the companies built their own Middleware.  The application servers were born to let you buy these middleware services, rather than build them yourself.  Application servers allow developers to focus on server side application development and NOT WORRY about middleware services.  E.g. Web Logic, IBM Web Sphere, Sun’s J2EE Server. APPLICATION SERVERS
  • 18. TYPES OF MIDDLEWARE  Explicit Middleware  Implicit Middleware
  • 19. EXPLICIT MIDDLEWARE our business logic is intertwined with the logic to call these middleware APIs.
  • 20. EXAMPLE  transfer(Account account1, Account account2, long amount) {  // 1: Call middleware API to perform a security check  // 2: Call middleware API to start a transaction  // 3: Call middleware API to load rows from the database  // 4: Subtract the balance from one account, add to the other – Business Logic  // 5: Call middleware API to store rows In the database  // 6: Call middleware API to end the transaction  }  Example - Traditional distributed object technologies such as CORBA, DCOM, or RMI
  • 21. IMPLICIT MIDDLEWARE  Write your distributed object to contain only business logic.  Do not write to complex middleware APIs.  For example, here’s the code that would run inside the distributed object transfer(Account account1, Account account2, long amount) { // 1: Subtract the balance from one account, add to the other }
  • 22. REQUEST INTERCEPTOR  Declare the middleware services that the distributed object needs in a separate descriptor file, such as a plain text file.  For example, you might declare that you need transactions, persistence, and a security check.  The request interceptor intercepts requests from the client, performs the middleware that your distributed object needs and then delegates the call to the distributed object.
  • 23. IMPLICIT MIDDLEWARE (Gained through declarations). Newer, component-based technologies (EJB, CORBA Component Model, and Microsoft COM+)
  • 24. Enterprise Java Beans (EJB) Enterprise Java Beans (EJB) is a server – side component architecture that simplifies the process of building enterprise – class distributed component applications in java. Multi-tiered Architecture In multi-tiered application the various components that make up application are logically separated, across levels or layers of the network-computing environment. Distributed Applications In distributed applications the communication lies between two or more different objects running on different machines.
  • 25. SERVER SIDE COMPONENTS  Applications should be constructing as group of components.  Component is code that implements a set of well- defined interfaces.  Components are not entire application – they cannot run alone.  Components can be used as puzzle pieces to solve some larger problem. EXAMPLE  Pricing Component – computes the prices of goods.  Shipping Component – Cargo Shipping – Tracking the cargo status.
  • 26. PRICING RULES  Base prices – ordering for single hard disk.  Quantity discounts – ordering for more than 10 speakers.  Bundling discounts – ordering for both hard disk and speakers.  Preferred customer – big-name customers  Locale discounts – depending upon where customer lives  Overhead costs – shipping and taxes.
  • 27.  Each company develops – wastage of resources  Generic pricing component – reused for different customers. EXAMPLES  U.S POSTAL SERVICE - compute shipping costs for mailing packages.  AUTOMOBILE MANUFACTURER – determine prices for car  ONLINE TEXTILE SHOPPING – determine prices for cloth items. REUSABILITY - COMPONENTS
  • 28. Types of EJB SESSION BEANS  Session beans model business process.  They are like verbs because they are actions – action could be anything.  They contains business process – related logic.  E.g.:- adding any numbers, Credit card verification, etc., ENTITY BEANS  Entity beans model business data.  They contain data-related logic.  They are like nouns because they are data objects  E.g.:- a product, an order, an employee or a credit card.
  • 29. Clients interacting with an EJB component system
  • 30. Roles in EJB EJB encourages participation of more than six different parties, The Bean Provider  Supplies business components or enterprise beans. The Application Assembler  Make components fit together  Writes applications that combine components. The EJB Deployer  How to deploy beans within servers  Customize the beans for specific environment. The System Administrator  Oversee the stability of the operational environment  Monitoring of the deployed system.
  • 31. The Container and Service Provider  EJB Container or Application server  This is the runtime environment in which the bean lives.  BEA’s Weblogic  IBM’s WebSphere  Oracle’s Oracle 9i  JBoss open source application server. The Tool Vendor  Integrated Development Environments – IDEs  IBM’s visual age for Java  Borland’s JBuilder.