Jina Executor Sandbox → Processing Data in the Cloud
Jina’s new Executor Sandbox lets you process your data with Hub Executors in the cloud without any dependencies!
What is an Executor?
An Executor in Jina is often a Docker image that contains some logic to process Documents. It is a self-contained component and performs a group of tasks on a DocumentArray. Executor lets you organize your code into modules and scale them as independent micro-services. For your convenience, we created Jina Hub → A Marketplace for Executors!
Jina Hub makes it very easy to containerize Executor and share it with your colleagues sitting in other parts of the world! For instance, let’s say Developer A creates an Executor and push it to the Hub. Then other developers B, C & D sitting in any part of the world can easily use it, pull, and build a new one on top of it.
Jina Hub lets you use pre-built Executors out-of-the-box with just one line of code to perform processing logic on your Documents. Let’s look at a simple example of how you can use an Executor from the Hub to process the Documents:
The above example uses two Hub Executors →
SimpleIndexer for encoding and indexing the documents. Both of the Executors are in the form of a Docker image that first needs to be downloaded and installed before you use them.
Docker images can be huge, and downloading then running them on your local machine can be annoying at times 😣
Jina Sandbox to the Rescue!
To eliminate the dependencies in using Executors from Jina Hub, we created the Executor Sandbox that provides a way to use Executors in a cloud environment with minimal to no latency. Jina’s Sandbox creates a remote connection between the Hub Executors and the local machine and provides you with the host and port to use that connection for processing the data.
Trying out different Executors for a new project using the conventional way can be time-consuming and a compute-intensive exercise. Sandbox lets you save all that time by spinning up these Executors on the cloud and let you use them with the simplicity of a remote connection. Let us understand from an illustration how the process differs when using the sandbox as compared to the conventional way of using Hub Executors:
Starting a Flow and using an Executor within Jina Sandbox is very similar to using an Executor via Docker image with a slight change in syntax 👇
jinahub+docker://Executor → jinahub+sandbox://Executor
Let’s look at a simple example to understand how to use an Executor within Jina’s Sandbox and process data in the cloud:
Output: hello world
Venture into the exciting world of Neural Search with Jina’s Learning Bootcamp. Get certified and be a part of Jina’s Hall of Fame! 🏆
Stay tuned for more exciting updates on the upcoming products and features from Jina AI! 👋