This chapter covers
- Adapting abstract algorithms to the complexity of real systems
- Designing a solution for the “closest hub” problem using NN search
- Adding filtering to NN search to support business logic and dynamic supply
- Dealing with faulty networks and failure, and deploying to the real world
- Applying NN search to other domains, such as physics and computer graphics
It’s time to harvest what we’ve sown and to start solving the problems we have discussed in the last few chapters. As always, after a deep dive into theory, we try to give you a “real-life” angle, and in this chapter, we will incrementally build a solution for the “closest hub” problem, one that takes into account many of the issues a real application would face. But make no mistake—we can’t tackle all the possible issues here, and this chapter doesn’t aim to be an exhaustive description of all the possible problems you could face; neither it is a runbook about how to operate your e-commerce application. Only practice, rolling up your sleeves, and getting burned while trying can teach you that. What you can find in this chapter, besides a few examples of real-world technical challenges, is a hands-on example of the analysis process that brings you from a solution “on paper” for your use case, to a working application coping with the complex facets of reality.