Image Generation API
Problem Statement
QR code image generation POC is done in Java using Zxing library.
Design a way to expose this usecase for consumption.
Approach 1
Package the code as a executable jar
Input - Predetermined set of parameters in a String array
Output - Generated image in a pre-determined path in local node
Pros | Cons |
|---|---|
|
|
Approach 2
Expose the usecase to consumers directly through an API in Learning Service
Pros | Cons |
|---|---|
|
|
Approach 3
The API currently exposed in content service for QR code image generation can consume this API to generate the QR code image.
Pros | Cons |
|---|---|
|
|
Open Questions:
Should the design support multiple QR code image generation per request?
In case of API, what should be the response? Image itself or the public url of the image uploaded in the cloud
Should the design support capabilities like caching images and upload to cloud?