Skip to content

Future Improved IO Plans/Thoughts #63

@mossblaser

Description

@mossblaser
  • Blocking interfaces should always be present and should continue to work just like they do now
  • Plenty of performance is lost to waiting for roundtrips on SCP commands
    • Must ask ST what restrictions apply to current implementations/his thoughts on having multiple open SCP requests
    • In many cases, blocking functions make lots of potentially-parallel SCP calls (e.g. get_machine), thus many functions with blocking interfaces would end up being faster for free.
  • In the future, opportunities will exist for using multiple endpoints simultaneously for SCP
    • Should ask ST about side-effects of communicating with the system from multiple ethernet (or otherwise) links. I would guess none.
    • It might not be necessary/beneficial to limit comms to just use of the local ethernet connection
  • Alternative interface should allow the queuing/dispatching of many SCP commands at once
    • Should, behind the scenes, schedule these commands appropriately (i.e. limit maximum outstanding commands)
    • Some plan needs to be implemented to handle deferred responses
      • Callbacks on completion (messy)
      • Use a "real" framework for this (e.g. Twisted)
      • Methods could be "two-phase" generators
        • Calling the method yields after the command is either queued or sent
        • Doing a next() on the generator would then produce the received response, blocking until the command has both been sent and the response received. The generator could then yield the response or throw an appropriate exception (e.g. timeout)
        • Potentially, enabling this mode could simply be an argument of all the existing commands -- better still, it would make it possible to use a decorator for this function. Also, as an argument it can be set by the context -- schweet.
        • Additionally provide some flush-style function which blocks until all commands have been sent and responded to.
        • Clearly JH has taken a liking to this idea

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions