Hacker News new | ask | show | jobs
by circular_logic 2979 days ago
I think you can get around these problems:

Algola has something they call a DSN that runs your search backed all over the word. So you have good latency's. [https://www.algolia.com/infra]

Additionally you could bundle only what you use in there library to make the page lighter.

1 comments

But by the looks of it, the search backend isn’t being run all over the world, else latency would be decent.

The vast majority of the JavaScript is superfluous third-party libraries like AngularJS. The actual app is under 2,000 lines of code. I do not expect it would be difficult to cut the frameworks out of it at all, for a lighter and faster experience that only weighed a few kilobytes.

Their search backend is, in my experience, significantly faster than you'd expect of latencies through a typical app backend - request-to-render in 10s of millis or less. They run their search indices directly inside an nginx module, it's an interesting architecture to read up on.

The JS they kick you off with is a pretty decent way to make a thorough, not-trivial search experience, you can get much more than a list of results (faceting and such builtin)

(https://community.algolia.com/instantsearch.js/)

The all-over-the-world bit is an optional part of paid plans, it's quite possible HN isn't using the global DSN