Futurize ServiceStateMachine transitions

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service Arch 2020-07-27, Service Arch 2020-08-10
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      ServiceStateMachine currently dispatches and schedules through a central function here. We should convert it to a future chain with four callbacks:

      • Source (or skip if exhaust)
      • Process a.k.a. Parse and handle
      • Sink (or skip if moreToCome)
      • Cleanup and Poll

      This will make maintaining this code easier and it also allows us to do future continuations in any of these callbacks. For source and sink steps, they are already futurized via the SessionASIO. For the process step, we can convert ServiceEntryPoint::handleRequest() to return a Future<DbResponse> instead of a DbResponse. This means that command responses that would block on thread can now be fully asynchronous instead. It also means that if a request should be processed on a dedicated thread, we can schedule onto the right executor and return a future that runs inline on it.

            Assignee:
            Andrew Chen (Inactive)
            Reporter:
            Benjamin Caimano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: