Jina 102: How basic components work together

In Jina 102, you’ll learn how Jina’s basic components work together. Before you start, make sure you’ve already read through Jina 101.

Search workflows

First, we’ll show you how a Flow works in Jina. Be aware, there are many different ways to build a Flow, and this is just one way.

Let’s use a simple text-to-text search application as an example — searching for sentences in a book. We use two Flows for this:

  • An indexing Flow makes the whole book searchable by sentence

  • A querying Flow handles a user query (in this case, a sentence) and returns search results

A working example can be found here. (Bear in mind that this example uses pre-processed sentences, so the segmenting step is skipped)

The indexing Flow prepares data to be searched. Input Documents are fed in, processed, and output at the other end as searchable indexes in storage:


../../_images/index_flow.png

Then, the querying Flow takes a user query as its input Document, and returns a list of ranked matches:


../../_images/query_flow.png

Inside a Flow

Here, we’ll use the indexing Flow as an example:


../../_images/flow_pods.png

In our Flow, different Pods perform different tasks. Documents (in this case a book) are:

  1. Input Documents segmented into chunks (sentences)

  2. Chunks transformed into vector embeddings

  3. Chunks indexed in key-value pairs and saved to storage

You can see an example of how Flow, Executors, and Documents work together in our Wikipedia sentence search example.

YAML Configuration

From Flows to Executors, every part of Jina is configurable with YAML files. YAML files let you change the behavior of an object without touching its code.

../../_images/yaml.png

Besides YAML, you can also design Flows in our Dashboard or Python code.

Search Modality

Our example above shows searching using a single type of data, but what about going further?

JinaD

JinaD (Jina Daemon) enables orchestration and management of Jina Flows in distributed search systems through an API endpoint.

Jina Suite

Jina Suite consists of several different open-source products - Core, Hub, Dashboard and Box.

What you’ve learned in the previous sections are the most important components in Core (Jina Core). But there’s more to explore.


../../_images/suite.png

Core

You construct and manage your search workflows in Core. It consists of distributed microservices (Flows, Peas, Pods, and Executors, etc.) Optionally, you can use JinaD to orchestrate these microservices.

Hub

Jina Hub is a centralized registry for the developer community. You can share and discover customized Jina Pods or Apps.

Dashboard

Jina Dashboard is a low-code monitoring and management environment for Jina. With Dashboard you can:

  • Build your Flows

  • Monitor log stream

  • Browse Hub images

Box

Jina Box is a frontend for Jina. It’s a lightweight, customizable omnibox. You can use it to search text, images, videos, audio or any kind of data.