Commit Graph

15 Commits (299d4a2e05f5fa86c32b8336a0b791a682052eaf)

Author SHA1 Message Date
David Wilson ad182bc128 Default log level should be INFO 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 ae7fcb75e4 Fix run_with_broker test. 8 years ago
David Wilson 5a4fc577cd disable_site_packages() helper for ssh_test. 8 years ago
David Wilson 87a4206015 Enhance utils.log_to_file(). 8 years ago
David Wilson 5cc60b4bb3 log_to_file() sets econtext.io log level too. 8 years ago
David Wilson ac2a52587b s/wait/join/ 8 years ago
David Wilson 63ee222406 Many docs updates. 8 years ago
David Wilson 0e58a48611 Fix method naming everywhere. 8 years ago
David Wilson 9a8fc5e167 Another attempt at graceful shutdown. 8 years ago
David Wilson bca3a65157 Use set_cloexec() everywhere. 8 years ago
David Wilson ae3316b985 Split into core and master modules. 8 years ago
David Wilson dc231847a0 Add absent package cache. 8 years ago
David Wilson 081565358d utils.run_with_broker. 8 years ago
David Wilson da77cb5870 Fixes
CallError rather than trying to preserve exceptions.
Dead sentinel value instead of killed everywhere.
Simplify Channel.
MasterModuleResponder error response.
Simplify Unpickle().
Simplify reprs everywhere.
AllowClass() instead of AllowModule().
Get rid of needless property().
Split ExternalContextMain up into class.
econtext.utils module.
8 years ago