on master help sign in
split eyre scry bounty in half, include metadata
commitf208a069e4c89db3a5f26c0584ff2aae376aa7fd authorixv <isaac@tirrel.io> dateMon 13 Jun 2022, 16:08 (4 years ago) parent7e3ca02
1 file changed+12−24
content/grants/eyre-scry.md+12−24
content/grants/eyre-scry.md+12−24
@@ -1,5 +1,5 @@
11+++
2−title = "Eyre Request Scry Cache"
2+title = "Eyre Request Cache"
33date = "2022-05-18"
44
55[taxonomies]
@@ -8,14 +8,17 @@ grant_category = [ "Core Dev" ]
88
99[extra]
1010image = ""
11−description = "Speed up Urbit http server by implementing a scry mechanism and cache for requests"
12−reward = "10 stars"
11+description = "Speed up Urbit http server by implementing a cache for requests"
12+reward = "5 stars"
1313assignee = ""
14+champion = "~tirrel"
15+grant_id = "B0182"
1416completed = false
1517canceled = false
16−link = ""
18+link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefillGrant+ID=&prefillGrant+Name=Eyre%20Request%20Cache"
1719+++
1820
21+
1922## Rationale
2023
2124Urbit is a personal server, but the webserving part of it is slow, which is a
@@ -34,18 +37,18 @@ without worrying about making their Urbit slow and unusable. This would
3437eliminate the need for a pattern we've frequently seen of people putting an
3538nginx or caddy cache in front of their Urbit to mask its shortcomings.
3639
37−## Implementation
40+This is one part of a two-part bounty. This part focuses on the changes to the
41+the Eyre API on the Arvo side, and the second part focuses on changes to the
42+runtime. This part can be merged into the Urbit codebase before the runtime
43+work, but the desired speedup will not occur until both parts are in.
3844
39−### Milestone 1: Eyre
45+## Implementation
4046
4147Eyre will store a map from URLs to clay scry paths. HTTP requests coming in to
4248eyre will first check this map, and if it matches, scries the file out of clay
4349and returns it immediately. It if doesn't match, it just goes through the
4450current normal path for HTTP requests.
4551
46−This behavior will then be mirrored in the runtime, so that the behavior is the
47−same regardless of runtime behavior.
48−
4952New %tasks will be created for eyre to add and remove from this map.
5053
5154A %warp request to clay is maintained for each clay file in the map in order to
@@ -53,18 +56,3 @@ be notified about changes to them. When notified about said changes, Eyre will
5356give a %gift to the runtime.
5457
5558reward: 5 stars
56−
57−### Milestone 2: Vere
58−
59−The machinery to scry into arvo will need to be set up for use with Eyre, and a
60−simple cache will need to be configured for H2O.
61−
62−The cache will be filled/invalidated by the %gift pushed from Eyre, as specified
63−above. This gift contains a URL and the clay file correponding to it, which
64−allows the runtime to just put that in the cache directly.
65−
66−Inbound GET requests should first try the cache, and if that fails, just invoke
67−eyre in the usual way. Cache misses should add negligible time to HTTP requests,
68−and cache hits will be extremely fast.
69−
70−reward: 5 stars