Application Architecture

The roadmap, best practices, principles, strategies and techniques used in the design and construction of an application are described in the application architecture. It describes how software modules interact with one another and with other necessary resources, such as databases and middleware. In addition to being application-specific, architectures can also be business- or industry-specific.

A repeatable solution to an issue is described by a pattern. Application architectures that are more generic can be developed by connecting patterns. It is possible to make advantage of pre-existing design patterns rather than entirely developing a new architecture.

The application architecture includes both front-end and back-end services. While back-end development concentrates on granting access to the data, services and other current systems that enable the app to function, front-end development works with the user experience of the application.

Since languages are not included in the application architecture, the programming language that will be used to write the application must be decided upon before beginning the application architectural roadmap.

For front-end development, for instance, JavaScript is used for web application development, HTML, and CSS are used for mobile development, and Swift can be used for both front-end & back-end development. 

Numerous languages are offered, including Java, PHP, SQL, TypeScript, Ruby, and Python. The use cases will be varied based on the kind of application to be developed, the resources at hand, the needs, and the objectives.

Types of application architectures

(1)  Monolithic Architecture

Monolithic application architecture is a traditional software design approach where all components of an application are tightly integrated and interconnected into a single codebase or a single unit. A single change to the application code requires the whole application to be updated or re-released. Because of this, updates and new releases typically can only occur once or twice per year, and may only include general maintenance instead of new features. Since all components of the application are tightly coupled and share the same address space, allowing them to communicate with each other more easily. 



In a monolithic architecture, the entire application, includes the user interface, application logic, and data access layer.

The "User Interface" represents the part of the application responsible for interacting with users.

The "Application Logic" includes the business logic, processing, and other functionalities of the application.

The "Database" stores and manages the application's data.

(2) Service Oriented Architecture

Service-oriented architecture (SOA) is a cloud-based, loosely coupled software development model that breaks down required application components into distinct service modules. These modules are smaller and more flexible than monolithic applications, making them easier to work with. The modules connected through standard communication and control layer called an enterprise service bus (ESB).



The used communication protocols are as below:

(i) SOAP (Simple Object Access Protocol)

(ii) AMQP (Advanced Message Queuing Protocol)

(iii) MSMQ (Microsoft Message Queuing)

(3) Microservices Application Architecture

Microservices encompasses more narrower scope (fine-grained) than SOA which refers to a broader enterprise scope. The microservice model subdivides a SOA service into smaller ones. Each microservice operates within its own context and is independent of other services.



For example, in an ecommerce platform, an inventory management service can be broken down into smaller services such as product availability checker, fulfillment, and accounting among others.

The communication protocols are as below:

(i) APIs

(ii) Java Message Service

(iii) Pub/Sub

(4)  Event-driven architecture

Event-driven architecture (EDA) is an application architecture used to detect events / moments (transactions, site visits, shopping cart abandonment), trigger those events to communicate between the decoupled services & respond those events in real time. 



"Asynchronous" communication is a term frequently used to describe event-driven architecture. As a result, neither the sender nor the recipient must wait for the other to do their next assignment. Not all systems rely on a single message. It is used in modern applications along with microservices. There are three components event producer, event router / broker and event consumer.

The event may be a change in state of an ecommerce plateform like item purchased , item price, address of item to be delivered & may notification of item delivered or not. The event router receives an event published by a event producer, filters it, and then pushes it to event consumers. Because event producer and event consumer services are not linked, they can be expanded / scaled, updated, and used separately.

(5) Web Application architecture

Before going into details of web application architecture, it is important to know the difference between website and web application.

Website is a collection of static web pages and used for providing information to users & branding among custumers over a browser. The static web pages contain images, text, audio, video, etc. A website provides visual and text content that users can view and read for examples a Blog, Archive website and a Community website. 

Whereas Web Application is a software or a program, collection of static and dynamic web pages that can be accessed by the browser. It is designed, developed for a specific objective or purposes, more interactive to the users & hosted over a network. It provides authentication, uses a combination of server-side scripts and client-side scripts to present information. It requires a server to manage requests from the users. Web Application is similar to normal desktop application except it works over internet.

A Browser is an application that is used to browse the internet for example Google App, Amazon, YouTube, facebook etc.

When a user types a URL in a web browser, hits enter button, the web browser send requests to the DNS (Domain Name Server, which is a storehouse of domain names and their IP addresses ), to know the address of the server where the page is located. After that browser sends the request to the found IP address using the HTTPS protocol. The server sends files to the browser as a response to the request made. The browser then executes those files to show the requested page.




Here there are two different codes (sub-programs) running side-by-side, Client-side Code (that is in the browser and responds to user input) and Server-side Code (that is on the server and responds to the HTTP requests).

Web Application Architecture is a framework or layout which represents user interfaces, connection established between client & server, communication between different components of application, middleware systems, server, databases and interaction between all of these.

There are three components as below:

(i) web browser/client side/front-end component manages by presentation logic which interacts with user, receives input and user requests.

(ii) web server/ backend or server side component manages by business logic which processes the user request by routing them and manages application operations. 

(iii) Database server provides the required data for application and other data related tasks. It manages by business logic along with stored procedures.

In 2-tier architecture, only two components client-side system and backend system/database server for example railway reservation systems. Disadvantage is as the users increases, performance decreases.

In 3-tier architecture, there are three components client/presentation layer, Business/application layer and data layer. It is more secure as user can not directly access the data from DBMS.

(6) Mobile Application Architecture

The Mobile app architecture is made up of a collection of technologies, principle, designs, modules, structural elements, their interfaces, and how each of them behaves within the context of all other structural elements, based on industry and vendor-specific standards. This could be referred to as the program's framework.



It is used to create completely structured mobile programs that adhere to vendor- and industry-specific standards.

The architecture design of mobile apps typically has several layers.

Presentation Layer: It houses both the UI elements and the components that process them.

Business layer: It is made up of components, business entities, and workflows.

Data layer: It is made up of service agents, data utilities, and data access components.

(7) Serverless Architecture

It is an approach in designing a software in which developers can create and operate services using serverless architecture without having to worry about maintaining the underlying infrastructure. While a cloud provider sets up servers to operate developer's apps, databases, and storage systems at any size, developers can build and deploy code. Developing and executing applications and services without the need to manage infrastructure is possible with a serverless architecture. Even now, servers from cloud service providers like Azure, AWS, Google Cloud, and others power the application.



Users can interact with applications and access their business logic through servers, but server management is time-consuming and resource-intensive. Teams are responsible for software and security upgrades, hardware maintenance, backup creation, and failure-tolerant software. Developers can free themselves from these duties by implementing serverless architecture, which allows them to concentrate on creating application code.

Function as a Service (FaaS) is one of the most well-liked serverless architectures, in which programmers compose their application code as a collection of distinct functions. Every function is designed to carry out a certain function in response to an event, like an HTTP request or an incoming email. 

Developers then publish their functions and triggers to an account on a cloud provider after the standard testing phases. In order to perform a function when it is called, the cloud provider either spins up a new server to carry out the function or performs the function on an already-running server. The developer's perspective is diverted from this execution process, allowing them to concentrate on creating and implementing the application code.

Developers use AWS Lambda today to create serverless apps. The Google and Microsoft also provide FaaS solutions under their own names, Google Cloud Functions (GCF) and Azure Functions, respectively.

Some Common Terms

Invocation: The execution of a single function.

Duration: The amount of time a serverless function needs to run.

Cold Start: The delay that happens when a function is activated for the first time or following a spell of inactivity is known as the "cold start."

Concurrency Limit: The maximum number of function instances that a cloud provider will allow to operate concurrently in a single region. If a function goes over this threshold, it will be throttled.

Timeout: The period of time a function is given by a cloud provider to execute before being terminated. A default timeout and a maximum timeout are typically established by providers.

Comments

Popular posts from this blog

OWASP Top 10

TCP/IP Model

AAA