abc online direct store software architecture using soa (service oriented architecture)

21
0 [Team 03] ABC Online Direct Store Architecture GUIDED BY: PROF. WALLY LEE AUTHORS: 1. AKASH MHANKALE 2. ANURAG PATSARIYA 3. ASHISH MERANI 4. NEENU ANN VARGHESE 5. PIYUSHA ZANJAD 6. PRITESH PIMPALE 7. RENUKA JOSHI

Upload: akash-mhankale

Post on 22-Jan-2017

155 views

Category:

Documents


0 download

TRANSCRIPT

0

[Team 03]

ABC Online Direct Store Architecture

GUIDED BY: PROF. WALLY LEE

AUTHORS:

1. AKASH MHANKALE

2. ANURAG PATSARIYA

3. ASHISH MERANI

4. NEENU ANN VARGHESE

5. PIYUSHA ZANJAD

6. PRITESH PIMPALE

7. RENUKA JOSHI

Table of Contents

1. Basic Architecture ........................................................................................................................................... 1

1.1. Modular Diagram ..................................................................................................................................... 1

1.2. Components and Connectors Diagram ..................................................................................................... 2

2. Deployment ..................................................................................................................................................... 5

2.1. Allocation of components to physical resources ...................................................................................... 5

2.2. Distributed Deployment Diagram ............................................................................................................ 7

3. Allocations ....................................................................................................................................................... 9

3.1. Allocations of functions to components ................................................................................................... 9

3.2. Allocations of QAs to components .......................................................................................................... 9

4. QAs ................................................................................................................................................................ 10

4.1. Availability ............................................................................................................................................. 10

4.2. Interoperability ....................................................................................................................................... 11

4.3. Modifiability........................................................................................................................................... 12

4.4. Performance ........................................................................................................................................... 13

4.5. Scalability ............................................................................................................................................... 15

4.6. Security................................................................................................................................................... 16

4.7. Testability ............................................................................................................................................... 18

4.8. Usability ................................................................................................................................................. 18

1

1. Basic Architecture

1.1. Modular Diagram

User Interface

This module mainly focuses on graphical user interface. It acts as an entry point for the customer

to interact with components and services. It consists of following- login page, product search, and

purchase management.

Services Module

This module is the combination of all the services that are in the system. All these services act as

interface between the user interface module and Database module.

Payment Gateway

Payment gateway module is responsible for managing payments of the users. This module includes

VISA and MasterCard.

Database Management

This module contains both User and Product database. It is responsible for communicating with

the other services and perform read, write, update operations.

1.2. Components and Connectors Diagram

User Interface

o Login Webpage

This component takes input from user to verify user’s identity. Along with this, it also

provides facility to recover the password. It will provide username, password to

authentication web service which provide output based on authentication.

o Product Search Webpage

On web page, it takes input from users to search the products. Keywords, filter can be used

for product search. It consumes the product search service from ABC web store.

o Purchase Management Webpage

On successfully adding items to the cart, this component helps users to manage their cart.

Facilities such as deleting items from cart, changing the count of each product can be done

with the help of this component. It will consume shopping cart web service from ABC Web

store.

Services

o Product Search

This component takes input from UI and send request to search products to the database based

on user input. It consumes services from product database in database management and

produces services for user interface’s Product Search.

o Shopping cart

This component takes data from product database in Database Management and deliver the

produced shopping cart object to user interface.

o Authentication

This service is responsible for verifying the user credentials so that only authenticated user can

login to the system. It requests to Database Management service to check whether the entered

credentials matches exactly with the user database. Based on input, database management

provides the output to authentication component and then the corresponding result is provided

to login page.

o Payment Processing

Function of this component is to process the payment from the credit card details received. It

asks the payment service to validate the payment details. Payment gateway component

validates the details of VISA/MasterCard and respond back to payment processing component

accordingly. Payment processing then provides this information to order processing.

o Order Processing

Order processing consumes services from user database to validate the right user and product

database for checking the price, available quantity of any item. Based on these attributes it

creates an order summary. It consumes the services from payment processing for payment. On

successful payment, it sends the results to purchase management in user interface.

o Warehouse Management

Order processing will consume services from the warehouse management. This service

consumes services from Warehouse component and also update the same once a order get

placed.

Payment Management

This component validates the payment details received from payment processing. It communicates

with VISA/MasterCard servers to verify respective card details.

Database Management

o User Database

Provides validation of users to the other components of the system.

o Product Database

Provides the product information to the other components of the system.

Stock Information

This components provides the product stock information to the warehouse management

component of ABC webstore.

2. Deployment

2.1. Allocation of components to physical resources

Web Server

Web Server is responsible for processing http requests from the system users. It stores all the

webpages of our system. When DNS requests hit the system, appropriate queries are requested to

the application servers. The results returned are displayed on the web pages. As our application

system is developed in java, TCP/IP is used to invoke remote methods.

We assume this web server to process 500,000 requests simultaneously.

Application Server

We have deployed/mapped our service level components on application servers. It used for

implementing business logic of the system.

The service level components, have been divided into 2 separate application servers in the

following way:

1. Application Server 1:

a. Product search

b. Shopping cart

2. Application Server 2:

a. Order Processing

b. Payment Processing

c. Authentication

d. Warehouse Management

Number of browsing requests are more as compared to the payment processing requests. In Case

of higher browsing requests, Application server1 can be scaled to serve more transactions.

Moreover, the payment request requires more security in transactions. Hence we divided our

service level components into 2 application servers.

Application Servers communicate to the Database servers through database driver API.

Database Server

System database is deployed on Oracle database server. We have used Oracle database server as

it supports 100% Java integration. Database for the system, has been separated to achieve quality

attributes.

Two databases used are:

o User database

Used to store the user credentials, and the transactions history of users. This database requires

data security, and hence it was deployed separate from the product database.

o Product database

Used to store product information. This would store information on the products, their prices

and availability. This database is designed to handle multiple transactions at the same time.

2.2. Distributed Deployment Diagram

Global Site Selector

It is the DNS resolution system which efficiently manages and monitors the number of IP address

and passes it to DNS queries to balance traffic. This makes the application highly available 7/24

to all the users across different geographical locations. It helps our system to withstand catastrophic

disaster like large area fire, earthquake and be available even if there is a system failure.

Load balancers

Load balancers are used to increase capacity of concurrent users in real time environment. We

used load balancer for providing reliability to our users and simultaneously maintaining the

performance of the system. ABC store supports 1 million product search/view users and 1000

purchase transactions concurrently without degraded responses. The system can be extended to

support 100 million users and 100K transactions without re-architecting.

Webserver

Web Server will render files that constitutes the webpages as front end to the users. Multiple web

servers have been used to ensure its availability 7/24. Each Web Server supports 500,000 product

search/views. We used 2 Web Server for each load balancer so that even if a web server fails then

other web servers can be used to service the request without affecting the performance of the

system.

Application server

Application server is used to services for data access, security and other service based on user

request. Application server can be added at any point to support modifiability quality attribute.This

helps in easily modifying infrastructure by adding new functions to existing system. The payment

gateway will authenticate users for purchasing the products from our website.

Database Coordinator

Database coordinator help to collect and manage data which can be used by application server to

fulfill the request made by the users. It is direct connection with Database Server.

Database Server

Database server provides database services to the requesting application; the information requested

can range from user data to product data.

3. Allocations

3.1. Allocations of functions to components

3.2. Allocations of QAs to components

4. QAs

4.1. Availability

Online Store runs 7/24 always available.

To satisfy the availability requirement application server is deployed on multiple servers at different

geographical locations. A load balancer is used between the application server and client system to route

client to the nearest server having minimum load. This architecture ensures every request from the client

system is served by the application server within short time.

Even in the case of failure of a node in the system will route the client request to appropriate healthy

node in the system. As the system is deployed at multiple locations it will also handle the failures due

to natural calamities.

As the whole system is replicated on different geographical locations we also face the problem of

keeping consistency in the data in different databases at all locations. The database is also replicated on

different locations and synchronization of the data done on periodic basis. The database server

communicates with the other database servers to check the validity of the data. If the data is not latest it

updates the data by synchronizing it with other servers.

From the above diagram for each location there are two server; one is primary and other is secondary.

Initially primary server will be used till the time it is working efficiently. Suppose in any situation there

is a problem with the server. This problem can be from natural or man-made cause then secondary server

will be used. While the secondary server is being used primary will be fixed and ready to be used again.

Hence satisfying quality attribute – availability.

4.2. Interoperability

Interoperability can be thought of as two or more systems exchanging information via interfaces.

However, it is not only exchanging data but interpreting exchanged data correctly and present in

such a way that it is understood by a user. We have to identify with whom we are exchanging, with

what and under what circumstances we are exchanging. Our architecture will not have any idea

about the external entity and their system’s implementation but it still has to be interoperable with

your system and here interface comes into the picture. A payment gateway facilitates the transfer

of information between ABC online direct store and the Front End Processor or acquiring bank.

Interoperable with current and future payment authorization systems.

Payment gateway is an application service provider which authorizes credit/debit card

payments for ABC online direct store. Payment gateway acts as an interface between actual

payment gateways and payment service within ABC online direct store architecture.

Current system is able to connect to Visa and MasterCard payment gateways. This architecture

enables the system to extend the service to multiple authorization systems like International

Credit cards, PayPal and Internet Banking by just extending the payment service to access

other gateways. There will not be any effect on the other services like Order processing service

as Payment Service is a standalone module in the system.

For supporting new payment method, we just have to new payment gateway to the interface

which can interpret data correctly.

Interoperable with warehouse systems

Warehouse system is fully integrated with ABC online direct store using warehouse

management. Warehouse management acts as the interface between ABC online direct store

and the main warehouse where stock information is stored.

When stock information changes in warehouse system it should be reflected within ABC online

direct store’s database. This will keep the database up to date regarding number of products

available, their prices at the same time.

The warehouse system needs data related to Users and their orders. This information can be

easily obtained from the Order processing service. By just extending the functions of the order

processing service we can easily notify the warehouse regarding the confirmed orders and their

respective shipping information. Also for synchronizing the warehouse information with the

system’s database a standalone listener service can be written and deployed in the application

server.

4.3. Modifiability

Software systems are designed to be continuously interacting with the world. The world around the

software is constantly changing. It has been observed that more than 70% of cost of the lifecycle of a

software is spent on the maintenance of the software. The maintenance of software is required to

accommodate the changes happening in the environment of the software. So Modifiability of the software

plays key role in the lifecycle of the software.

Easy to modify to bring in new functions

Bringing new functions to the system is necessity of the system to incorporate new changes in

the software system. E.g. In our system other vendors can sell their products by maintaining

their own database of products inventory.

To achieve this requirement SOA plays the key role. This system is built using standalone

services which can function on its own utilizing other services or database. Services that utilize

other services are aggregating services. For adding new functionalities in the system, we can

easily add new service which is able to communicate with the software system of the other

vendor who wants to sell products on the web store. This service will listen to the requests

from other vendors to update the information related to product to be displayed on web pages.

In similar manner our portal will also be able to communicate data to the vendor’s application

by accessing their service and updating data related to orders of the products of the vendor.

Easy to modify to bring in new technologies

This service oriented architecture is easy for modification using new technologies. As

every function of the system designed as a standalone service which are loosely coupled

and it has a simple interface like XML. This can be easily adopted by any of the new

technologies. There will not be any need to change original functionality of the services to

adopt to the new technologies.

As services are loosely coupled they can be modified one by one with new technology as

earlier services will remain functional as interface remains the same. In the similar way

even changing technology in User interface or backend systems will have very little effect

on the existing code of the system and will not affect existing architecture of the system.

4.4. Performance

In the case of any Web store, performance can be measure in terms of how soon web-services are

responding to the user’s requests. User should not wait for a long time to get the result of their actions

such as search, payment or any other kind of request. If we failed to maintain the performance customer

will go to other shopping website.

Performance goals to achieve:

1. Product view shall be responded in 60 seconds.

2. Purchase/payment shall be completed in 300 seconds with confirmation message displayed

back to the customer on screen.

Payment Gateway

Payment Gateway

Services

Order Service Payment Service

Warehouse Notification

Database request

Request from User interface

Warehouse System Service

Warehouse Service

3. The store shall support 1 million product search/views users and 1000 purchase transactions

concurrently without degraded responses.

We used below elements to enhance performance of the system:

Global Site selector

The main function of the global site selector is to choose nearest server from the location of

the Customer. It helps to reduce the latency caused during transfer of user request from client

machine to the first server.

Load Balancer

The main function of load balancer is to distribute the load on server equally. Load balancer

checks if one server is loaded to its limit it transfer incoming requests to other less loaded

server. If one server is able to handle n request without degrading its performance, load

balancer send first n requests to first server and rest of the request to another server.

Database Coordinator: Database coordinator check if data requests at one database server

is more it transfers new requests to other less crowded server.

How we are going to achieve above mentioned goals?

Product view uses information stored in product databases. This information passes to the user

interface through application & web servers. In case of very low traffic a single instance of each

server can handle the requests but when more and more requests comes for product view system

needs additional resources to handle the requests. So we uses multiple web, application and

database servers in our architecture. Global site selector redirects the request to nearest available

server so that latency can be reduced. Load balance transfers the request to least loaded web &

application servers. In the same way database coordinator decided to send request to the less

utilized product database. Combining all elements provides huge performance gain over single

availability of each server and system can respond within 60 seconds.

In same way, a complete purchase uses all kind of servers. Since we have multiple copies of each

server load balancer and database coordinator can take decision for less time consuming path.

Apart from this, our architecture has only two layers below the user interface so latency due to

data exchange between layers will be less. In this way purchase/payment can be completed within

300 seconds.

4.5. Scalability

The system shall be easily extended to support 100 million users and 100K transactions without re-

architecting.

The system has been deployed on a distributed network using a distributed database which periodically

synchronizes with each other maintain the consistency. To support more users of the system we can

easily add new database servers and data space to system to adopt the increasing number of users. The

current system supports 1000 transactions using two servers. To support 100K transactions more servers

can be deployed in the system which are managed by a load balancer at different locations. Load

balancer distributes the client requests to the system on different servers to give the response meeting

the performance requirements and keeping the system in healthy state.

We can see from the above diagram that there are multiple application and web server are deployed.

Suppose on a certain day like Thanksgiving; the number of users would scale to a quantity that is currently

not supported by the system then we can add more server to do the needful and our system will always

be available to all the users. This satisfies the quality attribute - scalability. We can also add more

Database server if the capacity is reached. The same phenomena can be replicated in multiple

geographical locations.

4.6. Security

Enforcing security enables the system to prevent accidental or malicious actions which are outside the

designed usage of the system. Data disclosure or loss of information can also be prevented if proper

security measures are applied on the system.

Architecture was designed to provide security to the system in the following ways:

Login (Authentication and Authorization)

Customers and admins have different access rights in the system. This is necessary because

every user has his/her own shopping cart which is unique. While, admins can update/modify

the entire system. Hence ‘Login page’ is included in the system UI and ‘Authentication’ is

added as a separate component. Thus preventing unauthorized access.

Deployment of components to different application server

Components have been divided into two different application servers. Components which

requires more processing but less security has been placed separate from the components which

require more security. Thus, giving an extra level of protection to the system by securing

transactions from the application server which contains crucial components.

Different Database

We have ensured security in the database by keeping user and product database separate. User

contains critical data such as user credentials and order history hence it has been kept separate

from the product database.

4.7. Testability

Software shall be tested modularly before integrated.

Software testing is executing the software and check whether it behaves as expected. It includes testing of

modules to make sure that it meets all the requirements, and the errors and defects in the system are

reduced in a timely manner A piece of software is testable if it has controllability and observability.

Controllability concerns with the ease of manipulating the software components by feeding inputs to the

software. Observability is ability to observe the outputs and also to watch state changes of the software.

The software is built using different modules like web pages, services and database procedures. These

small modules can work independently by providing inputs to them. Even though some modules are

dependent on other modules, their inputs can be created by using stub methods. In that case these modules

can work and be tested independently.

Each component of the module is isolated from other remaining components and tested to determine

whether it behaves as intended. Each test case is independent from others. In unit testing, each unit is

tested separately before integrating them into modules. Large percentage of defects is identified during

unit testing. After the components are tested separately, they are combined to perform integration testing.

The units are combined and tested in multiple ways.

For example, in the user interface module, for testing the login component it verifies whether each user as

well as the admin has a unique account. It also verifies that, all the passwords are stored in an encrypted

format. It also checks the information maintained about each user is secured. It verifies whether admin is

able to see all the user information and also be able to upload or update new items or categories in the

system. In cart management service, it checks whether the user is able to see the cart items .The items

added or removed from the cart are verified and the quantity of the cart items is also verified. It also

verifies if the quantity of cart item is decreased or increased. It checks if the buying functionality is kept

same throughout the system. If a customer buys from mobile application or from a website, it is verified

that the functionality of the system is same. In payment gateway module, the credit card type, expiration

date of the card is verified. It also checks the billing address of the credit card. In database module, all the

user and product information, orders placed by the users is verified.

4.8. Usability

Easy to use. Intuitive to navigate through the view or payment process.

Usability is the characteristic of the system which makes it easier for users to use or browse through the

system.

Usability has the following components:

1) Learnability - The user should be able to learn quickly and easily to do productive work.

2) Efficiency of use – number of tasks that the user can perform per unit time

3) Reliability – the error which is caused by the system and how much time it takes to recover from that

errors

4) Satisfaction - the opinions of the users

5) Memorability: when user return to the design after a period of not using it, how easily can they re-

establish proficiency?

We have architected the system in such a way that it ensures reliability, efficiency of use and

learnability. Errors will not bring the system down as there are multiple backup servers available. We

have allocated webservers of high processing speed which supports multiple transactions thus ensuring

efficiency of use. Learnability is ensured by dividing the entire system into modules which allows easier

access to the components. Payment process is also handled separately which ensures security and better

usability.