Using Java SDK

Guide to start using Konduit-Serving with Java SDK

This quickstart article will show you to begin your project in the Java environment. Konduit-Serving provides Java SDK, a developer tool that enable you to write the code with more ease, effectiveness and efficiency. Let's start building and installing Konduit-Serving from the source and take a look to demonstrate the examples of Konduit-Serving in Java.

Prerequisites

You will need following prerequisites to follow along

Installation from Sources

The following section explains how to clone and build Konduit-Serving from sources. To build from source, follow the guide below:

Building from source

Once you've installed the Konduit-Serving to your local maven repository, you can now include it in your build tool's dependencies. Follow the instructions below for an example of Konduit-Serving with Java SDK.

Java SDK

Let's look at the examples how to use Konduit-Serving in Java

Cloning Examlpe Repository

Let's clone the konduit-serving-examples repository:

You'll see the following files in konduit-serving-examples:

You'll need to open the "java" file in IntelliJ as a project, and you'll find two examples under the ./src/main/java subfolder. Let's look at the examples of Konduit-Serving to create a configuration and deploy a server.

Example

Let’s start by defining the inference configuration and sequence pipeline that define the configuration of the server:

The inference configuration should have a pipeline to deploy the server, include pipeline with:

You'll see the printed server configuration as a YAML:

Let's deploy the server by using DeplotKonduitServing.deploy() includes created inference configuration with the pipeline into the deployment:

The handler expression is a callback after a successful or failed server deployment which can be implemented inside the handler block, as shown:

Congratulation! You've deployed Konduit-Serving using Java SDK.

Last updated

Was this helpful?