Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ GCP = Google Cloud Platform
## Backend services

1. ImageUpload
- After getting the base64 image posted to the API Gateway endpoint, *ImageUpload* service saves it in S3 and creates an record in DynamoDB. It also sends a message to SQS requesting image resizing.
- After getting the base64 image posted to the API Gateway endpoint, *ImageUpload* service saves it in S3 and creates a record in DynamoDB. It also sends a message to SQS requesting image resizing.

2. ImageResizer
- After picking up the image resizing request message from SQS, this service gets the original image from S3 and resizes them, updating the database with resized image urls.

3. Vision
- Whenever a new image is inserted in S3, the bucket is configured to trigger this service, which requests OCR results from Google Vision API, and sends translation & NLP-English (Natural Language Processing) requests to SQS.
- Whenever a new image is inserted into S3, the bucket is configured to trigger this service, which requests OCR results from Google Vision API, and sends translation & NLP-English (Natural Language Processing) requests to SQS.

4. Translate
- After picking up the translate request message from SQS, this service requests Google Translate API with Enlighs OCR results, updating the database with the translation text. Then it sends a NLP-ZH-TW request to SQS.
- After picking up the translate request message from SQS, this service requests Google Translate API with English OCR results, updating the database with the translation text. Then it sends a NLP-ZH-TW request to SQS.

5. NLP
- After picking up the NLP request message from SQS, this service requests Google NLP API, updating the database with the entities list. These may be English or Zh-Tw entities depending upon request.
Expand All @@ -42,10 +42,10 @@ GCP = Google Cloud Platform
- Sign up on both AWS and GCP
- Get GCP credentials (a key json file) and project ID
- Create your lambda functions, with the following caveat
- Set the env variables relating to GCP for Vision, Translate, NLP services for your lambdas
- Normally to deploy to a lambda function you `npm install`, `zip` everything and upload to the lambda function
- However, for `ImageResizer`, `Vision` and `NLP` there's a build step after `npm install`, and it won't build correctly if you build locally on your Mac or Windows machines.
- So, you need to either 1) build it inside a docker container with Amazon Machine Image (AMI) Linux or 2) build it on a AMI Linux EC2 instance. If this is too complex, ask this repo author ([email protected]) for zipped `node_modules` files with the correct built files.
- Set the env variables relating to GCP for Vision, Translate, NLP services for your lambdas
- Normally to deploy to a lambda function you `npm install`, `zip` everything and upload to the lambda function
- However, for `ImageResizer`, `Vision` and `NLP` there's a build step after `npm install`, and it won't build correctly if you build locally on your Mac or Windows machines.
- So, you need to either 1) build it inside a docker container with Amazon Machine Image (AMI) Linux or 2) build it on a AMI Linux EC2 instance. If this is too complex, ask this repo author ([email protected]) for zipped `node_modules` files with the correct built files.

## Future plans

Expand Down