3- tier client/server

25
3-Tier Client/Server [OOPSLA 연연연 ] [ 연 연 연 ]

Upload: jacqueline-williamson

Post on 31-Dec-2015

34 views

Category:

Documents


2 download

DESCRIPTION

이 프레젠테이션에는 수행 항목을 만드는 청중 토론이 포함되어 있습니다. 프레젠테이션하는 동안 PowerPoint 를 사용하여 수행 항목을 확인합니다. 슬라이드 쇼에서 마우스 오른쪽 단추를 누릅니다. “ 회의록 작성 ” 을 선택합니다. “ 수행 항목 ” 탭을 선택합니다. 제안되는 대로 수행 항목을 입력합니다. 이 상자를 없애려면 “ 확인 ” 을 누릅니다. 프레젠테이션 끝에 요점을 입력한 수행 항목 슬라이드를 자동으로 만들어 줍니다. 3- Tier Client/Server. [ OOPSLA 연구실] - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 3- Tier Client/Server

3-Tier Client/Server

[OOPSLA 연구실 ][ 민 경 섭 ]

Page 2: 3- Tier Client/Server

Why 3-Tier Client/Server ?

Page 3: 3- Tier Client/Server

Table of Contents

BackgroundWhat are these tiers ?Cons. & Pros. of 2-tier architectureWhy 3-tier architecture ?Comparison btw. 2-tier and 3-tierComponent based Middle tierWhen should you use 3-tier ?Conclusion

Page 4: 3- Tier Client/Server

Background

Demand enterprise-class applicationsPartitioning of applications

– 2-Tier, 3-Tier, N-Tier

Page 5: 3- Tier Client/Server

What are these Tiers ?

Physical partitioning of applications– terminal(tier1), minicomputer(tier2),

mainframes(tier3)

Logical partitioning of applications– 2-tier

• client(tier 1) :a big chunk of application• server(tier 2) : DBMS

– 3-tier• client(tier1) : GUI• application server(tier2) : all chunk of business

applications• server(tier3) : DBMS

Page 6: 3- Tier Client/Server

Benefits and Limitation of 2-Tier ArchitectureBenefits

– great for creating applications quickly using visual builder tools thanks to its simplicity

– appropriate to departmental applications• e.g.) decision support, small-scale groupware,

simple web-based applications

Limitations– not mission-critical, not scalable

Page 7: 3- Tier Client/Server

GUISQL, File Server, HTTP protocol

Tier 1 Tier 2

Database(orOther ResourceManagers)

A 2-Tier Client-Server Application Architecture

Tier 3

RPCs, Conversations, Queues,Publish-and-Subscribe,

Broadcasts, Object invocations

GUI

Tier 2Tier 1

ApplicationDatabase(orOther ResourceManagers)

A 3-Tier Client-Server Application Architecture

Page 8: 3- Tier Client/Server

Why 3-Tier Architecture ?

Needs of new world’s applications– Business will increasingly compete be being

the first to market with new electronic goods and services

– Companies will create virtual corporations through alliances with a shifting set of partners

– Roles and relationships btw. enterprises will shift frequently as industries realign

Page 9: 3- Tier Client/Server

Table 1-1 Intergalactic Client/Server vs. Departmental Client/ServerApplication Characteristic Departmental Client/Server Intergalactic Era Client/ServerNumber of clients per application Less than 100 MillionsNumber of servers per appliaction 1 or 2 homogeneous servers 100,000+

“Server mania” with manyheterogeneous servers performingdifferent roles

Geography Campus GolbalServer-to-server interactions No YesMiddleware SQL and stored procedures Components on the Internet and

intranetsClient/server architecture 2-tier 3-tier(or N-tier)Transactional updates Very infrequent PervasiveMultimedia content Low HighMobile agents No YesClient front-ends Fat clients On-demand clients, Webtops,

compound documents, andshippable places

Timeframe 1985 to present 1997-2000 and beyond

Page 10: 3- Tier Client/Server

Why 3-Tier Architecture ? (Cont’d)Reasons

– Meets the requirements of large-scale internet and intranet client/server applications

– Is easier to manage and deploy on the network• most of code runs on the servers, especially with

zero-footprint technologies like Java applets

– Minimizes network interchanges by creating abstract levels of service

– Provides better security• by not exposing the database schema to the client• by enabling more fine-grained authorization on the

server

Page 11: 3- Tier Client/Server

How Does 2-Tier Compare With 3-Tier ?

Table 2-2 참조

Page 12: 3- Tier Client/Server

Table 1-2 2-Tier vs. 3-Tier Client/Server2-Tier 3-Tier

System administration Complex(more logic on the client tomanage)

Less Complex(the application can be centrallymanaged on the server –application programs are madevisible to standard systemmanagement tools)

Security Low(data-level security)

High(fine-tuned at the service ormethod level)

Encapsulation of data Low(data tables are exposed)

High(the client invokes services ormethods)

Performance Poor(many SQL statements are sentover the network; selected datamust be downloaded for analysison the client)

Good(only service requests andresponses are sent between clientand server)

Scale Poor(limited management of clientcommunications links)

Excellent(concentrates incoming sessions;can distribute loads acrossmultiple servers)

Application reuse Poor(monolithic application on client)

Excellent(can reuse services and objects)

Ease of development High Getting Better(standard tools can be used tocreate the clients and tools areemerging that you can use todevelop both the client andserver sides of the application)

Page 13: 3- Tier Client/Server

Table 1-2 2-Tier vs. 3-Tier Client/Server2-Tier 3-Tier

Server-to-server infrastructure No Yes(via server-side middleware)

Internet support Poor(Internet bandwidth limitationsmake it harder to download fatclients and exacerbate the alreadynoted limitations)

Excellent(thin clients are easier todownload as applets or beans;remote service invocationsdistribute the application load tothe server)

Legacy application integration No Yes(via gateways encapsulated byservices or objects)

Heterogeneous database support No Yes(3-tier applications can usemultiple databases within thesame business transaction)

Rich communication choices No(only synchronous, connection-oriented RPC-like calls)

Yes(supports RPC-like calls, but canalso support connectionlessmessaging, queued delivery,publish-and-subscribe, andbroadcast)

Hardware architecture flexibility Limited(you have a client and a server)

Excellent(all three tiers may reside ondifferent computers, or thesecond and third tiers may bothreside on the same computer;with component-basedenvironments, you can distributethe second tier across multipleservers as well)

Availability Poor(can’t fail over to a backupserver)

Excellent(can restart the middle tiercomponents on other servers)

Page 14: 3- Tier Client/Server

Component Based Middle Tier(1)

The middle tier is implemented as a collection of components that are used in a variety of client-initiated business transactions

Operations of component– automates a relatively small business function– can call other components to help it implement

a request– some components act as gateways that

encapsulate legacy applications running on mainframes

Page 15: 3- Tier Client/Server

Component Based Middle Tier(2): Benefits

You can develop big applications in small steps

Applications can reuse components that are binary “black boxes”

Clients can access data and functions easily and safely– by encapsulation of details of the application

logic from the client

Custom applications can incorporate off-the-shelf components

Page 16: 3- Tier Client/Server

Component Based Middle Tier(3): Benefits(Cont’d)

Component environments don’t get older-they only get better– you can add a new components and add new

capabilities to components easily without changing your clients

Page 17: 3- Tier Client/Server

Component Based Middle Tier(4)Component Types

Services– implement a business function– is stateless procedures– e.g.) Update_Checking _Account

Objects– expose a set of related procedures or

“methods”, not just a single procedure

Page 18: 3- Tier Client/Server

Component Based Middle Tier(4)Component Types(Cont’d)

Objects(Cont’d)– types

• stateless objects– it must determines what instance data it needs, retrieve

it from a database and must update the database

– DCOM and CORBA ORB support them

– e.g.) bank_account

• stateful objects– from a client it receives request services of a specific

object using a unique object identifier

– it must deliver the request to that specific object

– some ORB and OTM support them

– e.g.) joe’s_bank_account

Page 19: 3- Tier Client/Server

Communications Between Components(1)Middle-tier infrastructure sends client’s

request using logical service(object) name to physical location that serves the request

Messaging Alternatives– Conversations

• support ongoing dialog involving many interactions• e.g.) TCP/IP sockets, IBM’s CPI-C

– Request-response• support a single interaction• e.g.) RPC, ORB RMI(Remote Method Invocation)

Page 20: 3- Tier Client/Server

Communications Between Components(2)Message Alternatives(Cont’d)

– Queues• decouple the client and server interactions• messages are queued for servers• support messages of different priorities and time-

triggered dequeuing• e.g.) MOM, TP Monitor

– Publish-and-subscribe• clients register their interest in certain messages

with an event manager• servers publish messages to the event manager

Page 21: 3- Tier Client/Server

Communications Between Components(3)

– Publish-and-subscribe(Cont’d)• the event manager acts as a matchmaker, sending

published message to subscribers• e.g.) CORBA’s event service

– Broadcasts and datagrams• one-way communication• e.g.) CORBA’s one-way invocation

Page 22: 3- Tier Client/Server

When Should You Use 3-Tier ?(1)

By Gartner Group’s Report– when many application services or classes -

more than 50– when applications programmed in different

languages or written by different organizations– when two or more heterogeneous data

sources - such as two different DBMSs or a DBMS and a file system

– when an application life that is longer than three years - especially if you expect many modifications or additions

Page 23: 3- Tier Client/Server

When Should You Use 3-Tier ?(2)

By Gartner Group’s Report(Cont’d)– when a high-volume workload - more than

50,000 transactions per day or more than 300 concurrent users on the same system accessing the same database

– when significant inter-application communication - including inter-enterprise communication such as EDI

– when the expectation that the application will grow over time so that one of the previous conditions will apply

Page 24: 3- Tier Client/Server

2-TierArchitecture

3-TierArchitecture

Cos

t to

Dev

elop

and

M

aint

ain

Application Complexity and Length of Application Life

Page 25: 3- Tier Client/Server

Conclusion

It has become a safe bet to implement your applications using a 3-tier client/server architecture - especially if you pick a solidinfrastructure

It supports- security- reusability- step-wise, add-on, and customized integration- etc…