Architecture of our site
Our server-side application will be composed of a monolithic core, three services, MongoDB server, and image storage server.
The monolithic core will serve pages to the site visitors and administrators.
The three services are database service, URL configuration service, and upload service. The following is what each of these services do:
Database service: Adding, retrieving, updating, and deleting coupons in MongoDB is done through database service. The monolithic core retrieves coupons from MongoDB through database service, and upload service stores coupons through database service.
Upload service: When a user submits a coupon, the HTML form is submitted to the upload service. The upload service then sends the image to the image storage server and adds metadata about the coupon to the database using the database service. We moved these operations to a different service, because if we are resizing and converting the uploaded image, then it will consume more memory...