Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

Example Qlik Associative Engine session service used for session placement in the Qlik Core use case Assisted Prescription (also known as Custom Analytics)

License

Notifications You must be signed in to change notification settings

qlik-oss/core-qix-session-placement-service

Repository files navigation

core-qix-session-placement-service

As of 1 July 2020, Qlik Core is no longer available to new customers. No further maintenance will be done in this repository.

NOTE: This repository contains an example service for the Qlik Core Assisted Prescription use case.

Status

CircleCI

Overview

This service provides a session to a specific document ID or creates a session app. It uses Mira for discovering engines in an orchestration and based on strategy chooses a QIX Engine to open a session against.

How the service is used in the Qlik Core Assisted Prescription use case is further described here.

Environment Variables

The following environment variables can optionally be set:

Name Default value Description
LOG_LEVEL info Minimum log level that the service outputs when logging to stdout
MIRA_HOSTNAME mira Hostname that should be used for service discovery
PORT 9455 Port used by the service REST API
SESSION_STRATEGY leastload Strategy to use for session placement. Can be roundrobin or leastload or weighted

Session Placement Strategy

The QIX Session Service uses strategies for determining which QIX Engine to place a session on. There are currently three strategies implemented Least-Load and Round Robin and Weighted. The Least-Load strategy and what metrics that are taken into consideration is further described in the following whitepaper.

The default strategy used is Least-Load, but the strategy can also be toggled with the SESSION_STRATEGY environment variable.

Endpoints

The REST API is specified in the api-doc.yml OpenAPI document. Default port used by the service is 9455.

/session/session-doc

Creates a session app in an available QIX Engine and returns the session info.

/session/doc/:docId

Opens a session towards a specific document and returns the session info. Assumes that the document is already available to any QIX Engine in the orchestration.

Circle CI

Circle CI is configured to build a new Docker image from all pushed commits on all branches in this git repository. As part of this, the built Docker image is pushed to Docker Hub. If pushing to a feature branch (different from master), the Docker image is tagged with <version>-<build-number>, where <version> is fetched from package.json, and <build-number> is the automatically increased Circle CI build number given to each build. If pushing to master the image is also tagged with latest.

Linting of the code and some basic smoke testing is part of the job pipeline and must succeed for the docker image to be published.

Contributing

We welcome and encourage contributions! Please read Open Source at Qlik R&D for more info on how to get involved.

About

Example Qlik Associative Engine session service used for session placement in the Qlik Core use case Assisted Prescription (also known as Custom Analytics)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published