olinlibrary / bear-as-a-service

Bear-as-a-Service (BaaS) for the Olin Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve latency

osteele opened this issue · comments

Bear's event → speech latency is high. (How high?) Improve this.

The SMS sequence is SMS → Twilio → Twilio Gateway → MQTT → sms_bear_gateway → MQTT → tts_worker. Any of these could be a hot spot. (Or, there could be several warm spots, and the chain is just too long.) The first step is to inspect where the latency is introduced.

The sequence is more complicated than it needs to be for particular applications. (It was designed to simplify in-class portion of the day one activity.) Now that we have some applications, we can optimize at the application level too.

Some of the work may apply to the Twilio Gateway project, rather than the code in the bear-as-a-service repo.

Some latency may just be warming the Heroku apps. This can be fixed by moving them to olin-build and paying the fee.