2020-06-03 03:28:31 +03:00
|
|
|
# New IPC Protocol
|
2020-06-02 23:48:07 +03:00
|
|
|
|
2020-05-28 01:57:34 +03:00
|
|
|
Stubbed out:
|
|
|
|
|
|
|
|
- [x] Handle replacement events (stubbed out now b/c interface can't
|
2020-06-02 23:48:07 +03:00
|
|
|
handle unparsed nouns)
|
2020-05-28 03:08:53 +03:00
|
|
|
- [x] Handle IPC errors by killing serf process.
|
2020-06-01 01:37:27 +03:00
|
|
|
- [x] Handle `peek` and `pack` in `swimming` flow.
|
2020-06-01 20:51:37 +03:00
|
|
|
- [x] Documentation for `Urbit.Vere.Serf.IPC`.
|
2020-05-28 21:56:51 +03:00
|
|
|
- [x] Unstub slog/stder/dead callbacks on serf config.
|
2020-06-01 01:04:56 +03:00
|
|
|
- [x] Remove GoodParse hack in newRunCompute.
|
2020-06-02 00:31:24 +03:00
|
|
|
- [x] Bring back tank printing.
|
2020-06-01 01:37:27 +03:00
|
|
|
- [x] Handle serf stderr message correctly.
|
2020-06-02 00:31:24 +03:00
|
|
|
- [x] Bring back `logEvent`.
|
2020-06-03 02:03:04 +03:00
|
|
|
- [x] Snapshots should block until that event is commited to disk.
|
|
|
|
- [x] Hook up error callbacks to IO Drivers.
|
|
|
|
- [x] Do something useful with error callbacks from IO Drivers.
|
2020-06-05 02:49:56 +03:00
|
|
|
- [ ] Make sure replay progress bars go to stderr.
|
2020-05-28 01:57:34 +03:00
|
|
|
|
2020-06-05 19:19:08 +03:00
|
|
|
Bugs:
|
|
|
|
|
|
|
|
- [ ] In non-daemon-mode, ^D doesn't bring down Urbit properly.
|
|
|
|
|
2020-05-28 01:57:34 +03:00
|
|
|
King-Haskell specific features:
|
|
|
|
|
2020-06-02 23:48:07 +03:00
|
|
|
- [x] Re-implement `collectFX` flow in Serf/Pier.
|
2020-06-03 03:28:31 +03:00
|
|
|
- [x] Hook up `collectFX` to CLI.
|
2020-06-05 02:49:56 +03:00
|
|
|
- [ ] Get `collect-all-fx` flow working again.
|
2020-05-28 01:57:34 +03:00
|
|
|
|
|
|
|
Performance:
|
|
|
|
|
2020-05-29 05:14:25 +03:00
|
|
|
- [x] Batching during replay.
|
|
|
|
- [x] Batching during normal operation.
|
2020-05-28 01:57:34 +03:00
|
|
|
|
|
|
|
Polish:
|
|
|
|
|
2020-05-29 23:10:17 +03:00
|
|
|
- [x] Cleanup batching flow.
|
2020-06-02 00:31:24 +03:00
|
|
|
- [x] Think through how to shutdown the serf on exception.
|
2020-06-05 00:10:33 +03:00
|
|
|
- [x] King should shutdown promptly on ^C. Always takes 2s in practice.
|
2020-05-28 01:57:34 +03:00
|
|
|
- [ ] Logging for new IPC flow.
|
|
|
|
- [ ] Logging for boot sequence.
|
|
|
|
- [ ] Bring back progress bars.
|
2020-05-29 05:14:25 +03:00
|
|
|
|
2020-06-02 23:48:07 +03:00
|
|
|
# Misc Bugs
|
2020-05-29 05:14:25 +03:00
|
|
|
|
2020-06-03 03:28:31 +03:00
|
|
|
- [ ] `king run --collect-fx` flag does nothing. Remove or implement.
|
2020-06-03 02:03:04 +03:00
|
|
|
- [ ] Handle ^C in connected terminals. It should interrupt current
|
|
|
|
event (send SIGINT to serf, which will cause the current event to
|
|
|
|
fail promptly).
|
2020-06-02 23:48:07 +03:00
|
|
|
- [ ] The terminal driver seems to have a race condition when spinner
|
|
|
|
changed too quickly.
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
|
2020-06-03 02:03:04 +03:00
|
|
|
- [ ] ShutdownSTM action that's passed to the terminal driver should
|
|
|
|
live in `PierEnv` and should be available to all drivers.
|
2020-06-02 23:48:07 +03:00
|
|
|
- [ ] Break most logic from `Main.hs` out into modules.
|
|
|
|
- [ ] Simplify `Main.hs` flows.
|
|
|
|
- [ ] Cleanup Terminal Driver code.
|
|
|
|
- [ ] Spin off `Urbit.Noun` into it's own package.
|
2020-06-03 02:03:04 +03:00
|
|
|
|
|
|
|
# Event Prioritization
|
|
|
|
|
|
|
|
- Instead of each IO driver being passed a TQueue EvErr, each IO driver
|
|
|
|
produces a (STM (Maybe RunReq)).
|
|
|
|
|
|
|
|
- Each driver has it's own event queue that feeds this action.
|
|
|
|
|
|
|
|
- Pier has a thread that pulls from these actions with prioritization.
|
|
|
|
|
|
|
|
- Priority:
|
|
|
|
- If any terminal events are available, send it.
|
|
|
|
- If serf queue is full, abort transaction and retry.
|
|
|
|
- If no terminal events are available, do the same thing with sync driver.
|
|
|
|
- Next, same thing for behn.
|
|
|
|
- Next, same thing for iris.
|
|
|
|
- Next, same thing for ames.
|
|
|
|
- Next, same thing for eyre.
|
|
|
|
|
2020-06-05 19:19:08 +03:00
|
|
|
|
2020-06-03 02:03:04 +03:00
|
|
|
# Better IO Driver Startup Flow Separation
|
|
|
|
|
|
|
|
Should have a io-driver-boot stage.
|
|
|
|
|
|
|
|
- IO drivers do their boot flows.
|
|
|
|
- When they're done, they signal that they're running.
|
|
|
|
- No semantically important communication without outside world can
|
|
|
|
happen until all drivers are up.
|
2020-06-05 19:19:08 +03:00
|
|
|
|
|
|
|
Something like:
|
|
|
|
|
|
|
|
```
|
|
|
|
data DriverConfig = DriverConfig
|
|
|
|
{ onAllDriversUp :: STM ()
|
|
|
|
}
|
|
|
|
|
|
|
|
data DriverApi = DriverApi
|
|
|
|
{ eventQueue :: STM (Maybe RunReq)
|
|
|
|
, effectSink :: Effect -> STM ()
|
|
|
|
, blockUntilUp :: STM ()
|
|
|
|
, killDriver :: STM ()
|
|
|
|
}
|
|
|
|
|
|
|
|
type Driver = DriverConfig -> RIO e DriverApi
|
|
|
|
```
|