2. OBJECTIVE
īŽ Various computational logicâs.
īŽ Classification of client-server
architecture.
īŽ Middleware Logic and its need.
īŽ Types of Middleware.
īŽ Server side components â EJB.
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.
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.
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
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.
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.