Open Brbb opened 6 years ago
@Brbb
The PNG worker should be separate from the function that sends the photo to the Telegram chat. Those are separate concerns. So looking at Flow2, we will split the blue worker into 2 parts: PNG worker and Telegram sendPhoto. The PNG worker also should ask for the data it needs as shown in Flow 1.
For 5a(serve webpage), that can be compiled on-demand for now, so we will not trigger anything from the API side as 5a implies. Instead, for webpages, we will use a standard url schema so the web server knows what kind of page to compile and serve to the user.
If we treat everything as a micro-service, we can reuse them for other things in the future.
Proposed architecture:
Description
The user gets live charts and/or static png delivered to his Telegram chat
Chart list
Possible solution
Flow 1:
chat_id
+ params to the Image rendering service (on different Heroku?)which makes its own.chat_id
oreditMessage
Flow 2:
chat_id
.chat_id
oreditMessage