Commit Graph

71 Commits

Author SHA1 Message Date
Brian Warner
d4bedeafbf general fixes 2017-04-06 12:21:00 -07:00
Brian Warner
20814a65f4 rename Wormhole (machine) to Boss, leave room for higher-level thing 2017-04-06 12:21:00 -07:00
Brian Warner
a2ed35ceb8 remove old files, lots of type work 2017-04-06 12:21:00 -07:00
Brian Warner
80661392b6 build out all state machines
still early: automat is happy (they're syntactically valid), but the Outputs
are not implemented, and there are plenty of type mismatches
2017-04-06 12:21:00 -07:00
Brian Warner
a3ec344eb8 clean up machine names/initials
C: Code
RC: Rendezvous Connector
R: Receive
2017-04-06 12:21:00 -07:00
Brian Warner
f3b1e847e9 fix everything: should now be consistent and correct
Start with machines.dot, which gives the override. Then traverse downwards
from wormhole.dot .
2017-04-06 12:21:00 -07:00
Brian Warner
e85309a784 split out receive/send machines 2017-04-06 12:21:00 -07:00
Brian Warner
a675648335 code.dot: better names 2017-04-06 12:21:00 -07:00
Brian Warner
c050d06753 update code.dot 2017-04-06 12:21:00 -07:00
Brian Warner
50050dc140 finish wormhole.dot 2017-04-06 12:21:00 -07:00
Brian Warner
2fc5af7bd0 nameplates.dot: done 2017-04-06 12:21:00 -07:00
Brian Warner
44cc1399c4 make mailbox/mailbox_close/machines consistent
finally get mailbox.png layout good enough
2017-04-06 12:21:00 -07:00
Brian Warner
c9f3abe703 rename .dot files, remove obsolete ones 2017-04-06 12:21:00 -07:00
Brian Warner
40e0d6b663 more work, feels better now 2017-04-06 12:21:00 -07:00
Brian Warner
16c477424c more demo work 2017-04-06 12:21:00 -07:00
Brian Warner
7f3e86acca more fussing, split out M_S0 2017-04-06 12:21:00 -07:00
Brian Warner
f6930a9bfc more thoughts 2017-04-06 12:21:00 -07:00
Brian Warner
cf981222c5 think about "checkpointing" as a state
with async exit when the checkpoint is finally written. Not sure this is the
best idea.
2017-04-06 12:21:00 -07:00
Brian Warner
20b80be342 remove stale machines 2017-04-06 12:21:00 -07:00
Brian Warner
3af375b173 finish Mailbox state machine, including close 2017-04-06 12:21:00 -07:00
Brian Warner
b934192f20 work on Mailbox machine 2017-04-06 12:21:00 -07:00
Brian Warner
11a80f0018 moving to separate machine class 2017-04-06 12:21:00 -07:00
Brian Warner
a9a0bc43c7 w4.dot: redraw Connection Machine to match 2017-04-06 12:21:00 -07:00
Brian Warner
0b28137948 w3.dot: figure out close() pathways
d=M_close() will always do the verbose clean shutdown thing, and the Deferred
won't fire (e.g. we won't move to state "Ss") until we've deallocated our
server resources (nameplates and mailboxes), and we've finished shutting down
our websocket connection. So integration tests should wait on the Deferred to
make sure everything has stopped moving and the reactor is clean.

CLI applications that are following the success path can use M_close() and
wait on the Deferred before terminating.

CLI applications that wind up on some error path can either use M_close(), or
just SIGINT and leave the server to GC stuff later.

GUI applications can use M_close() but ignore the Deferred, and assume that
the program will keep running long enough to get the deallocation messages
through.

GUI+DB applications can use M_close() and then stop recording state changes,
and if the program remains running long enough, everything will be
deallocated, but if it terminates too soon, the server will have to GC.
2017-04-06 12:21:00 -07:00
Brian Warner
86f246dbdb just might work. close() mapped out.
Starting to draw a distinction between clean-close and abrupt-halt. At least,
if we're in the connected state, wormhole.close() should take its time and
free up server-side resources (nameplate/mailbox) right away, rather than
relying on GC/timeouts to release them.

It might be useful to make separate "clean" wormhole.close() and "abrupt"
wormhole.halt() API calls, except that really when would you ever call halt?
To be realistic, only one of two things will happen:

* connection happens normally, app finishes, calls "clean" close()
* app terminates suddenly, via exception or SIGINT

The problem with defining .close() is that I have to make it work sensibly
from any state, not just the one plausible "connected" state. Providing
.halt() requires defining its behavior from everywhere else.
2017-04-06 12:21:00 -07:00
Brian Warner
2cfc990d5e more 2017-04-06 12:21:00 -07:00
Brian Warner
5b82b424a0 w.dot: comment out things that seem superceded by w2.dot 2017-04-06 12:21:00 -07:00
Brian Warner
fa76b57976 w2.dot: add M_ prefix 2017-04-06 12:21:00 -07:00
Brian Warner
e7b2a7bbf9 fixing 118 is the key 2017-04-06 12:21:00 -07:00
Brian Warner
f85e2ec68a more 2017-04-06 12:21:00 -07:00
Brian Warner
f27e601e41 more 2017-04-06 12:21:00 -07:00
Brian Warner
78fcb6b809 new approach, thinking about connections up front 2017-04-06 12:21:00 -07:00
Brian Warner
6c77f33cdf start on connection machine 2017-04-06 12:21:00 -07:00
Brian Warner
3ec7747b1e more 2017-04-06 12:21:00 -07:00
Brian Warner
b1f313b116 more diagram work 2017-04-06 12:21:00 -07:00
Brian Warner
8a9b50b320 adding high-level state diagram
Automat doesn't let me combine flowcharts with state machines in a way that's
useful for documenting my thoughts.
2017-04-06 12:21:00 -07:00
Brian Warner
94b1ed8739 starting to draw new state machines 2017-04-06 12:21:00 -07:00
Brian Warner
98e3df1e4d api.md: mark argument slightly better 2017-04-06 12:12:42 -07:00
Shirley Kotian
abec2d2680 typos 2017-03-18 18:39:54 +05:30
Brian Warner
775a35d337 update Tor docs, mention py2-only 2017-01-16 18:21:42 -05:00
Brian Warner
c6ac04433f add docs/tor.md 2017-01-16 11:14:23 -05:00
Brian Warner
7f2edeeb11 document some attacks
closes #107
2017-01-01 14:29:48 -05:00
Antoine Beaupré
d7441cfe8a remove out of date version numbers 2016-12-15 10:36:32 -05:00
Antoine Beaupré
7bade97bc2 add cross-refs and authors 2016-12-15 10:36:16 -05:00
Antoine Beaupré
cdc25e533a move wormhole-server to section 8
this is where admin commands and daemons belong, according to intro(8)
2016-12-15 10:35:49 -05:00
Antoine Beaupré
cc890aa6fa import manpages from Debian project 2016-12-15 10:25:28 -05:00
Brian Warner
06d2a0be68 update docs 2016-05-25 20:58:53 -07:00
Brian Warner
edebf4d787 update events.dot with check-verifier logic 2016-05-25 18:06:08 -07:00
Brian Warner
f6a5581f92 move events diagram (.dot) into docs/ 2016-05-24 16:15:19 -07:00
Brian Warner
104ef44d53 provide wormhole() as a function, rather than a class constructor
You must always provide a reactor= argument. In the future, omitting the
reactor= argument is how you ask for a blocking Wormhole.
2016-05-12 16:45:54 -07:00