Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release candidate #1996

Merged
merged 491 commits into from
Dec 4, 2019
Merged

Release candidate #1996

merged 491 commits into from
Dec 4, 2019

Conversation

philipcmonk
Copy link
Contributor

@philipcmonk philipcmonk commented Nov 27, 2019

Fuller release notes will come later, but here's a release candidate for the next breach. This primarily includes the twin efforts of "static gall" and "new ames". Some highlights include:

  • Ames extends duct mechanics across network, so you can "pass" and "give" over the network.
  • Ames has framework for communicating backpressure. Currently, the rule is to cancel subscriptions if "not responding; still trying" and at least 5 messages in queue, but we may tune this as necessary.
  • Ames supports arbitrary-length negative acks (possible cause of OWC).
  • Ames protocol simplified
  • A new rune, !<, has been introduced. It takes a mold and a vase, dynamically checks the type in the vase matches the mold, and produces the value typed with that type. In other words, !<(some-type !>(`some-type`value)) is just value.
  • Gall apps made "static", which means they are just an instance of a particular type, namely agent:gall in sys/zuse.hoon.
  • Because they're a static type, all gall apps have exactly 10 arms to handle the different sorts of input they might receive. This is much more explicit.
  • Due to being a static type, it's much easier to create library functions that augment apps. For example, lib/verb is a function from agent to agent that wraps the agent with printfs describing every piece of input it receives. It can be turned on or off with :app +verb.
  • Bones have been removed from apps.
  • Gall is about 1000 lines shorter.
  • The concept of "threads" is introduced, replacing tapps/async. These are temporary processes that operate within what Haskell would call the IO monad with a process tree.
  • pH has been rewritten from an app to a library used by threads. Thus, each pH test is now an individual thread.

There is some preliminary documentation on agents, threads, and ph here:
agent.txt
thread.txt
ph-static.txt

Feel free to review a part at a time. "New Ames" changes primarily ames.hoon, with additional changes in clay, jael, and gall to support the new interface. Static gall has five main components: gall.hoon (+ap core rewritten), app/.hoon (apps converted to the new style), app/spider.hoon (thread manager, replacing tapps/async), ted/.hoon (threads, mostly converted from tapps), and ted/ph/*.hoon (new-style ph tests, which are just threads instead of a hand-rolled monad).

The only known issues are:

  • Comets aren't working correctly. @belisarius222 is working on this and expects to solve it soon.
  • @Fang- has reported that eth-watcher isn't working correctly as of today, but this hasn't been nailed down. It could be due to us upgrading our Ethereum nodes to be ready for Istanbul. Determined to be a timing issue; it used to be safe to reduce the time between jael updates.
  • Backpressure was working, but a recent change broke it. I believe it needs to add the trigger for checking for %dead when enqueueing a new message. I believe this works correctly.
  • If you leave a chat room for a while and come back, it doesn't give you all the backlog because it only resubscribes to the "new posts" path. It should retrieve all backlog since its last known post. @loganallenc is working on this.

+on-agent now takes a +sign:agent:mall, which doesn't include spurious
options.  Similarly, +task:agent:mall is smaller.
This removes the %http-response special case from gall.  In its place,
we implement a subscription regime with the following steps:

- Agent sends %connect to Eyre
- Eyre pokes agent with %handle-http-response, including unique eyre-id
- Agent passes %start-watching to Eyre with eyre-id and unique app-id
- Eyre subscribes to agent on /http-response/app-id
- Agent produces a %http-response-header fact followed by 0 or more
  %http-response-data facts and possibly a %http-response-cancel fact
- Agent produces a %kick to close the subscription, which Eyre
  interprets as completion of the message.

This works when there is data.  There is currently a bug where if the
response has no data in total (as in the case of a naked 404), no
response will be sent.

This also includes lib/http-handler, which implements a convenient
interface for agents that want to respond immediately with all the data.
This lets them avoid carrying extra state to keep track of pending
requests.

This should really have access to your state and the ability to change
it.  Perhaps a more minimalist design would be better: just keep track
of the requests, then hand it off to +on-watch when eyre is ready to
receive responses.  It's not clear how to pass in the request data in
+on-watch.
eyre: subscribe to apps for responses
Copy link
Member

@joemfb joemfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor cleanup requests:

u3_noun our; // identity
u3_noun fak; // c3y is fake
u3_noun our; // identity XX Remove
u3_noun fak; // c3y is fake XX Remove
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is going into a breach, these members can now be removed from this struct. (Doing so in a hotfix would break the memory image.)

@@ -1,3 +1,4 @@
!:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed, IMO

@philipcmonk
Copy link
Contributor Author

Both done

Copy link
Member

@joemfb joemfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Congrats to @philipcmonk and @belisarius222 on the new %ames and %gall implementations, and to everyone involved in this massive porting effort.

philipcmonk and others added 23 commits December 2, 2019 23:46
We were calling it directly, rather than through the (initialized) tc core,
causing the bowl in its context to be the *bowl, resulting in [~zod /] audience.
Creates a local reducer to mutate the state in one place.
Fixes an issue where chat updates would pop the sidebar open.
This fixes a quick typo that completely breaks the medium viewport
layout.
jtobin added a commit that referenced this pull request Dec 4, 2019
* rc: (451 commits)
  ping: delay kick until after ames processes breach
  aqua: make faster so moon-az can finish
  ping: fix comments
  ping: avoid fragile state transitions
  ames: don't say not responding if we haven't been talking
  eth-watcher; don't start timer if already started
  chat: hotfixing a class name
  chat: fix sidebar toggle on chat update
  dojo: set prompt on watch
  gen: add comments on new generators
  chat-cli: our-self with bowl set
  keys: add +keys for diagnostics
  verb: add +verb %bowl to print bowl on every event
  azimuth-tracker: add |kick
  clay: don't make |cancel require argument
  jael: allowed skipped rifts
  ames: make life printf helpful
  Revert "|ames-verb: fix generator sample type"
  |ames-verb: fix generator sample type
  gall: correctly construct wire for ap-specific-take
  ...

Signed-off-by: Jared Tobin <jared@tlon.io>
@jtobin jtobin merged commit ebec1eb into master Dec 4, 2019
@jtobin jtobin deleted the rc branch December 4, 2019 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants