Serving Chronon Data

Serving Chronon Data#

The main way to serve production Chronon data online is with the Java or Scala Fetcher Libraries. To use these integrations, you simply need to import the fetcher and embed it within your service or application.

The main online Java Fetcher libraries can be found here:

  1. JavaFetcher

  2. JavaRequest

  3. JavaResponse

And their scala counterparts:

  1. Fetcher

  2. Request

  3. Response

Example Implementation

import ai.chronon.online.JavaFetcher;
import ai.chronon.online.JavaRequest;
import ai.chronon.online.JavaResponse;
import your.internal.implementation.of.Api as InternalAPIImpl;

// initialize the Chronon fetcher only once per process.
JavaFetcher ChrononJavaFetcher = InternalAPIImpl.buildJavaFetcher();

// In your request handler
ChrononJavaFetcher.fetchJoin(requests);

For details on how to write your internal implementation of the online API, see the Online Integration documentation. This should only be implemented once for your organization, then online serving use cases can use the above API.