Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
NJIT
1
5/4/2012 Leon Jololian/George Blank
Architectural Models
In complex systems, it is necessary to organize the complexity by partitioning. Architectural models are ways to organize the parts and structure the relationships between them. Two fundamental architectural models are the Client/Server model and the Peer-toPeer model
5/4/2012 Leon Jololian/George Blank
The client/server model is organized around clients that request services and servers that provide services. Services might include information (such as the current weather) or computational services (such as complex calculations). There may be intermediate layers between the client and server that perform a portion of the task of locating and providing services.
5/4/2012 Leon Jololian/George Blank
Client/Server Performance
Performance, scalability and mobility of the client/server model can be improved by Partitioning or replicating data on servers Caching data at proxy servers or clients Using mobile code and mobile agents Adding and removing mobile devices
5/4/2012
In peer-to-peer models, each node of a distributed system is capable of requesting and providing services. Most of the services available are available from several or even many nodes. Nodes tend to come and go from the network frequently, but redundancy tends to keep most services available.
5/4/2012 Leon Jololian/George Blank
Communications
Probably the key concern of a distributed system is the communication between nodes of the system. It can be argued that computers are improperly named. While they can and do provide computations, their dominant use is to provide information, so communicator might be a more accurate description than computer.
5/4/2012
Unintended Consequences
The fact that computers are primarily used as communicators is an example of the law of unintended consequences. Quite often, the utility of a new technology is not understood at the time of its introduction. Computers were originally used during World War 2 to compute ballistic tables for the Navy and perform calculations to design the atomic bomb. Computer was then an accurate name. No one in the movie industry then could have anticipated that by today, people would spend more money on computer games than movie tickets!
5/4/2012 Leon Jololian/George Blank
Another example
Most of the wealth created by the automobile industry did not go to car and truck makers and their suppliers. It went to investors in and developers of suburban real estate, as mobility increased the value of land within commuting distance of cities. The most valuable employees in any industry are not the technicians who know how to use a technology, but the people who can see new possibilities in new capabilities of that technology.
5/4/2012 Leon Jololian/George Blank
Fundamental Models
Fundamental models describe properties common to all architectural models often focusing on communications between nodes The interaction model manages performance and time limits The failure model specifies faults and defines reliable communication The security model describes threats to processes and communication channels
5/4/2012 Leon Jololian/George Blank
Distributed systems can be used in many different ways by persons or systems with different objectives. Distributed systems can include a wide variety of hardware, operating systems, networks and applications. Many types of internal system problems are possible. There are many external threats that may affect a system,
5/4/2012 Leon Jololian/George Blank
10
11
Just as we need many views to construct a house, (site plan, floor plans, wiring and plumbing diagrams, etc.) software development benefits from a similar approach Time tested designs, methods, and approaches improve quality and performance (Center Hall Colonial, keeping plumbing together, etc.) Architecture helps us understand the system, organize development, foster reuse, and evolve the system
5/4/2012 Leon Jololian/George Blank
Architectural Modeling
Architecture details a system by the organization of its components. The components might be nodes on a network, layers of software, collections of services, or other ways of partitioning the system. For example, one way of partitioning a system is to classify processes as client processes, server processes or peer processes.
12
5/4/2012
Architectural Views
System Architecture Application Architecture Business Architecture
Presentation Layer Application Layer
Business
Product
Information Layer
Service Resource
Support
Physical Architecture
13
Operations Architecture
5/4/2012
14
5/4/2012
Client/Server Configurations
15
5/4/2012
Three-tier Configurations: includes another server that offloads certain functions from either the client and/or the server. Since there can be many intermediate servers, this may also be called n-tier.
Mid-tier for processing
16
5/4/2012
N-Tier Configurations: a type of three-tier set up that includes multiple intermediate servers.
Mid-tier Mid-tier
Client
Client
Mid-tier
Processing and data storage can occur on any node, as shown on the next page (using a three-tier configuration).
5/4/2012 Leon Jololian/George Blank
17
User Interface
Processing
Data
User Interface
Processing User Interface
Processing
Processing
Data
5/4/2012
Thin Client: In a client/server model, a client is called a thin client when the client contains a small amount of processing. Most of the processing is with the middle tier (in a three-tier setup) or the server.
User Interface
Processing
Processing
Processing
Data
19
5/4/2012
Fat Client: A fat client is a client that contains a great deal of processing (which may include business logic), usually more than the server.
User Interface
Processing
Processing
Data
Processing
Data
20
5/4/2012
Middleware
22
5/4/2012
Client
Client Client
(browser)
HTTP
Web Server(s)
Database Server
CGI ASP
Intranet Internet
ODBC
CF WS
HTTP
Client
ODBC-Open Database Connectivity CGI Common Gateway Interface ASP Active server pages (Microsoft) CF - Cold Fusion (Allaire Corp.)
23
5/4/2012
Client
What is Middleware?
Middleware is the software between your application and the operating system and networking on a computer. It is the layer above the operating system but below the application program that provides a common programming abstraction across a distributed system. It can be called the / in Client/Server. The classical definition of an operating system is software that makes hardware useable. Similarly, Middleware can be considered to be the software that makes a distributed system programmable.
5/4/2012 Leon Jololian/George Blank
24
What is Middleware?
communication infrastructure registration and lookup of remote service Hardware/OS Networks Programming languages
5/4/2012 Leon Jololian/George Blank
Resolves heterogeneity of
25
Access hide differences in data representation and how a resource is accessed Location hide where a resource is located Migration hide that a resource may move to another location Relocation hide that a resource may move while in use Replication hide that a resource is replicated
26
5/4/2012
Concurrency hide that a resource may be shared by several competitive users Failure hide the failure and recovery of a resource Persistence hide whether a software resource is in memory or on disk
27
5/4/2012
Pros:
Reduce number of interfaces. Clients see only one system i.e. the middleware. Centralizes control. Functionality widely available to all clients. It allows to implement functionality that otherwise would be very difficult to provide.
Cons
Complex software. Development platform (API) not complete system. Functionality is hard to understand.
5/4/2012 Leon Jololian/George Blank
28
Standard Interfaces
Middleware provides a comprehensive set of higher-level distributed computing capabilities and a set of standards-based interfaces. These interfaces allow applications to be distributed more easily and to take advantage of other services provided over the network.
5/4/2012 Leon Jololian/George Blank
29
Building Blocks
Application developers and system integrators can use middleware services as building blocks to construct enterprisewide information systems that use distributed computing resources effectively.
30
5/4/2012
Communication
5/4/2012
Examples of Middleware
based on RPC and IDL based on objects and IDL interface objects locate each other through ORB defines Internet Inter-ORB protocol (IIOP) builds ORPC on top of DCE RPC
supports integration of binary components from different languages (e.g. VB, Java, C++)
5/4/2012 Leon Jololian/George Blank
32
Examples of Middleware(cont.)
33
5/4/2012
High-Level Services
Many middleware services are high-level services Example: a single request of the data access service can retrieve many rows of information from one or more remote SQL relational databases (less coding effort)
34
5/4/2012
The burden of distributing the applications functions across nodes in a network fell largely on the application programmer. The transport interface code is divided into transport-independent and transportdependent parts. Middleware provides transparency of the transport interface code.
5/4/2012 Leon Jololian/George Blank
35
The application includes the application logic and two types of networking code:
Application protocol support code. Example: The X protocol for transmitting graphical images. Transport Interface Code makes the appropriate network calls to send and receive the messages that make up the the application protocol over a specific network transport.
36
5/4/2012
37
5/4/2012
Multiple servers: Services with large demands, such as search engines, may have many servers dedicated to a particular task. Proxy servers and Caches: Data likely to be needed again may be stored in memory or on local for fast retrieval. Mobile code: Code may be retrieved from a server for execution on a client system. A common example of this is a Java Applet.
5/4/2012 Leon Jololian/George Blank
38
Variations, continued
Mobile Agents: A running program including code and data may run on remote systems. This may be a security problem, as such agents include worms, viruses, and web crawlers. Network Computers: All code and data may be stored on a server and moved to a local thin client temporarily for execution. Only the code necessary to retrieve the programs and data is stored on the network appliance.
5/4/2012 Leon Jololian/George Blank
39
Variations, continued
Thin Clients: Most of the processing may be done on a remote server, with little more than a client interface, most commonly a Web Browser, running on the client. Mobile clients and spontaneous interoperation: Transient mobile devices such as laptop computers, cell phones and PDAs may connect to the network using technologies such as GSM, 3G, WiFi, and Bluetooth.
5/4/2012 Leon Jololian/George Blank
40
Design Requirements
There are many challenges in designing computer systems. Some of those challenges include: Performance Quality of service Caching and Replication Dependability
5/4/2012 Leon Jololian/George Blank
41
Performance issues
Responsiveness: Users want both speed and consistency. Throughput: IT systems are expensive, and are often sold on the basis of their ability to perform the most work for the least money. Load balancing: High potential throughput can be defeated if the work is not distributed to make maximum use of potential because some of the system is idle.
5/4/2012 Leon Jololian/George Blank
42
Quality of Service
Performance is one aspect of quality of service. Others include: Reliability: this includes availability (uptime) and freedom from errors. Security: this is protection from compromise or loss of information or investment. Time Criticality: some information must be available in the right place at the right time. This is a major concern in designing networks.
5/4/2012 Leon Jololian/George Blank
43
One tool for increasing throughput, availability and time critical sensitivity is storing extra copies of data in memory (caching) or on a local disk (replication). Data stored can be small (translated web addresses) or large (multiple copies of corporate databases). There are many challenges in managing data that can be changed in one place while having copies in other places.
5/4/2012 Leon Jololian/George Blank
44
Dependability Issues
Correctness is ensuring that data is current and accurate. Fault tolerance is ensuring that when something goes wrong, the system can recover or bypass the fault rapidly without loss of information. Security includes identifying users, determining privileges and protection of systems and data.
5/4/2012 Leon Jololian/George Blank
45
Fundamental Models
Modeling is based on abstraction. We ignore some parts of a system to concentrate on others. For example, you cannot build a house from plans that only describe the plumbing. But the plumbing diagram contains all the information that the plumber needs to install the plumbing. You may also have a wiring diagram for the electrician, a framing diagram for the carpenters and an excavation plan for the bulldozer and backhoe operators.
5/4/2012 Leon Jololian/George Blank
46
What are the main entities in a system? How do those entities interact with each other? What characteristics affect the individual and collective behavior of those entities?
47
5/4/2012
Purpose of a Model
Make explicit all of the relevant * assumptions about a system. Make generalizations about what is possible or impossible to accomplish based on those assumptions.
*Note that it is a real challenge to include everything that matters while excluding everything that does not matter!
48
5/4/2012 Leon Jololian/George Blank
Interaction Model: describes the communications between the system and external actors and the communication between components of the system. Failure Model: defines and classifies potential faults for analysis in order to design a fault tolerant system. Security Model: identifies potential threats to a system so that countermeasures can be developed.
5/4/2012 Leon Jololian/George Blank
49
Event ordering
50
5/4/2012
Process omission failures Communication omission failures Arbitrary failures Timing failures Masking failures Communication Reliability Validity Integrity
5/4/2012 Leon Jololian/George Blank
51
Protecting objects Securing processes and their communications Defeating security threats
Cryptography and shared secrets Authentication and Authorization Secure channels Denial of service Mobile code
5/4/2012 Leon Jololian/George Blank
52
Create an architectural diagram of the systems you have used so far for this class. Include only one wired and one wireless connection from a student computer. Use a cloud to represent the Internet and circles for the AFS and PC networks at NJIT, connecting hosts with links to the circles.
5/4/2012 Leon Jololian/George Blank
53
What are the parts of a typical client/server system for corporate transaction processing? How can a search engine coordinate searching for current data with constant updates from web crawlers on data that is replicated many times? What is the difference between a buffer and a cache? What applications are best for mobile code? Can you think of other technological examples of the law of unintended consequences?
5/4/2012 Leon Jololian/George Blank
54
References
George Coularis, Jean Dollimore and Tim Kindberg, Distributed Systems, Concepts and Design, Addison Wesley, Fourth Edition, 2005 J. Colonna-Romano & P. Srite, The Middleware Source Book,Digital Press Byte Magazine, April 1996, pp. 65-78 P. Bernstein, Middleware: A Model for Distributed System Services, Communications of ACM, Feb. 1996, pp. 86-98
5/4/2012 Leon Jololian/George Blank
55