Commit Graph

517 Commits

Author SHA1 Message Date
Tony Garnock-Jones e03c8267dd Update federation to match latest paper-journal work: proper propagation of Add/Del 2019-05-20 21:49:19 +01:00
Tony Garnock-Jones 8aaf1d1902 Improve distributed debug output 2019-05-20 21:45:40 +01:00
Tony Garnock-Jones 43a0578f19 Buffer uplink communications to give a chance for stateful entities at each end to initialise themselves before sending messages.
An alternative approach would be to reintroduce flow-control, which was
removed as part of commit 94e27e1.
2019-05-16 23:14:39 +01:00
Tony Garnock-Jones 8daff63e8e Fix (observe (server-envelope A B)) => (server-proposal A (observe B)) 2019-05-16 23:13:56 +01:00
Tony Garnock-Jones 94e27e1cbc Change federation protocol to be transport-neutral, carried via Syndicate itself 2019-05-16 22:28:42 +01:00
Tony Garnock-Jones 84361dcbaf Move away from use of "broker" 2019-05-16 20:14:19 +01:00
Tony Garnock-Jones 6952aec992 Remove federation-prototype 2019-05-16 15:48:51 +01:00
Tony Garnock-Jones cd2d7e428b Close input/output ports in web.rkt once connection is logically over 2019-05-16 14:58:33 +01:00
Tony Garnock-Jones 025f101d09 Disconnect websocket service on error 2019-05-16 13:12:21 +01:00
Tony Garnock-Jones c9b62c9a6d Drain ws-ch in an additional, previously-overlooked case 2019-05-16 12:39:16 +01:00
Tony Garnock-Jones 22a517f1b5 Handle "Ping" requests from peers in federated mode 2019-05-16 12:38:26 +01:00
Tony Garnock-Jones 7ec9752f41 Accept and discard "Pong" replies from clients 2019-05-16 12:38:06 +01:00
Tony Garnock-Jones af40134c53 Correct server websocket http-request pattern 2019-05-16 12:37:39 +01:00
Tony Garnock-Jones ae97fb1d1e Flow-controlled TCP (except in netstack); flow-controlled server/federation messages; fixes federation startup glitching 2019-05-12 13:07:38 +01:00
Tony Garnock-Jones 12650e2058 Repair test compilation 2019-05-09 11:43:41 +01:00
Tony Garnock-Jones e9b1983408 Move command-line scripts into submodule main, so tests don't get stuck 2019-05-09 11:43:34 +01:00
Tony Garnock-Jones 7f7a6d03d8 Command-line programs for starting various kinds of server 2019-05-09 11:39:49 +01:00
Tony Garnock-Jones 386a66747e Tweak logging levels 2019-05-09 11:39:49 +01:00
Tony Garnock-Jones 2b882cc10a Integrate federation/peering with client/server code; almost but not quite working yet 2019-05-09 11:39:49 +01:00
Tony Garnock-Jones 0dca5bfbe3 Allow specification of host/port/scope in server-chat-client.rkt 2019-05-09 11:16:29 +01:00
Tony Garnock-Jones 88ec80487d Remove unused definition 2019-05-07 14:06:06 +01:00
Tony Garnock-Jones 39906803b2 Move prototype federation code out of the way 2019-05-07 13:45:52 +01:00
Tony Garnock-Jones cf92ae14c5 Select client/server scope on connect; stub out federation/peering; protocol error and disconnection support 2019-05-07 12:56:40 +01:00
Tony Garnock-Jones 0ac2bb768e New "test" illustrating aspects of the turn-based approach taken 2019-05-07 12:07:30 +01:00
Tony Garnock-Jones db523a8974 The Great Renaming broker -> server, part 2 2019-05-05 16:51:23 +01:00
Tony Garnock-Jones f2b29a798a The Great Renaming broker -> server, part 1 2019-05-05 16:37:03 +01:00
Tony Garnock-Jones a08574a403 Remove unnecessary require 2019-05-05 15:58:01 +01:00
Tony Garnock-Jones d5ff1dd007 Use definitions from wire-protocol.rkt in federation 2019-05-05 15:57:51 +01:00
Tony Garnock-Jones aad3fb6866 Move federation protocol a step closer to client/server protocol 2019-05-05 15:54:28 +01:00
Tony Garnock-Jones 924512f7de Make internal broker isolation protocol asymmetric, to support the needs of federation 2019-05-05 12:55:16 +01:00
Tony Garnock-Jones a3a229532a add-observer-endpoint!, add-raw-observer-endpoint! 2019-05-04 22:58:45 +01:00
Tony Garnock-Jones dabc74976a Refine output of tf.rkt 2019-05-04 22:48:37 +01:00
Tony Garnock-Jones a86478b7b9 Remove unneeded #:capture-projection argument to term->skeleton-interest 2019-05-03 20:29:40 +01:00
Tony Garnock-Jones 40ee3b4ca7 Test and fix for observation visibility in broker 2019-05-03 17:53:24 +01:00
Tony Garnock-Jones 83c81fa293 Rename federation2.rkt -> federation.rkt 2019-05-03 13:45:05 +01:00
Tony Garnock-Jones 508e37171d Bounce relay 2019-05-03 11:20:22 +01:00
Tony Garnock-Jones ed7cf375ad Only remove an entry from specs when no holders remain 2019-05-03 11:20:12 +01:00
Tony Garnock-Jones 736c9de3dc Note on semantic difference 2019-05-03 10:32:16 +01:00
Tony Garnock-Jones f847f3c049 Fix self- and peer-signalling of observation; generalize broker protocol to permit multiple uses of leaf2 on different nodes; printf -> log-info 2019-05-03 10:25:20 +01:00
Tony Garnock-Jones 38e3894a3d Clean up conn-subs on Unsubscribe 2019-05-03 10:23:08 +01:00
Tony Garnock-Jones 1c2bd11373 Connect router to dataspace 2019-05-03 00:10:15 +01:00
Tony Garnock-Jones 79e8d54a51 Avoid silly use of macro 2019-05-02 23:12:02 +01:00
Tony Garnock-Jones 17d5b88784 Federation kernel 2019-05-02 15:59:25 +01:00
Tony Garnock-Jones 4fd2c9895c Remove old, dead code 2019-04-25 12:58:48 +01:00
Tony Garnock-Jones 419bd093d1 Support transformations (e.g. rotation) in the scene prelude 2019-04-25 12:58:30 +01:00
Tony Garnock-Jones 759bbdf1c3 Add visibility-restriction, making the test pass 2019-03-25 16:32:09 +00:00
Tony Garnock-Jones 9e923e1c63 Failing test case: need visibility-restriction in broker clients 2019-03-25 12:16:30 +00:00
Tony Garnock-Jones eb33fdbd59 Steps toward activation in test cases 2019-03-25 12:15:09 +00:00
Tony Garnock-Jones a39bd458d9 Restructure broker protocol adapters; add loopback 2019-03-25 12:14:35 +00:00
Tony Garnock-Jones 25970d9f16 Split out server-connection.rkt 2019-03-24 17:17:26 +00:00
Tony Garnock-Jones 8a5d91a175 strong-gensym 2019-03-24 17:16:57 +00:00
Tony Garnock-Jones 025289500a Configurable broker tcp/http ports 2019-03-22 12:51:59 +00:00
Tony Garnock-Jones 4732650041 module+ main in reload.rkt 2019-03-20 22:36:13 +00:00
Tony Garnock-Jones 63ea6a9d3a extend-ground-boot! 2019-03-20 22:36:05 +00:00
Tony Garnock-Jones 3ff50a6f65 broker: client; ping for keepalive; client example 2019-03-18 23:29:12 +00:00
Tony Garnock-Jones 4e33429b19 tcp-rejected; reassert-on 2019-03-18 23:27:59 +00:00
Tony Garnock-Jones fc43d5c4a0 Initial broker implementation 2019-03-18 15:34:14 +00:00
Tony Garnock-Jones f4f3b67cdf NOTICE support 2019-02-09 10:36:03 +00:00
Tony Garnock-Jones 94c66094e6 Cope with libpurple weirdness 2019-02-05 13:37:18 +00:00
Tony Garnock-Jones 21131dc02c Force membership of channel on login 2019-02-05 13:37:04 +00:00
Tony Garnock-Jones c5848e4c0b PASS; better NICK collision avoidance 2019-02-05 13:30:18 +00:00
Tony Garnock-Jones 823754c8b5 Nested reloaders; simple greeter 2019-01-30 16:40:52 +00:00
Tony Garnock-Jones 28d7bd6653 Make reloaders in turn reloadable 2019-01-30 16:40:12 +00:00
Tony Garnock-Jones 8b516b0190 Filesystem driver: add background-activity signal 2019-01-30 16:39:13 +00:00
Tony Garnock-Jones 636055cbea Scriptlet for starting a client 2019-01-29 23:08:04 +00:00
Tony Garnock-Jones 1e3e978e36 /LIST 2019-01-29 20:47:17 +00:00
Tony Garnock-Jones 7e2284ac11 User count; define/query-count 2019-01-29 20:47:06 +00:00
Tony Garnock-Jones 9c5d9768b4 Pinned channels 2019-01-29 20:46:38 +00:00
Tony Garnock-Jones ed0307d4e5 Parity with the other version 2019-01-28 13:54:18 +00:00
Tony Garnock-Jones bd5f2d8a1b Ported ircd example to imperative-syndicate 2019-01-28 13:50:49 +00:00
Tony Garnock-Jones 60412bd6f2 config driver 2019-01-28 13:47:29 +00:00
Tony Garnock-Jones 832adc94c0 Enable immediate-query 2019-01-28 13:46:54 +00:00
Tony Garnock-Jones e72e22f250 tcp-connection-peer 2019-01-28 01:14:58 +00:00
Tony Garnock-Jones 23580010bb Supervision and reloading 2019-01-28 01:14:33 +00:00
Tony Garnock-Jones 636ca9acf7 Note in HOWITWORKS about `opaque-placeholder`. 2018-11-20 13:22:44 +00:00
Tony Garnock-Jones 937bb7a7c4 Identify, expose, and repair bug (using the new `opaque-placeholder`) 2018-11-20 13:20:31 +00:00
Tony Garnock-Jones 6c1e3b033d Support binary/text websocket payloads 2018-11-15 06:49:31 +00:00
Tony Garnock-Jones 93371894a0 Repair longstanding, subtle bug in both old- and new-syndicate.
during/spawn used not to add linkage assertions to its
initial-assertion set. In addition, if a spawned actor died in its
initial boot procedure, its initial assertions would never be visible.
These two problems interlocked to cause a space leak in during/spawn,
where monitoring facets would never be cleaned up.

This change does two things:
 - adds linkage assertions to the initial-assertion set in during/spawn
 - properly briefly signals initial-assertions even when a new actor
   immediately crashes.

Together, these repair the space leak in during/spawn with a crashy
child startup procedure.
2018-11-04 13:43:17 +00:00
Tony Garnock-Jones 45f638ebae Silly mistake 2018-11-02 15:09:20 +00:00
Tony Garnock-Jones 9571125f3b More notes 2018-11-02 12:18:44 +00:00
Tony Garnock-Jones fb195eb9b7 Improve (?) test ergonomics. 2018-11-02 12:15:21 +00:00
Tony Garnock-Jones 7f14dd900c Detect and repair error in error-handling and -recovery. 2018-11-02 12:15:04 +00:00
Tony Garnock-Jones bc4fb5ef94 Ensure patched assertions are added before being removed, to avoid glitching 2018-11-02 00:38:40 +00:00
Tony Garnock-Jones 22b4f965b9 Separate out narration 2018-10-24 16:14:54 +01:00
Tony Garnock-Jones 84298d5571 The problem specifies 10 elves 2018-10-24 14:29:10 +01:00
Tony Garnock-Jones 838bde3740 Supply #f as cleanup function in multicast udp-dataspace, instead of void; notes on cleanup functions and visibility-restrictions 2018-10-24 13:21:20 +01:00
Tony Garnock-Jones 6ba3734d9d Santa Claus Problem, in Syndicate/rkt 2018-10-24 11:40:16 +01:00
Tony Garnock-Jones 4ddcdfb6a9 Present-to-absent check is necessary in assertion removal handler 2018-10-21 13:32:06 +01:00
Tony Garnock-Jones 02181354dd Tweaks 2018-10-21 01:04:05 +01:00
Tony Garnock-Jones db563fc309 Minor corrections and tweaks 2018-10-21 00:59:38 +01:00
Tony Garnock-Jones 836bae0e27 First JavaScript steps, based on HOWITWORKS.md 2018-10-21 00:58:40 +01:00
Tony Garnock-Jones a178ec5ddf Update to explain the "dummy" outermost wrapper constructor 2018-10-20 21:54:58 +01:00
Tony Garnock-Jones 035eb06a9d Nope, unsafe-struct-ref is still not measurably faster than the safe variants 2018-10-20 21:47:47 +01:00
Tony Garnock-Jones a5d147e277 Avoid a few gratuitous conversions during `skeleton-modify!`. 2018-10-20 21:42:38 +01:00
Tony Garnock-Jones b511e640bd Minor tweak 2018-10-20 19:52:37 +01:00
Tony Garnock-Jones cbf5224599 Remove superfluous update-path helper 2018-10-20 19:13:07 +01:00
Tony Garnock-Jones 6e06c4d502 Fix bug exposed by previous commit 2018-10-20 19:09:25 +01:00
Tony Garnock-Jones 8ff6dc5ff8 Eliminate one set of dummy wrappers 2018-10-20 18:27:15 +01:00
Tony Garnock-Jones 0c701809e1 Describe how the efficient index structure works 2018-10-14 21:25:13 +01:00
Tony Garnock-Jones d497d9e6d1 Split out preserves into its own repository 2018-09-29 17:22:34 +01:00
Tony Garnock-Jones 2c03883b00 SOH-prefixed embedded format considered harmful 2018-09-29 00:07:49 +01:00
Tony Garnock-Jones 268afe8a40 Notes on embedded binary values 2018-09-29 00:04:56 +01:00
Tony Garnock-Jones 348cb3e2a2 Notes on NaNs 2018-09-28 11:48:58 +01:00
Tony Garnock-Jones b0de674117 Grammar 2018-09-28 11:12:58 +01:00
Tony Garnock-Jones 9c38509973 Typo 2018-09-28 11:12:53 +01:00
Tony Garnock-Jones 4187ccb77d Clarification 2018-09-28 11:12:35 +01:00
Tony Garnock-Jones 4f65284ef9 More tests and fixes 2018-09-28 11:00:50 +01:00
Tony Garnock-Jones d27f9cb7cc Disallow whitespace between a label and its open-parenthesis 2018-09-28 11:00:40 +01:00
Tony Garnock-Jones d267f65b71 More tests, coverage and fixes 2018-09-27 23:14:43 +01:00
Tony Garnock-Jones 5f9f2175f0 More tests and fixes 2018-09-27 22:13:46 +01:00
Tony Garnock-Jones 47519680d5 Bug fixes to text reader, and more tests 2018-09-27 21:35:03 +01:00
Tony Garnock-Jones b807b38a44 More TODOs in the text; initial textual reader in Racket 2018-09-27 19:25:28 +01:00
Tony Garnock-Jones f9497d64c5 Handle a couple of TODOs 2018-09-27 13:34:32 +01:00
Tony Garnock-Jones 6fa0dde8f4 WIP from the early hours of this morning, adding textual syntax 2018-09-27 11:42:55 +01:00
Tony Garnock-Jones 906f8a01b6 Python preserves 2018-09-25 15:53:56 +01:00
Tony Garnock-Jones b6a3c480b3 Small fix and new question 2018-09-25 15:53:42 +01:00
Tony Garnock-Jones d0ff78e406 Remove version; improve tests 2018-09-25 15:53:35 +01:00
Tony Garnock-Jones 240cee9d52 Bring preserve.rkt up to spec 2018-09-25 11:49:32 +01:00
Tony Garnock-Jones 780bc6fec2 Python SignedInteger rep needs long as well as int 2018-09-25 10:20:35 +01:00
Tony Garnock-Jones 6e98ba0097 Link to Racket docs for prefab struct labels 2018-09-25 10:08:22 +01:00
Tony Garnock-Jones 0444a2a096 Streamed binaries always use ByteString chunks 2018-09-24 23:15:36 +01:00
Tony Garnock-Jones a9445b2ca7 Squeak Smalltalk mapping 2018-09-24 19:54:59 +01:00
Tony Garnock-Jones e25b7dacbc Improve (?) Erlang mapping 2018-09-24 19:54:52 +01:00
Tony Garnock-Jones 4237200210 Remove page-break override 2018-09-24 19:54:43 +01:00
Tony Garnock-Jones 354776199f Improve formatting now that section numbers exist 2018-09-24 19:54:23 +01:00
Tony Garnock-Jones 3c7215397d RFC7159 -> RFC8259 2018-09-24 19:12:43 +01:00
Tony Garnock-Jones 35726436c9 Specially number appendices 2018-09-24 19:12:29 +01:00
Tony Garnock-Jones e438085e74 Tweaks; python mapping 2018-09-24 18:34:07 +01:00
Tony Garnock-Jones 3b12a290a3 Single-colon pseudoselectors 2018-09-24 18:11:34 +01:00
Tony Garnock-Jones 1275aaded1 Fix the jolly section numbering 2018-09-24 18:11:19 +01:00
Tony Garnock-Jones 96c46c19b4 Split out CSS; attempt to get section numbering (grrr!) 2018-09-24 16:45:39 +01:00
Tony Garnock-Jones 4716b4f4e9 Minor print layout tweaks, and minor content fixes 2018-09-24 16:08:48 +01:00
Tony Garnock-Jones b656df8632 Tighten 2018-09-24 15:33:19 +01:00
Tony Garnock-Jones a22ded2f16 Literal small integers 2018-09-24 14:09:26 +01:00
Tony Garnock-Jones b4d4092b90 Trim and improve 2018-09-24 12:59:22 +01:00
Tony Garnock-Jones b2eb53e664 Tweak print stylesheet 2018-09-24 10:36:10 +01:00
Tony Garnock-Jones 7f71620136 Print makefile 2018-09-23 22:56:41 +01:00
Tony Garnock-Jones f2c2e4d39e Tweaks for Chrome and for print 2018-09-23 22:56:36 +01:00
Tony Garnock-Jones ff5cb65f5f Fixes 2018-09-23 22:44:43 +01:00
Tony Garnock-Jones 00a69ae012 Progress 2018-09-23 22:35:00 +01:00
Tony Garnock-Jones f2f57385ce Many improvements 2018-09-23 18:14:58 +01:00
Tony Garnock-Jones 2996970cbe move codec.md together with preserve.md 2018-09-23 14:39:46 +01:00
Tony Garnock-Jones 738fad360a codec.md draft 2018-09-23 14:39:02 +01:00
Tony Garnock-Jones c23285781c preserve.md based on codec.md which I'm about to check in 2018-09-23 14:37:20 +01:00
Tony Garnock-Jones f6ab8320c5 sqlite driver 2018-08-29 15:03:12 +01:00
Tony Garnock-Jones 939396b9b7 Rename codec --> preserve 2018-08-27 10:24:11 +01:00
Tony Garnock-Jones 542d0a886a Explore struct inheritance 2018-08-21 10:54:17 +01:00
Tony Garnock-Jones 7dacb5ba6e Better codec 2018-08-19 22:13:42 +01:00
Tony Garnock-Jones 77b0addcd0 Improve multicast protocol 2018-08-19 17:54:32 +01:00
Tony Garnock-Jones c125564f5f Improve example 2018-08-15 10:11:07 +01:00
Tony Garnock-Jones 061765041b Initial quasi-port of Syndicate/rkt web driver 2018-08-14 17:58:36 +01:00
Tony Garnock-Jones 76674c77b3 Multicast-UDP-based dataspace sketch, from last night 2018-08-14 12:35:56 +01:00
Tony Garnock-Jones e9457af8c2 Clear no-longer-interesting timers 2018-08-14 12:33:50 +01:00
Tony Garnock-Jones 979d057f3f TODO 2018-08-13 21:45:44 +01:00
Tony Garnock-Jones f5efa77d91 term-intersect 2018-08-13 21:32:51 +01:00
Tony Garnock-Jones 86412b273d UDP and UDP multicast 2018-08-13 20:07:27 +01:00
Tony Garnock-Jones ea16d24be8 filesystem driver 2018-05-11 09:58:25 +01:00
Tony Garnock-Jones 43f1eab1f3 Port netstack to imperative-syndicate.
If you change `racket-bitsyntax` to use `typed/racket/base/no-check`
for its `bitstring.rkt` module, this runs about 15x faster than the
`syndicate` version of the stack. Otherwise, it runs about 3x faster
than the `syndicate` version of the stack.
2018-05-06 15:28:41 +01:00
Tony Garnock-Jones 35726f3831 Notes on tcp2 protocol 2018-05-06 11:24:28 +01:00
Tony Garnock-Jones 96d24fbb4b New test case 2018-05-06 11:06:36 +01:00
Tony Garnock-Jones 9fc621c829 Add missing assertion for outbound connections. 2018-05-06 11:03:39 +01:00
Tony Garnock-Jones 61cd0613ca Repair bogus test. I should have caught this earlier! 2018-05-06 10:55:21 +01:00
Tony Garnock-Jones be1bc6c220 Improve the kinds of tests we can do for expected output slightly. 2018-05-06 10:55:02 +01:00
Tony Garnock-Jones daba892a07 pattern-expander.rkt 2018-05-04 23:15:09 +01:00
Tony Garnock-Jones d053edc101 GUI example 2018-05-04 16:57:22 +01:00
Tony Garnock-Jones 46ddb47050 Cosmetic - extra logging (when uncommented) 2018-05-04 16:56:56 +01:00
Tony Garnock-Jones d3f27488ed Repair long-standing error in skeleton-walking. 2018-05-04 16:56:45 +01:00
Tony Garnock-Jones 000fa3c008 Extremely limited support for quasiquoting and quoting in patterns 2018-05-04 16:56:23 +01:00
Tony Garnock-Jones 1868b10617 Clock face example 2018-05-04 16:09:12 +01:00
Tony Garnock-Jones bc4c080641 Quasi-useful debug output 2018-05-04 16:04:42 +01:00
Tony Garnock-Jones ab64f71766 Restriction-paths: right idea (?), wrong implementation. This time maybe.
Instead of having restriction-paths as an adjunct to a change, they're
more propertly a part of each assertion itself. The new `skeleton.rkt`
keeps an optional restriction-path with each assertion, treating it as
distinct from its underlying assertion. The idea of not signalling
changes in assertions that have a restriction-path mismatch stays.
2018-05-04 15:55:53 +01:00
Tony Garnock-Jones ef4584a60f Skip apply-patch! make-work if patch is empty 2018-05-03 22:56:40 +01:00
Tony Garnock-Jones 69a8893da3 Add the concept of "restriction-path", which limits assertion visibility.
This is used when relaying: because we don't have access to the full
term, but only the projection results, we are inserting various
`(discard)`s. This is the cause of the failure in
`test/core/nesting-confusion.rkt`.

By adding `restriction-path`, we allow the inner dataspace to avoid
showing a reconstructed term to endpoints that might be able to
observe the reconstructed parts.

An alternative implementation approach is to generalize patterns in
the inner relay actor, translating all `(discard)`s into captures,
which would give us all the relevant terms that we need. The way I've
chosen to go (or at least, to try out) allows us to potentially keep
the "efficient" idea of just transmitting pattern-bound values across
some network link connecting dataspaces. The alternative would require
transmission of the full assertions, eliding no irrelevant detail.
2018-05-03 22:09:33 +01:00
Tony Garnock-Jones 8b36c52455 for/bag and for/bag/count 2018-05-03 22:09:13 +01:00
Tony Garnock-Jones ee0033b6be Make test-implementation language expose all of `racket` rather than just `racket/base`, for convenience. 2018-05-03 22:08:52 +01:00
Tony Garnock-Jones f01b17dea4 Reuse apply-patch for initial-assertions too 2018-05-03 20:09:34 +01:00
Tony Garnock-Jones 00d50e6700 Factor out assertion structure definitions 2018-05-03 16:14:30 +01:00
Tony Garnock-Jones fecd2f9787 Notes on install and test 2018-05-03 15:21:33 +01:00
Tony Garnock-Jones 47a113026c README.md 2018-05-03 15:06:53 +01:00
Tony Garnock-Jones fa3505e3a6 Add second, non-dataspace, test case to illustrate correct behaviour 2018-05-02 23:36:03 +01:00
Tony Garnock-Jones 852eff8d0b New (failing) test case re: the approach to relaying 2018-05-02 18:23:02 +01:00
Tony Garnock-Jones bc5b28c403 Correct printing of test procedures 2018-05-02 18:20:33 +01:00
Tony Garnock-Jones e4a1a6e075 Add `bag-empty?` 2018-05-02 18:20:24 +01:00
Tony Garnock-Jones 17cee51342 Ensure (??) that relays' assertions can't outlive them 2018-05-02 18:10:52 +01:00
Tony Garnock-Jones dd123f4a27 Notes on eventual improvements to dataspace nesting 2018-05-02 13:19:18 +01:00
Tony Garnock-Jones 74cb70bdf3 Actually-useful instantaneous frame rate measurement 2018-05-01 22:40:12 +01:00
Tony Garnock-Jones eb208f3a10 Handy logging for diagnosing problems 2018-05-01 22:39:50 +01:00
Tony Garnock-Jones 367b39ce39 Eliminate a (mostly harmless) source of #f current-facet. 2018-05-01 22:39:26 +01:00
Tony Garnock-Jones 669122766d Allow multiple "root" facets, by creating a dummy root 2018-05-01 22:39:02 +01:00
Tony Garnock-Jones c85f05ced1 A few names for unnamed actors make it clear which actor is faulting 2018-05-01 21:19:19 +01:00
Tony Garnock-Jones bbcb8a3b80 Adapt platformer to imperative-syndicate. Mostly working!
It's also nicely fast compared to the old-Syndicate version :-)

There are still some problems with parameters in cross-ds relaying;
the symptom is #f for (current-facet) at some point, leading to some
sprites that don't get retracted (!).
2018-05-01 21:15:22 +01:00
Tony Garnock-Jones 869a495392 First sketch of `quit-dataspace!`. 2018-05-01 21:12:54 +01:00
Tony Garnock-Jones 896cfe2498 Multi-assert!/retract! for adhoc assertions 2018-05-01 20:58:26 +01:00
Tony Garnock-Jones e43054a6bd More thoughtless uncommenting of query-* forms 2018-05-01 20:58:02 +01:00
Tony Garnock-Jones 9c22868bd2 Correct error from earlier thoughtless uncommenting 2018-05-01 20:57:42 +01:00
Tony Garnock-Jones e4e0b5f9d4 Support vector in patterns, like we already support list 2018-05-01 20:57:22 +01:00
Tony Garnock-Jones 2b2d12075a gl-2d driver and examples 2018-05-01 17:39:17 +01:00
Tony Garnock-Jones 38c6bfd20e Drain multiple external ground events at once. (Good or bad idea?) 2018-05-01 17:34:51 +01:00
Tony Garnock-Jones 65b2c94161 Easy access to profiling 2018-05-01 17:34:34 +01:00
Tony Garnock-Jones 32d217f3e0 Care less about exact set ordering in test case 2018-05-01 17:32:03 +01:00
Tony Garnock-Jones 475e6527f3 Uncomment query-value and friends. May need tweaks. 2018-04-30 22:48:50 +01:00
Tony Garnock-Jones ec0933ffdd Clamp `adhoc-retract!` to not drop below zero. 2018-04-30 22:48:27 +01:00
Tony Garnock-Jones 2575b71db4 In case there are no activation-forms, add a gratuitous `(void)` at the end. 2018-04-30 22:47:53 +01:00
Tony Garnock-Jones f3ca2b6a15 Repair incorrect interleaving of actions and scripts 2018-04-30 22:47:25 +01:00
Tony Garnock-Jones 3c4076287e Switch another in-hash to hash-for-each 2018-04-30 14:46:43 +01:00
Tony Garnock-Jones 671e9742c7 Speedup from avoiding uselessly enqueueing an empty work queue 2018-04-30 11:19:03 +01:00
Tony Garnock-Jones 0e37037b6e Eliminate another parameter: now only `current-facet` remains 2018-04-30 11:18:49 +01:00
Tony Garnock-Jones 14ee4f70ef Avoid manipulating `in-script?` all the time 2018-04-30 10:44:35 +01:00
Tony Garnock-Jones c2cb624e42 Another small speed bump from using hash-for-each over in-hash-keys 2018-04-30 10:04:33 +01:00
Tony Garnock-Jones 00121d9710 Avoid sets on the hot path (use hashes instead); good speed improvement 2018-04-30 09:32:08 +01:00
Tony Garnock-Jones eb3a93e32b Add in-* annotations to for loops 2018-04-30 09:14:00 +01:00
Tony Garnock-Jones a6811f2ba5 Add timer/timestate support; this prompted a change to endpoint registration.
The `add-endpoint!` call is changed in two ways:

 - the old `assertion-fn` has become `update-fn`, yielding both
   an assertion *and* an optional handler, because if the handler
   depends on a field which changes, previously the handler wasn't
   being updated

 - a new parameter, `dynamic?`, can be set to #f (it's usually #t)
   to ensure that the assertion and skeleton-interest are calculated
   only once ever, and are not connected to the dataflow machinery.

The first change makes it possible for the `(later-than (deadline))`
pattern, where `deadline` is a field, to work; the second change makes
`during` and `during/spawn` work correctly in the face of field
updates.
2018-04-29 22:27:55 +01:00
Tony Garnock-Jones 91596b066f External-event and TCP drivers; chat server and stdin echo programs 2018-04-29 18:43:39 +01:00
Tony Garnock-Jones f45323a097 Extract raw dataspace test to separate file 2018-04-29 16:08:52 +01:00
Tony Garnock-Jones 2652147141 Commented-out debug-printing in relay.rkt 2018-04-29 16:08:35 +01:00
Tony Garnock-Jones 8ba3779eda Add `test` make target 2018-04-29 16:08:20 +01:00
Tony Garnock-Jones 5b435ee8d8 bag-key-count 2018-04-29 16:08:01 +01:00
Tony Garnock-Jones b3d6b74dab Repair scheduling of inner dataspaces, thus allowing e.g. double nesting 2018-04-29 16:07:49 +01:00
Tony Garnock-Jones e69473a115 Makefile 2018-04-29 14:54:28 +01:00
Tony Garnock-Jones 1fe134d920 Tweak .gitignore 2018-04-29 14:54:22 +01:00
Tony Garnock-Jones dd2cddb6a7 Nested dataspaces 2018-04-29 14:54:14 +01:00
Tony Garnock-Jones 204197c3eb First stab at #lang infrastructure 2018-04-29 12:22:12 +01:00
Tony Garnock-Jones f40e7c15cc Refactor tests 2018-04-29 11:55:32 +01:00
Tony Garnock-Jones afad4cd0be Repair rotten pattern tests 2018-04-29 11:30:26 +01:00
Tony Garnock-Jones 3a857db4b9 Box-and-client speed test 2018-04-27 23:59:04 +01:00
Tony Garnock-Jones 290170f450 Simple test harness 2018-04-27 23:53:31 +01:00
Tony Garnock-Jones d6c0241c57 Cosmetic notes 2018-04-27 18:23:34 +01:00
Tony Garnock-Jones a4abea9d87 Remove current-dataspace parameter 2018-04-27 18:05:33 +01:00
Tony Garnock-Jones 0cbb5b061c Cosmetic notes 2018-04-27 17:36:43 +01:00
Tony Garnock-Jones edb8e719f7 More robust approach to cleanup of assertions on actor termination.
We now explicitly track *committed* assertions of each actor in a new
field, `actor-cleanup-changes`. Each time a patch action is
*performed*, `actor-cleanup-changes` is updated. When an actor quits,
it enqueues a special new kind of action, a `quit` action.

When a `quit` action is performed, any remaining contents of
`actor-cleanup-changes` are processed in order to fully remove any
leftover assertions. (Leftover assertions will only arise in
exceptional cases: when some stop-script or facet boot-script raises
an uncaught exception.)

As part of this commit, we undo the effect of commit 8624047.
2018-04-27 17:30:26 +01:00
Tony Garnock-Jones 65a221ae68 New failing test case. This, plus recent commits, calls for a
different strategy for tracking the retractions necessary at actor
termination.
2018-04-27 10:55:21 +01:00
Tony Garnock-Jones 0d5b7e9c02 Cosmetic 2018-04-27 10:54:58 +01:00
Tony Garnock-Jones a247d8fd2b Switch adhoc-assertions to a bag (from a set).
This repairs a bug regarding crashes in a new actor's boot-proc.

Previously, if boot-proc raised an exception, the initial assertions
would stick around forever. By changing adhoc-assertions to a bag
rather than a set, and putting the initial assertions in the bag, we
put them somewhere they are guaranteed to be processed during actor
termination, even when an exception is signalled during boot.

This is an API change wrt the previous Syndicate implementation:
assert!/retract! now have bag semantics, not set semantics. We can add
set-semantics APIs if we end up needing them, of course, layered on
top of the bag implementation.
2018-04-27 09:59:03 +01:00
Tony Garnock-Jones ff4799b282 Immutable bags 2018-04-27 09:55:19 +01:00
Tony Garnock-Jones 8624047ecd The failing test now passes. The reasons for this are subtle:
The patch here removes a terminated facet from its parent's
`facet-children` set only in a script, and only after all other
scripts enqueued as part of facet termination have executed without an
uncaught exception.

This means that, if (say) a stop script raises an uncaught exception,
it might have happened after some *but not all* scripts resulting from
calls to `retract-facet-assertions-and-subscriptions!` have already
executed. So some endpoints' assertions and subscriptions will have
been removed.

When the uncaught exception is caught by the handler in
`with-current-facet`, a call to `abandon-queued-work!` is made, which
discards queued scripts, including the remaining assertion-cleanup
scripts as well as the scripts for removing dead facets from their
parents' `facet-children` sets. It also (crucially) discards queued
patch actions, including those resulting from already-executed
assertion-cleanup scripts.

At this point, we have a facet tree with some dead facets still in it,
and no queued outbound patches. The assertions for the still-present
dead facets are still logically asserted.

Then, a call to `terminate-actor!` happens, which traverses the whole
tree enqueueing assertion-cleanup scripts. No user code is enqueued,
so (in principle) no exceptions can be signalled.

Once these `terminate-actor!`-enqueued scripts execute, a pending
patch exists that will remove all remaining endpoint assertions.

The remaining sticky point is the calls to `dataspace-unsubscribe!`.
Happily, these are idempotent because of the implementation in
`skeleton.rkt`.

Prior to this patch, terminating facets were removed early from their
parents' `facet-children` sets, meaning there was no way to find them
again to clean up if a failure occurred during a stop script.

Ideally, it'd be easy to see that the code is correct in this respect.
We're not there yet.
2018-04-25 20:43:25 +01:00
Tony Garnock-Jones 928e48113f Failing test: an exception in a stop script messes up cleanup 2018-04-25 20:13:54 +01:00
Tony Garnock-Jones ce6cd58930 Run stop-scripts in one scheduled execution 2018-04-25 19:54:58 +01:00
Tony Garnock-Jones dfe8a3e96e Be specific in for-loops 2018-04-25 19:47:18 +01:00
Tony Garnock-Jones c06d5ba3ce Guard against double-adhoc-assertion 2018-04-25 19:46:08 +01:00
Tony Garnock-Jones 9726376c82 Remove redundant `facet-live?` test 2018-04-25 19:40:53 +01:00
Tony Garnock-Jones bc9b931312 Omit "name" to ctor for dataspace struct - name is/will be a property of the downward relay connection 2018-04-25 19:30:45 +01:00
Tony Garnock-Jones e6d6f67021 during/spawn 2018-04-22 21:07:35 +01:00
Tony Garnock-Jones 1523ef17cf Correct typo 2018-04-22 21:06:18 +01:00
Tony Garnock-Jones efa7f517c4 Repair: it is incorrect to invoke retraction-handlers when retracting an interest 2018-04-22 21:04:22 +01:00
Tony Garnock-Jones f58c2fb8dc Repair error: stop-facet scripts must run in parent facet's context! 2018-04-22 21:03:21 +01:00
Tony Garnock-Jones a3dfb2c5aa Notice attempts to install more than one root facet in an actor 2018-04-22 21:03:01 +01:00
Tony Garnock-Jones 4be935a160 Introduce action-groups 2018-04-22 21:02:40 +01:00
Tony Garnock-Jones 634b114afc Improve debug-printing of facets 2018-04-22 21:00:35 +01:00
Tony Garnock-Jones b50d18cd46 Remove unused dataspace-actors field 2018-04-22 20:59:57 +01:00
Tony Garnock-Jones 55f4b55784 Implement during and ad-hoc assertions 2018-04-19 17:55:52 +01:00
Tony Garnock-Jones 5377a486c9 Better Isolated Turn Principle 2018-04-11 12:28:09 +01:00
Tony Garnock-Jones 533d6f9a24 Improve syntax location tracking 2018-04-09 10:29:14 +01:00
Tony Garnock-Jones 3452f1fe6e Script suspend and resume 2018-04-09 10:23:22 +01:00
Tony Garnock-Jones bd9dcb61ca Simple messages-per-second test (~195kHz at present) 2018-04-08 12:06:37 +01:00
Tony Garnock-Jones eb24d566e9 Progress on syntax veneer 2018-04-08 11:44:32 +01:00
Tony Garnock-Jones e84f2e2e39 Eliminate (interesting uses of) facet IDs by storing references directly 2018-04-08 08:52:37 +01:00
Tony Garnock-Jones fe6b895d8a More structured FID representation. 2018-04-08 07:58:17 +01:00
Tony Garnock-Jones 3c70496688 Steps toward API usable by syntax layer; beginning of syntax layer, adapted from previous implementation 2018-04-08 07:39:39 +01:00
Tony Garnock-Jones 7f65d9e452 Fine-tune skeleton-accumulator representations for persistency/reuse and for potential speed benefit 2018-04-08 07:01:39 +01:00
Tony Garnock-Jones c122add136 Correct typo 2018-04-07 08:42:38 +01:00
Tony Garnock-Jones 5d6e0f3904 printf to log-info; clean up demo output 2018-04-06 12:07:09 +01:00
Tony Garnock-Jones 4c4afc6b6e Eliminate a few useless parameters 2018-04-06 11:58:49 +01:00
Tony Garnock-Jones 2e67feee6d POC imperative dataspace implementation, with set-box example 2018-04-06 11:37:59 +01:00
Tony Garnock-Jones 25997cc778 Switch to skeleton-stx with struct-type rather than predicate 2018-03-27 22:21:49 +13:00
Tony Garnock-Jones 1d67cbe65e Rearrange 2018-03-27 22:21:49 +13:00
Tony Garnock-Jones 883fcb9b75 Start translation of pattern syntax to various structures 2018-03-27 22:21:49 +13:00
Tony Garnock-Jones 86930702e0 Initial sketch of new routing-table idea 2018-03-27 22:21:49 +13:00