Commit f41719b
Adam Mitchell
Add prefilling of various response methods (#27)
## What is the goal of this PR?
Currently, the protocol only returns IDs for every answer. However, it is very rare to only require the ID for a concept e.g. for an attribute you are most likely interested in its value. The goal of this PR is to mitigate the case where hundreds of concept IDs are returned for Attributes from a query, and the client program is going to do a sync RPC to get the value of each.
## What are the changes implemented in this PR?
By taking a selection of example queries run against protocol, we can determine that there are some common requests that are always bounded (if the returned result is a concept, pre-filling it wouldn't lead to recursion). In the case that the returned concept would cause this kind of explosion, or for some reason the results can't be pre-fetched, the `isPrefilled` field notifies a client that this concept wasn't pre-filled (as opposed to just missing various pre-filled parts). Currently there is no way to explicitly enable pre-filling.
This is a static and simple variation on the "time travelling RPC" concept, where we are returning the results of another RPC call on the result of a first (see Cap'n Proto), although we are a long way from achieving this as a general pattern right now.1 parent 9dacbd3 commit f41719b
2 files changed
+29
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 118 | | |
129 | 119 | | |
130 | 120 | | |
| |||
137 | 127 | | |
138 | 128 | | |
139 | 129 | | |
140 | | - | |
141 | 130 | | |
142 | 131 | | |
143 | 132 | | |
| |||
151 | 140 | | |
152 | 141 | | |
153 | 142 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 143 | | |
159 | 144 | | |
160 | 145 | | |
161 | 146 | | |
162 | | - | |
163 | | - | |
164 | 147 | | |
165 | 148 | | |
166 | 149 | | |
167 | 150 | | |
168 | 151 | | |
169 | | - | |
170 | 152 | | |
171 | 153 | | |
172 | 154 | | |
| |||
213 | 195 | | |
214 | 196 | | |
215 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
216 | 206 | | |
217 | 207 | | |
218 | 208 | | |
| |||
276 | 266 | | |
277 | 267 | | |
278 | 268 | | |
279 | | - | |
280 | 269 | | |
281 | 270 | | |
282 | 271 | | |
| |||
286 | 275 | | |
287 | 276 | | |
288 | 277 | | |
289 | | - | |
290 | 278 | | |
291 | 279 | | |
292 | 280 | | |
| |||
328 | 316 | | |
329 | 317 | | |
330 | 318 | | |
331 | | - | |
332 | 319 | | |
333 | 320 | | |
334 | 321 | | |
| |||
338 | 325 | | |
339 | 326 | | |
340 | 327 | | |
341 | | - | |
342 | 328 | | |
343 | 329 | | |
344 | 330 | | |
| |||
368 | 354 | | |
369 | 355 | | |
370 | 356 | | |
371 | | - | |
372 | 357 | | |
373 | 358 | | |
374 | 359 | | |
| |||
378 | 363 | | |
379 | 364 | | |
380 | 365 | | |
381 | | - | |
382 | 366 | | |
383 | 367 | | |
384 | 368 | | |
| |||
388 | 372 | | |
389 | 373 | | |
390 | 374 | | |
391 | | - | |
392 | 375 | | |
393 | 376 | | |
394 | 377 | | |
| |||
398 | 381 | | |
399 | 382 | | |
400 | 383 | | |
401 | | - | |
402 | 384 | | |
403 | 385 | | |
404 | 386 | | |
| |||
476 | 458 | | |
477 | 459 | | |
478 | 460 | | |
479 | | - | |
480 | 461 | | |
481 | 462 | | |
482 | 463 | | |
| |||
583 | 564 | | |
584 | 565 | | |
585 | 566 | | |
586 | | - | |
587 | 567 | | |
588 | 568 | | |
589 | 569 | | |
| |||
595 | 575 | | |
596 | 576 | | |
597 | 577 | | |
598 | | - | |
599 | 578 | | |
600 | 579 | | |
601 | 580 | | |
| |||
607 | 586 | | |
608 | 587 | | |
609 | 588 | | |
610 | | - | |
611 | 589 | | |
612 | 590 | | |
613 | 591 | | |
| |||
617 | 595 | | |
618 | 596 | | |
619 | 597 | | |
620 | | - | |
621 | 598 | | |
622 | 599 | | |
623 | 600 | | |
| |||
649 | 626 | | |
650 | 627 | | |
651 | 628 | | |
652 | | - | |
653 | 629 | | |
654 | 630 | | |
655 | 631 | | |
| |||
662 | 638 | | |
663 | 639 | | |
664 | 640 | | |
665 | | - | |
666 | 641 | | |
667 | 642 | | |
668 | 643 | | |
| |||
700 | 675 | | |
701 | 676 | | |
702 | 677 | | |
703 | | - | |
704 | 678 | | |
705 | 679 | | |
706 | 680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
| |||
98 | 96 | | |
99 | 97 | | |
100 | 98 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 99 | | |
106 | 100 | | |
107 | 101 | | |
| 102 | + | |
| 103 | + | |
108 | 104 | | |
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
115 | 127 | | |
116 | 128 | | |
117 | 129 | | |
| |||
124 | 136 | | |
125 | 137 | | |
126 | 138 | | |
127 | | - | |
128 | 139 | | |
129 | 140 | | |
130 | 141 | | |
| |||
138 | 149 | | |
139 | 150 | | |
140 | 151 | | |
| 152 | + | |
| 153 | + | |
141 | 154 | | |
142 | 155 | | |
143 | | - | |
144 | 156 | | |
145 | 157 | | |
146 | 158 | | |
| |||
181 | 193 | | |
182 | 194 | | |
183 | 195 | | |
184 | | - | |
185 | 196 | | |
186 | 197 | | |
187 | 198 | | |
| |||
0 commit comments