Design overview

Now that we have briefly described the application we want to build and the reason for building it, let's look at the list of features we want to implement as part of the search engine:

  • It should accept links to documents provided in the POST request and download them
  • It should process and index the downloaded documents
  • It should handle search queries and respond with a list of documents with snippets containing the search terms
  • The returned list of documents should be in the order of greater occurrence of search terms in the document

Though we listed four functionalities, we can club the application into two main components:

  • Goophr Concierge: This is the component responsible for indexing and returning the list of documents for search queries
  • Goophr Librarian: This is the component responsible for handling user interaction and interacting with the first component

The two components will run as two REST servers and all interactions will follow the REST protocol. So let's define API definitions for our components! In Chapter 4, The RESTful Web, you noticed that the approach we used to define various API endpoints and data definition for communicating via REST protocol was pretty verbose and cumbersome. Wouldn't it be better if we had a formal way to write API definitions? The good news is that with the prevalence of REST protocol, there are many solutions, and one of these solutions is the most widely used industry standard—OpenAPI format.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset