Full Architecture - CSCI-40500-77100-Spring-2021/project-10__backend GitHub Wiki
Meal App Complete Architecture
The following is the complete architecture for our App. We however will most likely not build all of it. Instead, will be building this out incrementally; focusing on the core features of our products first. The feature priorities are:
- [Core] Image Posting
- [Core] User Interaction (Like, Comment)
- Restaurant Integration
- Meal Recommendation
- Calorie Tracking
Architectural Constraints
Nonfunctional Product Characteristics
- Performance is essential for user interactions
- Cost-Effective cause we are broke
- Security
Product Lifetime
- Evolving Architecture: As we are taking an incremental approach in building feature, the software should support the ability to add new modules easily
Software Reuse
- Using 3rd part libraries to speed up development
- Glide for handling Android Image Handling
- Express for handling API Routing
Number of users
- Once a social network starts growing, it tends to experience exponential growth. As such, the software should be elastic
- Software should be scalable with user growth as no one likes a slow social media
Software Compatibility
- No plans for integrating additional software, as such, this isn't important
We have also chosen to go towards a more service-oriented architecture. As such, we'll be adding components and resources as needed during the implementation of a given feature.
Architecture Layers
Architecture Diagram
Description
- Scalability: Using AWS Lambda, we are able to spin up additional concurrent instances of each of our services as demand increases
- Elasticity: Able to modify resource allocation pretty easily on Lambdas
- Database Bottle-neck: Database hosted on Digital Ocean. Both databases need to scale at a constant rate. Also harder to scale up or down as needed. The choice to pick Digital Ocean is mostly a price constraint. Until billing reaches about $30/month, Digital Ocean is a lot more cost-effective than AWS
- Security: All communications are HTTPS; User authentication/authorization layer before being able to access any services. Further authorization layers will be added within each lambda.
- Using Service-Oriented Architecture; Able to easily adapt new modules to the application
- Asset Retrieval: Images are pretty slow to retrieve online. Being an image-centric application, this would create huge performance issues for our users. We are using AWS CloudFront as a CDN to handle content delivery to combat this issue.