@@ -1,5 +1,5 @@
2−title = "Eyre Request Scry Cache"
2+title = "Eyre Request Cache"
3date = "2022-05-18"
3date = "2022-05-18"
5[taxonomies]
5[taxonomies]
@@ -8,14 +8,17 @@ grant_category = [ "Core Dev" ]
11−description = "Speed up Urbit http server by implementing a scry mechanism and cache for requests"
11+description = "Speed up Urbit http server by implementing a cache for requests"
12−reward = "10 stars"
12+reward = "5 stars"
13assignee = ""
13assignee = ""
14completed = false
16completed = false
15canceled = false
17canceled = false
16−link = ""
18+link = "https://airtable.com/shr4qt9t9kz7RaOIa?prefillGrant+ID=&prefillGrant+Name=Eyre%20Request%20Cache"
19## Rationale
22## Rationale
21Urbit is a personal server, but the webserving part of it is slow, which is a
24Urbit 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
34eliminate the need for a pattern we've frequently seen of people putting an
37eliminate the need for a pattern we've frequently seen of people putting an
35nginx or caddy cache in front of their Urbit to mask its shortcomings.
38nginx or caddy cache in front of their Urbit to mask its shortcomings.
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.
39−### Milestone 1: Eyre
45+## Implementation
41Eyre will store a map from URLs to clay scry paths. HTTP requests coming in to
47Eyre will store a map from URLs to clay scry paths. HTTP requests coming in to
42eyre will first check this map, and if it matches, scries the file out of clay
48eyre will first check this map, and if it matches, scries the file out of clay
43and returns it immediately. It if doesn't match, it just goes through the
49and returns it immediately. It if doesn't match, it just goes through the
44current normal path for HTTP requests.
50current normal path for HTTP requests.
46−This behavior will then be mirrored in the runtime, so that the behavior is the
47−same regardless of runtime behavior.
49New %tasks will be created for eyre to add and remove from this map.
52New %tasks will be created for eyre to add and remove from this map.
51A %warp request to clay is maintained for each clay file in the map in order to
54A %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
53give a %gift to the runtime.
56give a %gift to the runtime.
55reward: 5 stars
58reward: 5 stars
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.
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.
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.