Professional Documents
Culture Documents
CUETSocial Solution
CUETSocial Solution
ID: 1804058
Issues from given resources:
1) Adding new features is becoming very difficult.
2) During the pick hours, the site runs very slowly.
Let's describe Clean code architecture and where should be our Code structure like below.
SRC
Domain
Entity
......
Applications
Behaviors
.......
Infrastructure
Persistence
......
Presentation
Controller
.......
Domain Layer
Entity
User
Photo
Comment
Like
Application Layer
Behavior
UserService
PostService
PhotoService
CommentService
LikeService
Infrastructure
Persistence
………………………
Presentation Layer
Controller
UserController
GET/user
POST/user/{id}
GET/{id}
PUT/user
PATCH/user/type={type}
POST/user/login
PostController
GET/
POST/ post/{user_id}
GET/{id}
PUT/post/{post_id}
DELETE/post/{post_id}
PhotoController
GET/
GET/{id}
POST/ photo/{user_id}
DELETE/photo/{post_id}
CommentController
POST/comment/post/{post_id}
PUT/comment/post/{post_id}/{comment_id}
DELETE/comment/post/{post_id}/{comment_id}
LikeController
POST/like/post/{post_id}/type={true|false}
POST/like/photo/{photo_id}/type=false
Summary
Now the code will be more readable and to add new features it will be easier, don’t have to face
any complexity. It will save time and cost.
Proposed Solution for Problem Two
So there might be the best solutions for our application host in the Cloud.
I prefer from my side we may host in AWS(Amazon Web Service).
1. Pay-as-you-go Model: AWS provide this model and our pick time definited (6:30 pm to
11:00 pm). So we do have not to extra pay there and our application is for a long time so
it will be a most considerable point.
4. Global Reach: Cloud providers have data centres in multiple regions, allowing us to
deploy resources closer to your users for improved performance. So we have not been
thinking about server down, fault tolerance.
In summary 5000 users, the cost difference might not be significant, and other factors such as
ease of management, scalability, and flexibility could be more critical. So Cloud services will
provide a convenient and flexible solution for smaller workloads.