Twisted for RPyMostat

This documents my initial tests for using Twisted as the framework for the main/hub process.

First, a really good basic doc on Deferreds and a not-so-short introduction to Asynchronous programming.

Twisted Basics

The more I read about this, the more I think Twisted is probably not the solution I need (I seem to need real threading or multiprocessing, not just async network IO). i.e. see this really important FAQ, Why does it take a long time for data I send with transport.write to arrive at the other side of the connection?.

Third-Party Twisted Modules

ReST API

  • we need to serve it nicely (not a horrible hack)
  • read/write from database used by other threads (DB tech still unknown; maybe flat files for now?)
  • read/write to some shared global memory (or main thread)

Klein

Links

Signals

  • Signals or some other sort of notification mechanism

Links

Scheduling

  • Scheduled tasks

Testing

  • test-ability (i.e. pytest, possibly something else to test the threading/network)

Links