shrub/pkg/hs/urbit-king/TODO.md

3.8 KiB

New IPC Protocol

Stubbed out:

  • Handle replacement events (stubbed out now b/c interface can't handle unparsed nouns)
  • Handle IPC errors by killing serf process.
  • Handle peek and pack in swimming flow.
  • Documentation for Urbit.Vere.Serf.IPC.
  • Unstub slog/stder/dead callbacks on serf config.
  • Remove GoodParse hack in newRunCompute.
  • Bring back tank printing.
  • Handle serf stderr message correctly.
  • Bring back logEvent.
  • Snapshots should block until that event is commited to disk.
  • Hook up error callbacks to IO Drivers.
  • Do something useful with error callbacks from IO Drivers.

Bugs:

  • In non-daemon mode, serf slogs/stderr output that happens before the terminal connects should still go to stderr.
  • Serf stderr should also be send (along with slogs) to all connected terminals.
  • king new should reject pier directories that already exist.
  • In non-daemon-mode, ^D doesn't bring down Urbit properly.
  • Spinner updated multiple times with the same event, and this causes logging of events to contain duplicates.

King-Haskell specific features:

  • Re-implement collectFX flow in Serf/Pier.
  • Hook up collectFX to CLI.
  • Get collect-all-fx flow working again.

Performance:

  • Batching during replay.
  • Batching during normal operation.

Optimization:

  • IO Driver Event Prioritization

Polish:

  • Cleanup batching flow.
  • Think through how to shutdown the serf on exception.
  • King should shutdown promptly on ^C. Always takes 2s in practice.
  • Bring back progress bars.
  • Make sure replay progress bars go to stderr.
  • Logging for new IPC flow.
  • Logging for boot sequence.
  • Take snapshots on clean shutdown.

Misc Bugs

  • king run --collect-fx flag does nothing. Remove or implement.
  • Handle ^C in connected terminals. It should interrupt current event (send SIGINT to serf, which will cause the current event to fail promptly).
  • The terminal driver seems to have a race condition when spinner changed too quickly.

Take Advantage of New IPC Features

  • Hook up scry to drivers.

    • Any immediate applications of this?
  • Allow scrys to go into the %work batching flow for better latency.

  • Handle event errors in other cases:

    • Ames packet failures should print (but not too often).
    • Incoming Http requests should produce 500 responses.
    • Terminal event errors should be printed in connected terminals.
    • Http client responses should be retried.

Further IO Driver Startup Flow Betterment

Implement Pier-wide process start events

  • Handle %vega and exit effects.
  • Handle %trim effect
  • Inject entropy event on pier start: ``[//arvo [%wack ENT]]`
  • Verbose flag: -v injects [%verb ~]
  • CLI event injection: -I file-path. The file-path is a jammed noun representing an event: [wire card].
    1. Just parse it as an Ev for now.
    2. Make the serf IPC code not care about the shape of events and effects.
    3. Support invalid events throughout the system (use Lenient?)

Polish

  • Goot logging output in non-verbose mode.
  • Command-Line flag to re-enable verbose output.

Cleanup

  • ShutdownSTM action that's passed to the terminal driver should live in KingEnv and should be available to all drivers.
  • Break most logic from Main.hs out into modules.
  • Simplify Main.hs flows.
  • Cleanup Terminal Driver code.
  • Spin off racquire into it's own package.
  • Spin off urbit-noun-core and urbit-noun packages.
  • Spin off urbit-eventlog-lmdb into it's own package.
  • Spin off Urbit.Vere.Serf into it's own package
    • Make it care less about the shape of events and effects.
  • Spin off per-pier logic into it's own package.
    • Probably urbit-pier