1 / 49

Web Application Architecture

Web Application Architecture. Engr. Adnan Zafar. Agenda. Describe the architectures in software development Two-tier client server architecture Three-tier architecture Traditional n-tier approach Distributed component system and layered architecture

mcmichael
Download Presentation

Web Application Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Application Architecture Engr. Adnan Zafar

  2. Agenda • Describe the architectures in software development • Two-tier client server architecture • Three-tier architecture • Traditional n-tier approach • Distributed component system and layered architecture • Discuss the advantages and disadvantages associated with the above approaches

  3. Architecture • Architecture describes structure • According to (Bass et al. 1998), the architecture of a software system consists of its structures, the decomposition into components, and their interfaces and relationships • Architecture forms the transition from analysis to implementation • Architecture can be looked at from different viewpoints • Depending on the point of view from which architecture is seen. We normally distinguish between four different views • the conceptual view, which identifies entities of the application domain and their relationships • the runtime view, which describes the components at system runtime, e.g., servers, or communication connections • the process view, which maps processes at system runtime, while looking at aspects like synchronization and concurrency • the implementation view, which describes the system’s software artifacts, e.g., subsystems, components, or source code.

  4. Cont….. • Architecture makes a system understandable • Structuring software systems and breaking them down into different perspectives allows us to better manage the complexity of software systems, and the systems become easier to understand • Architecture represents the framework for a flexible system

  5. Features of Modern Applications • Performance: • It is the ability of an application to process data. The faster the data is processed the better is the performance. • Scalability: • Consider the case of a web-based application. At a given time, there may be thousands of users using this application simultaneously and the number is sure to grow everyday. To support the load, additional hardware support will be provided. However, with the increase in number of users, additional hardware becomes very expensive and difficult to manage. Hence, the application needs to be highly scalable in order to accommodate the increasing number of users

  6. Features of Modern Applications [cont..] • Extensibility: • It refers to the capability of the application to add new features into an existing application. This improves the performance of the application and gives new features to the user. • Availability: • The application should run 24 hours a day and 365 days a year. If any part of the application fails, it should not affect the users who are using the application. This can be achieved by providing alternatives in terms of additional hardware support, or software support.

  7. Features of Modern Applications [cont..] • Reliability: • Take an example of a bank operation where funds need to be transferred from Account A to Account B. This operation should deduct the specified amount from Account A and add the same amount to Account B. Now if there is a power failure between the deduction of fund from Account A and addition of fund to Account B, the application should consider the operation as incomplete and restore the state of the accounts as they were before the operation was initiated. This is what is meant by reliability. The system at any point of time should produce the desired results only • Maintainability: • It indicates that the application should be easy to modify. Whenever an error is encountered in the application, it must be capable of correcting it in minimal time and with least efforts

  8. Features of Modern Applications [cont..] • Security: • Since many users are accessing the application, security plays a very important role. Different areas of an application should be restricted to users, based on their roles. For example, an employee working in the EDP department of an organization should not be allowed to access the data regarding employee salaries

  9. Developing Architectures

  10. Categorizing Architectures • Layering aspect: Layering means that software systems are structured in several tiers to implement the principle of “separation of concerns” within a software system. Many frameworks in the field of distributed systems and Web applications are primarily structured by the layering aspect, e.g., J2EE (Sun Microsystems) Architectures used to integrate legacy systems, also referred to as Enterprise Application Integration (EAI), and portals also fall in this category • Data aspect: Data can be structured or non-structured. Structured data follow a defined scheme like tables in a relational database or XML structures in a document. Non-structured data are multimedia contents, e.g., images, audio, and video, which typically do not follow an explicit scheme.

  11. Cont….. • The increasing distribution of software systems has led to the development of architectures and infrastructures addressing the distribution of data and messages • Distributed Object Middleware (DOM): This type of infrastructure allows to access remote objects transparently. It is based on the Remote Procedure Call (RPC) mechanism. Some DOM systems also enable objects on different platforms to interact (e.g., CORBA). Other examples of this type of system include Microsoft’s DCOM (Distributed Component Object Model), or EJB (Enterprise Java Beans) by Sun Microsystems • Virtual Shared Memory (VSM): The VSM model lets distributed processes access common data. The processes themselves access a shared memory.

  12. Cont….. • Message Oriented Middleware (MOM): MOM systems offer functionalities for asynchronous transmission of messages. Asynchronous communication differs from synchronous communication in that messages are sent to the receiver regardless of its status, e.g., the receiver may not be available when the message is sent, i.e., he or she may be offline. MOM ensures that messages are delivered nevertheless. Examples of MOM systems include Sun’s JMS (Java Messaging Service) and Microsoft’s MSMQ (Microsoft Message Queue) • Service Oriented Middleware (SOM): SOM enhances DOM systems by the concept of services. A service in this context is a number of objects and their behavior. These objects use a defined interface to make a service available for other systems/services. SOM defines communication protocols between services, and provides for location and migration-transparent access to services, thus supporting a simple integration of services beyond platform boundaries

  13. Components of a Generic Web Application Architecture • Client: Generally a browser (user agent) is controlled by a user to operate the Web application. The client’s functionality can be expanded by installing plug-ins and applets • Firewall: A piece of software regulating the communication between insecure networks (e.g., the Internet) and secure networks (e.g., corporate LANs). This communication is filtered by access rules. • Proxy: A proxy is typically used to temporarily store Web pages in a cache. However, proxies can also assume other functionalities, e.g., adapting the contents for users (customization), or user tracking.

  14. Basic components of Web application architectures.

  15. Monolithic Applications A single application consisting of everything required to perform tasks Application A A single application consisting of everything required to perform tasks Application B Monolithic Applications

  16. Monolithic Applications A single application consisting of everything required to perform tasks Application A A single application consisting of everything required to perform tasks Application B Monolithic Applications (1) Drawbacks: • Incorporating changes is a tedious job • No data sharing possible

  17. Various Architectures • Two-tier client server architecture • Three-tier architecture • N-tier architecture • Distributed component approach and layered architecture

  18. Client Tier (Front End) Data Tier (Back End) Presentation and Business Logic bundled together into client application Client A Server Presentation and Business Logic bundled together into client application Client B Database Two-tier Architecture

  19. Two-tier Architecture (1) Advantages: • Rules for data integrity implemented on the server • Implementation of powerful hardware for the server enhances the availability and reliability of the application

  20. Two-tier Architecture (2) Drawbacks: • Business logic present on every client • Increase in the number of clients’ requests results in slower responses • Difficult to make changes to the business logic

  21. Client Tier (First Tier) Application Tier (Middle Tier) Data Tier Business Logic Presentation Logic Database Three-tier Architecture

  22. Business Logic Presentation Logic Database Three-tier Architecture (1) Advantages: • The business logic shared among various clients • The business logic, or the database type or schema changed without impacting the clients • The middle tier hidden behind the firewall • Increased availability of system resources • Selective upgrading of parts of the architecture

  23. Business Logic Presentation Logic Database Three-tier Architecture (2) Drawbacks: • Since the Application tier hosts applications that are not often consistent, the tier cannot be standardized • The entire business logic of the application will physically reside on a single machine. Hence, a large application may not have the desired scalability level

  24. Data Tier Business Logic Business Logic Browser Database Services Firewall N-tier Architecture

  25. Data Tier Business Logic Business Logic Browser Database Services Firewall N-tier Architecture (1) • Advantages: • In addition to the advantages of three-tier, n-tier has: • Since the application logic is divided into multiple parts, the application can achieve the desired level of scalability • Each part of the business logic can reside on different systems making more system resources available to the application

  26. Data Tier Business Logic Business Logic Browser Database Services Firewall N-tier Architecture (2) Drawbacks: • The middle tier consists of one application object (this object is subdivided further into many parts that may physically reside on different machines). Therefore, we may find ourselves creating different application objects to cater to different needs of the users • These objects may not be able to communicate with each other because they are not familiar with the working process of each other

  27. M i d d l e w a r e Application Component Data Tier Interfaces Database Application Component Browser (HTML) Presentation Logic Distributed Component Architecture

  28. Client Interfaces COM Components COM Components Interfaces Interface An Interface not only defines how two components, or a client and a component will talk to each other but also helps in hiding the business logic used for developing the object.

  29. M i d d l e w a r e Application Component Interfaces Database Application Component Browser Presentation Logic Distributed Component Architecture Characteristics: • Components communicate with each other using interfaces • Components maintain identity • Components maintain the state on the server • Easy modification of the business logic without affecting any other logic

  30. M i d d l e w a r e Application Component Interfaces Database Application Component Browser Presentation Logic Cont….. • Components leverage their context object for services such as security, persistence, and transactions • Components require Application Server to run • Components used as plug and play devices

  31. M i d d l e w a r e Application Component Interfaces Database Application Component Browser Presentation Logic Layered Architecture Ways for achieving system flexibility: • Encapsulation • Separation of Concerns (Abstraction)

  32. Component Packaging Types In-process server   Out-of-process server Remote server

  33. In-Process Server In-proc Object In-proc Server Client Application Client Process The in-proc servers are implemented in the form of a DLL.

  34. In-process Server (1) Advantages: Saves memory space Saves disk space Upgradations are easy Supports multiple languages

  35. Client Application Stub Local Object Local Server COM Local Object Proxy Server Process COM Local Procedure Call Client Process Out-of-Process Server The out-of process servers are implemented in the form of an EXE.

  36. Out-of-Process Server (1) Advantages: Crash protection Support for User Interface

  37. Out-of-Process server Drawbacks: Slow responsiveness

  38. Stub Remote Object Client Application Remote Server COM Remote Object Proxy Remote Server Process COM Remote Procedure Call Client Process Remote Server Remote Machine Client Machine The remote servers are implemented in the form of either EXE or DLL.

  39. Remote Server (1) Advantages: A single component can be shared by multiple client applications running on multiple systems The components can be upgraded very easily It forms the basis for component based distributed client/server architecture

  40. Remote Server (2) Drawbacks: Slow responsiveness

  41. Integration Architectures • External or internal systems, e.g., existing applications, existing databases and interfaces to external business partners, can be integrated into Web applications on three levels: theWeb Application Architectures presentation level, the application logic level, and the content level. • Integration architectures address integration aspects on the content level and the application logic level and are commonly summarized under the term Enterprise Application Integration (EAI) architectures. • This category also includes architectures which integrate existing applications as a whole, i.e. content as well as application logic is integrated.

  42. Cont….. • EAI has emerged from the field of business-to-business integration, requiring existing systems to be closely coupled. This integration can be implemented in any of the following ways: • Point to point: The applications exchange the content to be integrated via external communication mechanisms, e.g., file transfer or batch transactions. • Data delivery: A system supports access to internal data directly, e.g., over a database access. • Data integration: Several applications use the same data storage, e.g., via a jointly used database.

  43. Cont….. • Delivery of functionalities: A legacy system allows to access functionalities, e.g., over an API. • Reconstruction of functionalities: Access to functionalities is transparent to the client, i.e., a functionality can, but does not have to, be implemented directly in the legacy system. • Porting: Legacy systems are migrated onto Web platforms, replacing the original system.

  44. Data-aspect Architectures • Data can be grouped into either of three architectural categories: (1) structured data of the kind held in databases (2) documents of the kind used in document management systems (3) multimedia data of the kind held in media servers. In this respect, Web applications are normally not limited to one of these data categories; they rather integrate documents, media, and databases.

  45. Database-centric Architectures • A number of tools and approaches are available to integrate databases into Web applications. These databases are accessed either directly from within Web server extensions, or over application servers. Since database technologies (and particularly relational databases) are highly mature, they are easy to integrate. APIs are available for different platforms, e.g., Java Database Connectivity (JDBC) for Java-based applications, or Open Database Connectivity (ODBC) for Microsoft technologies, to access relational databases.

  46. Architectures for Web Document Management • In addition to structured data held in databases and multimedia data held on media servers, contents of Web applications are often processed in the form of documents • Content management architectures support the integration of documents from different sources, representing a mechanism to integrate these contents into Web applications.

  47. Cont….

  48. Architectures for Multimedia Data • Multimedia data, i.e., audio and video, can be transmitted over standard Internet protocols like HTTP or FTP, just like any other data used in Web applications. This approach is used by a large number of current Web applications, because it has the major benefit that no additional components are needed on the server. Its downside, however, is often felt by users in that the media downloads are very slow. • We can use streaming technologies to minimize these waiting times for multimedia contents to play out. Streaming in this context means that a client can begin play out of the audio and/or video a few seconds after it begins receiving the file from a server. • This technique avoids having to download the entire file, before beginning play out. The contents have to be transmitted in real time, which requires a corresponding bandwidth, and low jitter, to ensure continuous play out of the contents. A guaranteed transmission bandwidth is appropriately called quality of service

  49. Cont….. • Two protocols are generally used for the streaming of multimedia contents. One protocol handles the transmission of multimedia data on the network level, and the other protocol controls the presentation flow (e.g., starting and stopping a video). One of the network protocol is Real Time Protocol (RTP), which collaborates with a control protocol, the Real Time Streaming Protocol (RTSP).

More Related