Commit Graph

142 Commits (22c1594f04c92b8b358140086899ed32954d69dd)

Author SHA1 Message Date
David Wilson 186d823600 issue #20: tests and fixes for mitogen.master.Select(). 7 years ago
David Wilson 6869292738 issue #20: initial implementation of mitogen.master.Select(). 7 years ago
David Wilson d1faf5ba1d Remove set from permitted types. 7 years ago
David Wilson df1dc41d4f Remove final vestiges of context.key. 7 years ago
David Wilson f186b4c9d8 docs: Use sphinx-programoutput plugin for preamble_size.py 7 years ago
David Wilson f62d4f1891 Update preamble_size output. 7 years ago
David Wilson 1ed8bb6924 Document a bunch of mitogen.master and move more docstrings into Sphinx. 7 years ago
David Wilson 25adb7416a Reorder table of contents. 7 years ago
David Wilson 1de875b4aa Add serialization rules section. 7 years ago
David Wilson 491b5ab575 core: add ALLOCATE_ID message for fakessh. 7 years ago
David Wilson 18a0529887 Import unused images. 7 years ago
David Wilson 535ffc25b7 Move more docstrings out of core.py. 7 years ago
David Wilson 05a0feb2f9 core: support takes_econtext and takes_router decorators. 7 years ago
David Wilson 60dc0f6058 Typo. 7 years ago
David Wilson a1525b8bb8 Add subheading to describe each import hack. 7 years ago
David Wilson 38602d5eb3 Link to six bug. 7 years ago
David Wilson 700bfe31a4 Pad out shame.rst. 7 years ago
David Wilson db793003e0 Tidy. 7 years ago
David Wilson f60e8bc47d Add hacks to allow Mock to be imported. 7 years ago
David Wilson 1627164165 fix unbelievably dumb variable shadowing 7 years ago
David Wilson 6e3f0702a3 A few more mitogen.slave/master changes 7 years ago
David Wilson ce7a7eddb4 Mention git. 7 years ago
David Wilson 9aec5a1ccf Invert the sense of mitogen.slave 7 years ago
David Wilson 84707866b9 A few more images. 7 years ago
David Wilson 446e956e8f Rename package. 7 years ago
David Wilson 2812d9210e Add extra edge 7 years ago
David Wilson 59e7b1956b Simplify edges 7 years ago
David Wilson b52a556abd Reorder. 7 years ago
David Wilson 8d9c7245ec Tidy example. 7 years ago
David Wilson 354c96c409 Missing arc in fakessh.graphml 7 years ago
David Wilson abbcd30fa1 fakessh: add nice graphml image 7 years ago
David Wilson 1bd510601e fakessh: rename API function to match index.rst. 7 years ago
David Wilson a1044d8a6e Tidy up docs 7 years ago
David Wilson 7634b4c31c Add ProcessMonitor class 7 years ago
David Wilson de91f9ef7a Get rid of HMAC use. 7 years ago
David Wilson a11003862b Add warning to docs. 7 years ago
David Wilson acb6520ea2 Fix feature list link 7 years ago
David Wilson 8e2d691d2d Move issue lists into GitHub. 7 years ago
David Wilson e0ecfab5fc More bold, everyone loves drama 7 years ago
David Wilson d702a61589 More doc updates. 7 years ago
David Wilson 9ca39dcf72 Add Message Routing section to docs 7 years ago
David Wilson 65d5844d1a Tidy up docs. 7 years ago
David Wilson 616dc43069 fakessh: Initial working version 7 years ago
David Wilson 15d3508331 Add examples section to docs. 7 years ago
David Wilson 06d65ac6ac howitworks additions 7 years ago
David Wilson b1d0c569f6 Add TODO 7 years ago
David Wilson 6c33d251df Reduce src_id/dst_id to 16 bits. 7 years ago
David Wilson b70803a763 Update numbers. 7 years ago
David Wilson 39e70fe50c Typo. 7 years ago
David Wilson 37934f8b5a Document GET_MODULE in a slave context. 7 years ago
David Wilson 0aff1d82c6 Reads more neatly. 7 years ago
David Wilson f9df857a57 Tidy up API. 7 years ago
David Wilson 2d92455103 Update example. 7 years ago
David Wilson 0a0a060492 Introduce econtext.core.Router, refactor everything
* Header now contains (src, dst) context IDs for routing.
* econtext.context_id now contains current process' context ID.
* Now do 16kb-sized reads rather than 4kb.
* econtext package is uniformly imported in econtext/core.py in slave
  and master.
* Introduce econtext.core.Message() to centralize pickling policy, and
  various function interfaces, may rip it out again later.
* Teach slave/first stage to preserve the copy of econtext.core sent to
  it, so that it can be used for subsequent slave-of-slave bootstraps.
* Disconnect Stream from Context, and teach Context to send messages via
  Router. In this way the Context class works identically for slaves
  directly connected via a Stream, or those for whom other slaves are
  acting as proxies.
* Implement Router, which knows a list of contexts reachable via a
  Stream. Move context registry out of Broker and into Router.
* Move _invoke crap out of stream and into Context.
* Try to avoid pickling on the Broker thread wherever possible.
* Delete connection-specific fields from Context, they live on the
  associated Stream subclass now instead.
* Merge alloc_handle() and add_handle_cb() into add_handler().
* s/enqueue/send/
* Add a hacky guard to prevent send_await() deadlock from Broker thread.
* Temporarily break shutdown logic: graceful shutdown is broken since
  Broker doesn't know about which contexts exist any more.
* Handle EIO in iter_read() too. Also need to support ECONNRESET in here.
* Make iter_read() show last 100 bytes on failure.
* econtext.master.connect() is now econtext.master.Router.connect(),
  move most of the context/stream construction cutpaste into a single
  function, and Stream.construct().
* Stop using sys.executable, since it is the empty string when Python
  has been started with a custom argv[0]. Hard-wire python2.7 for now.
* Streams now have names, which are used as the default name for the
  associated Context during construction. That way Stream<->Context
  association is still fairly obviously and Stream.repr() prints
  something nice.
7 years ago
David Wilson 0c8e486891 Clarify. 7 years ago
David Wilson e374f85888 Fix module loader deadlock
Stop using cPickle on the broker thread where it is not known whether
the pickle data would cause the import machinery to be invoked, which
currently relies on blocking calls. Huge mess but it works.

This is due to:

        context.call(some.module.func, another.module.func)

We stringify ("some.module", "func"), but the reference to
another.module.func is passed into the pickle machinery, and there's no
way to generically stringify all function references in user data for
reification on the main thread, without doing something like this
instead.
7 years ago
David Wilson 48b4ac17b7 Revert "Fix messed up font on desktop."
This reverts commit 82257c2c37.
8 years ago
David Wilson 42732c90b6 Add sudo factory to docs. 8 years ago
David Wilson 99a2ccf68c First draft of econtext/sudo.py. 8 years ago
David Wilson 9733668b50 Replace OK indicator with EC0/EC1. 8 years ago
David Wilson 82257c2c37 Fix messed up font on desktop. 8 years ago
David Wilson 9cd9f1fec2 Update module forwarder blurb. 8 years ago
David Wilson ff903b1bcd Rearrange docs, split connection methods into submodules. 8 years ago
David Wilson 2feaf570bd Reorient Sphinx layout to get subheadings in sidebar. 8 years ago
David Wilson 08e80b824d Another TODO 8 years ago
David Wilson 762bf0722a Drama 8 years ago
David Wilson a26a6bd66e More docs. 8 years ago
David Wilson a49fe26bb8 TODO entry. 8 years ago
David Wilson fea12a6030 Many updates: graceful shutdown, docs, threading
* Start splitting docs up into internals.rst / api.rst
* Docs for lots more of econtext.core.
* Get rid of _update_stream() and has_output(), replace with individual
  functions called as state changes.
* Add Broker.on_thread() and remove Stream._lock: simply call
  on_thread() to ensure buffer management is linearized.
* Rename read_side/write_side to receive_side/transmit_side like event
  handler names.
* Clean up some more repr / debug logs.
* Move handle cleanup to Context.on_shutdown where it belongs.
* Make wake() a noop when called from broker thread.
* Replace graceful_count crap with Side.graceful attribute, add
  Broker.keep_alive() to check whether any registered readers want to
  be kept alive for graceful shutdown() or any child contexts with a
  connected stream exist.
* Make master.Broker timeout slightly longer than slave broker.
* Add generic on_thread() to allow running code on the IO thread.
8 years ago
David Wilson 1bc8681cb4 More doc updates. 8 years ago
David Wilson 1f27872eda Many docs updates. 8 years ago
David Wilson 25d651f494 Fix Sphinx config. 8 years ago
David Wilson da4e457247 More docs, move call/call_with_deadline to econtext.master. 8 years ago
David Wilson a00cb1d6d2 More drama bold. 8 years ago
David Wilson e87b44a703 Hyperlinks. 8 years ago
David Wilson c607831561 SlaveModuleImporter->Importer, enable intersphinx, finish howitworks.rst. 8 years ago
David Wilson b05f949a17 Tidy. 8 years ago
David Wilson c82ddeb0f7 More howitworks.rst. 8 years ago
David Wilson 3af67f4008 Fix figure layout. 8 years ago
David Wilson 737d095ffc More docs. 8 years ago
David Wilson 753544c104 Add wtf.gif. 8 years ago
David Wilson 62520b1bcb Write history section. 8 years ago
David Wilson 63ee222406 Many docs updates. 8 years ago
David Wilson a174c32d22 Remove comma 8 years ago
David Wilson 1bafeb4434 Doc updates. 8 years ago
David Wilson 99b9abf052 Drama markup. 8 years ago
David Wilson 34a2166485 More docs. 8 years ago
David Wilson fb501f66db Add history.rst. 8 years ago
David Wilson 2d3dd2ef63 Pad out howitworks.rst. 8 years ago
David Wilson dc9861c667 Delete junk. 8 years ago
David Wilson ce27058bdf Initial intro doc. 8 years ago
David Wilson c63f1a5415 Initial docs config. 8 years ago