NattapongSiri / covid_cb

MIT License
2 stars 1 forks source link

Enhance performance on unified-gateway #7

Closed NattapongSiri closed 4 years ago

NattapongSiri commented 4 years ago

The current implementation parse everything that come and go from Unified-gateway. We can enhance it by using serde_json::value::RawValue. This way, we can parse only part where we required to process it such as:

  1. Partial input parameters, i.e. sessionId, message, sourceLang, targetLang. All other such as context, etc, shall not be parse but forward to necessary request.
  2. WLT request/response
  3. WA response textual part that may need to be translate if and only if sourceLang and targetLang is not equals. Otherwise, we don't need to parse it at all.

This is likely a breaking change to wa module.