Skip to content

Architecture

Aatman Vaidya edited this page Aug 2, 2024 · 3 revisions

feluda-architecture


User Code is where you define application specific code that uses the primitives exposed by Feluda. The role of different modules is as follows

  1. Endpoint : All exposed features of the search server are to be defined here. This is where you define the API routes and their handlers. Endpoint refers to any functionality you want to expose via a REST API. Every endpoint needs to define a Controller, Handler and Model.
  2. app.py : This is where you initialize Feluda and the endpoints and link them.
  3. config.yml : This is the configuration file that sets up Feluda with the appropriate parameters.

Feluda Code is where the framework related code is defined. The role of different modules is as follows:

  1. Server : A standard flask server that is used to expose a REST API for the search engine.
  2. Config : Module that loads configuration from a provided .yml file and makes it accessible as a python dataclass for Feluda.
  3. Operators : These are modules that operate on media items that your search engine works with - text, image, video, audio etc. These act as plugin code that are only loaded if specified in the config.yml file.
  4. Store : Storage related modules (Elasticsearch, PostgreSQL).
  5. Queue : Since some index operations can take a lot of time, they aren't well suited for the request-response format of HTTP calls. In which case Feluda allows you to enqueue requests that get processed at a later time.

Note

The Server component and app.py are not in development and the code is outdated.

Clone this wiki locally