km assignment services logo

AWS Project

IS Implementation
Table of Contents

INTRODUCTION:

As we know that without any doubt, the COVID-19 situation has impacted the global markets. In Malaysia, because of this pandemic and financial situation, small and medium enterprises (SMEs) suffered a lot. But now they have finally woken up. They have realized that digital transformation is the need of the hour and they have made it the top priority.

For digital transformation, domain of cloud computing plays a vital and important role because it enables us to provide the access to business data and applications from anywhere in the world, at any time in the world, through any internet connected device – to fulfill many business demands, challenges and activities.

Compared to hosting the digital solutions to cater such challenges and demands on our own, at own in-server houses. We can do the same thing at a reasonable price, in more efficient, effective and productive way – by utilizing the features of cloud computing.

So, the industry area that we are going to target is the farming industry or agriculture industry which is the most important and plays very important and crucial role in our daily life. Without that industry we cannot survive because it fulfills the very basic demand of humans and animals by providing us the different foods and crops. Also, it keeps the environment green.

To facilitate farming and agricultural industry, we are going to launch a cloud-based web application that is built using ASP.NET which is named as “The Farm Villa”. Our purposed application will provide farmers a platform where they can come and list their farms. It will also let them display the services that they do offer to the customers. Also, it will enable us the farm owners to enlist the foods that are available at their farms.

Basically, this application will act as a portfolio kind of social site for the farms, farmers and the customers. The farmers can come to this application and can make the portfolio for their farms, by listing the description, contact information, the type of services they offer and the foods and crops etc. that they provide.

The customer will come to this application and can navigate or search for various enlisted farms on the web app. They can go to a particular farm and can look for the services offered by them and the type of foods or crops they to have. Then, the customer can contact them through the provided contact information.

Also, customer can leave the review on the farm portfolio regarding the quality of service, food and crop they got from the particular farm. This feature will let the new coming audience on the farm’s portfolio to determine the worth of the farm and they can easily decide that whether this farm is going to satisfy their needs or not – by reading or going through the reviews for that farm on its portfolio.

Following are some qualities that will be offered to customers, by our solution;

  • Relevance
  • Accuracy
  • Completeness
  • Reliability

BACKGROUND INFORMATION:      

Before COVID-19 pandemic situation, the farming and agriculture industry was operating on very traditional sort of model. In which they were not able to capture and target a huge amount of audience – especially the individuals. They have on direct contact with the market itself and also, they were not able to offer their services directly to the market.

Because, the market is captured by all the stores, companies and corporations who offer the same food, crops and services to the people out there – but on higher rates and with there own branding. They approach the farms and get them signed under the contract so that farm can provide all of its offering directly to them and they can do business with it.

As farms has no direct contact with the market and they have the product ready so they simply sign the contract and sell everything that they grow and offer to these stores and companies – by keeping that in mind something is better than nothing at all. But if we look closely, this whole scenario isn’t profiting the farms – at as much they deserve. Such kind of activity has putted farms more far from the actual market and made their grow very restricted.

PROBLEM STATMENT:

The farming and agriculture industry has no social portfolio website on the internet – through which they can target the vast amount of audience and offer their food, crops and other services. Also, the general people or individuals do not have any website through which they can directly contact with the farm and avail their services in most pure and organic way.

OBJECTIVES:

  • To provide farms a place to host their portfolio.
  • To let individuals to contact and see the farms portfolio.
  • To offer farms ability to know their customers.
  • To offer customers to know about the farms.
  • To design an interactive system.
  • To accelerate decision performance of customer.
  • To eliminate the gap between individual and farms.
  • To equip both farms and individuals with quality information.
  • To let the farms, generate decent about of business.
  • To let the individuals, try different farms in their range.
  • To enable individuals to have local, fresh, safe and green food or crops, directly.

MAJOR FUNCTIONS:

  • USER:

    • They are the visitors or audience, customers and clients.
    • They can explore farms.
    • They can manage their profiles.
    • They can add reviews on the farms.
  • FARMER:

    • They are the businessmen or owner of the farm.
    • They can explore other farms.
    • They can manage their profiles.
    • They can register new farms.
    • They can manage their farms.
  • ADMIN:

    • They are the main administration of the system.
    • They can explore farms.
    • They can manage all profiles.
    • They can register new farms.
    • They can manage all farms.

PROJECT PLAN:

First of all, we do our research on topic that we have chosen which will include;

  • Search for existing systems.
  • Do analysis on existing systems (if found any).
  • Start working for our solution.
  • Determine the target audience and scope.
  • Highlight all the actors in the system.
  • Figure out the needs of all actors in the system.
  • Define objectives of the system.

Once we had all of that information, then;

  • Sketch the rough layout of web application on the paper.
  • Draw few screens and improve the user experience.

Once visual design is figured out, then;

  • Draw the use case diagram.
  • Draw the system flowchart.
  • Explore different services of provided by AWS.
  • Prepare the cloud architecture diagram.

After that, we will begin the implementation;

  • Prepare Visual Studio for ASP.NET development.
  • Install and configure XAMPP to use MySQL database.
  • Code all the required models for the application.
  • Prepare the database locally.
  • Start implementing all the views of application.

After the application is ready for the use on local machine, we will continue to cloud;

  • Setup the AWS account and configure the IAM service.
  • Configure the RDS and connect it with the application programmatically.
  • Configure the DynamoDB and connect it with the application programmatically.
  • Configure the S3 and connect it with the application programmatically.
  • Configure the AWS Elastic Beanstalk service and enable AWS X-Ray on it.
  • Make the publish build of ASP.NET application.
  • Upload the application on AWS Elastic Beanstalk.
  • Test the live version of application with real data.
  • Check the application performance and latency.

After that, we will finish the final report of project for submission.

DESIGN:

For purpose of our purposed web application, we have used 3-tier cloud architecture style by utilizing different services offered by AWS (Amazon Web Services). The three-tier architecture is the most popular implementation of a multi-tier architecture and consists of a single presentation tier, logic tier, and data tier. The following illustration shows an example of a simple, generic three-tier application.

AWS Project

The application is decomposed into three tiers, where each tier is elastically scaled independently. The presentation tier is comprised of a load balancer and an application component that implements the Stateless Component pattern and User Interface Component pattern. The business logic tier is comprised of an application component implementing the Stateless Component pattern in addition to the Processing Component pattern.

2

The application is broken down into three logical tiers: the presentation layer, the business logic layer and the data storage layer. This architecture is used in a client-server application such as a web application that has the frontend, the backend and the database.

Each of these layers or tiers does a specific task and can be managed independently of each other. This a shift from the monolithic way of building an application where the frontend, the backend and the database are both sitting in one place.

DESIGN – USE CASE DIAGRAM:

A use case diagram is a graphical depiction of a user’s possible interactions with a system. A use case diagram shows various use cases and different types of users the system has and will often be accompanied by other types of diagrams as well.

3

DESIGN – SYSTEM FLOWCHART:

The system flow diagram is one of the graphical representations of the flow of data in a system in software engineering. The diagram consists of several steps that identify where the input is coming to the system and output going out of the system.

With the help of the diagram, it is possible to control the event decisions of the system and how data is flowing to the system. Therefore, the system flow diagram is basically a visual representation of data flow, excluding the minor parts and including the major parts of the system in a sequential manner.

4

DESIGN – SYSTEM REQUIREMENTS:

Software requirements for the purposed system are following;

  • NET Core
  • Razor Pages
  • Identity in ASP.NET Core
  • Entity Framework
  • Bootstrap
  • MySQL
  • IIS Server

Service requirements for the purposed system are following;

  • AWS IAM Service
  • AWS RDS Service
  • AWS S3 Service
  • AWS DynamoDB Service
  • AWS Elastic Beanstalk Service
  • AWS X-Ray Service (optional)
  • AWS CloudWatch Service (optional)

Hardware requirements for the purposed system are following;

  • AWS RDS db.t2.micro instance for database.
  • AWS EC2 t2.medium or t2.large utilized by AWS Elastic Beanstalk service.

IMPLEMENTATION:

AWS IAM Service:

AWS Identity and Access Management (IAM) provides fine-grained access control across all of AWS. With IAM, you can specify who can access which services and resources, and under which conditions. With IAM policies, you manage permissions to your workforce and systems to ensure least-privilege permissions.

IAM is an AWS service that is offered at no additional charge. With IAM, you define who can access what by specifyaing fine-grained permissions. IAM then enforces those permissions for every request. Access is denied by default and access is granted only when permissions specify an “Allow.”

5

First of all, to access our AWS console we have configured AWS IAM service, like;

  • Search for IAM on AWS console.
  • Open the IAM dashboard to manage the access.
  • Click on Add User.
  • Enter the username.
  • Set the AWS access type to “Access key – Programmatic access”.
  • Click next to give permissions.
  • Click on Create Group.
  • Enter the group name.
  • Add following policies to it;
  • Click on Create Group button.
  • Select the newly created group from the list.
  • Click on next to give tags.
  • Give tags if want to. (optional)
  • Click on next to review the configuration.
  • Review the configuration.
  • Click on Create User button to create the user.
  • Click on Download .csv button to download the credentials.
  • Done!

AWS RDS Service:

Amazon RDS is a managed relational database service that provides you six familiar database engines to choose from, including Amazon Aurora, MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server. This means that the code, applications, and tools you already use today with your existing databases can be used with Amazon RDS. Amazon RDS handles routine database tasks, such as provisioning, patching, backup, recovery, failure detection, and repair.

Amazon RDS makes it easy to use replication to enhance availability and reliability for production workloads. Using the Multi-AZ deployment option, you can run mission-critical workloads with high availability and built-in automated failover from your primary database to a synchronously replicated secondary database. Using Read Replicas, you can scale out beyond the capacity of a single database deployment for read-heavy database workloads.

6

To configure AWS RDS service for the purpose of our application we went through the set of following steps;

  • Search for RDS on AWS console.
  • Open the RDS dashboard to manage the rational database service.
  • From resources section, click on DB Instances.
  • Click on Create Database.
  • Choose a database creation method as Standard Create.
  • From Engine Options section, choose the MySQL.
  • Come to Settings section and give the DB Instance identifier.
  • Under the Credentials Settings, give the Master username.
  • Then, given the Master Password and confirm it.
  • Jump to Connectivity section and mark the Public Access to Yes.
  • Let the remaining settings as default.
  • Click to Create Database button.
  • Then, it will start creating the database.
  • Wait for a while until the database is created by the AWS RDS.
  • Once the database is created, open it.
  • Go to Connectivity & Security tab.
  • Under the Security section, click on VPC Security Groups.
  • It will redirect us to EC2 Security Groups page.
  • Click on Inbound Rules tab.
  • Then, click on Edit Inbound Rules.
  • Add the rule to allow the traffic from anywhere.
  • Click on Save Rules button and close the current tab.
  • Come back to database tab.
  • On Connectivity & Security tab, move to Endpoint & Port section.
  • From here note down the Endpoint and port to access the database.

Now, we are all done with setting up our AWS RDS Service. Let’s move to code section where we will establish the connection with the database.

  • Open Data\TheFarmVillaDbContext.cs
  • Move to OnConfiguring method and paste the following code;

string mySqlConnectionStr = @”server=thefarmvilla.c2a7ljaj8iry.us-east-1.rds.amazonaws.com;port=3306;database=TheFarmVilla;uid=admin;password=thefarmvillaBYsaadin;”;

optionsBuilder.UseMySql(mySqlConnectionStr,

                        ServerVersion.AutoDetect(mySqlConnectionStr));

  • Save and close the file.
  • Open the command prompt in Visual Studio.
  • Type following command;

dotnet ef migrations add CreateDatabase –output-dir Data/Migrations

  • Then, type following command;

dotnet ef database update

After that our database will be ready to be utilized by our application. The last two commands that we ran, basically they have created all the required tables that we need for our application. And this is done automatically.

Performance of Application:

AWS X-Ray helps developers analyze and debug production, distributed applications. By using this actually, we can understand how our application and its underlying services are performing to identify and troubleshoot the root cause of performance issues and errors. It provides an end-to-end view of requests as they travel through our application, and shows a map of our application’s underlying components. We can use it to analyze both applications in development and in production, from our simple three-tier applications to the complex microservices applications consisting of thousands of services.

Following is the screenshot of AWS X-Ray report for our deployed application;

32
33

AWS CloudWatch is a monitoring and observability service built for DevOps engineers, developers, site reliability engineers (SREs), IT managers, and product owners. It provides us with data and actionable insights to monitor our applications, respond to system-wide performance changes, and optimize resource utilization.

Latency testing report for our deployed application is as follows;

last
35

Conclusion:

The purposed application will help the both Customer/User and Farmer – to get the what is best suited for them. It connects the individual customers/users to the farmers. The application is planned so that future changes can be effectively done. The following conclusion can be accepted from the improvement of the project. Automation of the whole application improves the great association.

It delivers a very well friendly graphical UI (user-interface) and gives proper access to the users depending upon their roles. It successfully overcomes the delay and gap between the individual customers/user and farmers. Provides the refreshing information that turns out to be simpler.

The system can be easily scaled in the cloud to handle the overall operations of the purposed application effectively and efficiently. The system has a tolerable extension for adjustment later on in the future. Also, the system has a passable scope for modifications in the future, if it is essential.

FUTURE WORK:

  • We will use the Google Maps API to determine the farms’ actual location.
  • Will allow the user to do the farm ratings, by Rating Stars.
  • Will display the top five best rated farms on the home page of the application.
  • Allow the loading of multiple images for the farms.
  • Will let provide the in application chat-room where communication can be done.
  • Will allow the farms to enlist the prices.
  • Will add some of the payment methods to do online transaction.
  • Will enable the cart feature for customers/users in the application.