|
|
|
|
|
by cafxx
1778 days ago
|
|
That's one lovely trick. If I may suggest one thing... instead of range requests on a single huge file how about splitting the file in 1-page fragments in separate files and fetching them individually? This buys you caching (e.g. on CDNs) and compression (that you could also perform ahead of time), both things that are somewhat tricky with a single giant file and range requests. With the reduction in size you get from compression, you can also use larger pages almost for free, potentially further decreasing the number of roundtrips. There's also a bunch of other things that could be tried later, like using a custom dictionary for compressing the individual pages. |
|
Edgesearch does that though with Cloudflare Workers mediating searches: https://github.com/wilsonzlin/edgesearch
Uses roaring-bitmaps to index, but could also use Stavros' trick (bloom/cuckoo-filters) to further gate false-positives on-the-client: https://news.ycombinator.com/item?id=23473365