Host Site –
The overall system shall be deployed on AWS Elastic Beanstalk. As the EBS provisions ec2 instances,
they can be used for –
(i) Presentation layer components will be hosted EC2 instance.
Which would handle --
• Login interface
• New user registration interface
• Essay submission
• feedback display
• user dashboard
• Essay analytics.
(ii) Application layer components will be hosted on aws EC2 instance.
Which would handle --
• Authentication service
• user management service
• essay evaluation service
• essay management service
• Organization management service.
(iii) Business layer components will be hosted on aws EC2 instance. (Application layer and business
layer components are deployed on the same backend server)
Which would handle --
• User
• RegisteredUser
• UnregisteredUser
• Student
• Teacher
• Administrator
• Essay
• EvalModule
• Organization.
(iv) Data Access layer code runs inside the EC2 instance.
Which handles --
• Database connector
(v) Databases will be hosted on Amazon Aurora (RDS) inside a private subnet within the VPC.
Which handles --
• User database
• Essay database
• Feedback database
Deployment strategies –
Steps –
(i) Setting up the environment: Create the Elastic Beanstalk environment (which provisions EC2
instances automatically) and configure the Aurora relational database within the VPC.
(ii) Install runtime environment (python/java), configure environment variables and install database
drivers.
(iii) API configuration: Define REST endpoints, and configure env vars for database endpoint.
(iv) Define the access control policies (RBAC) (Roles - User(abstract), Student, Teacher, Administrator)
and other packet accessibility policies.
Security mechanisms --
Network - Database to remain in private subnet.
Apply firewall rules to direct DB accesses.
Security groups restrict open ports (only 80/443).
Application - Need to ensure password hashing.
HTTPS communication and input validation to prevent sql injection.
Database - Ensure encrypted database storage, regular backups and secure storage of database
credentials.
Layer-wise security -
Presentation Layer: HTTPS encryption, CSRF protection
Application Layer: Token-based authentication, RBAC enforcement
Business Layer: Authorization checks before evaluation logic
Data Access Layer: Restricted DB credentials, No direct public access
How end users access the application layer components -
The end users access the system using a web browser. It loads the presentation layer components.
Any user actions may trigger HTTP/HTTPS requests, which are sent to the application layer via Rest
apis. The application layer invokes the business logic and the data access layer logic, then result is
sent back to the presentation layer and displayed to the user.
Pictorial flow—
[EndUser] --(HTTPS)--> [Presentation Layer(UI)] --(REST api calls)--> [Application layer] --(any action,
like submitEssay, evaluate)--> [Business layer] --(sql query)--> [Data Access layer(db connector)] ----
>[Aurora db]
Request goes left to right, and response goes right to left.