Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 3.3 KB

README.md

File metadata and controls

68 lines (43 loc) · 3.3 KB

SoCaTelLogo

Recommender engine REST API Endpoints

This project contains the recommendation engine endpoints that expose recommendations when given a SoCaTel entity to other entities (groups, users, services, organisations).

Getting Started

Prerequisites

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

All tools and processes are meant to be deployed under a docker container. To get everything set up, you should:

  • Have docker installed in your machine. See this for a general guide on Linux machines (preferred OS for this project).

The docker container used will take care of installing node and all packages required to expose endpoints included here.

You will need to have the following setup, found in the SoCaTel group:

  • PredictionIO recommendation engine, to retrieve user to user recommendations.
  • GraphQL, for semantic repository queries, found here exposed through API calls in this repository.
  • Elasticsearch, for direct queries to the database. For help in setting this up and the necessary Elasticsearch indices , refer to this repository.
  • MongoDB, for accessing recommendation and semantic engine's stored outputs from periodical runs

NOTE This repository has been developed using Python 3.6

Configurations

Under the config.js file, change the Elasticsearch, GraphQL, PIO (PredictionIO) and MongoDB related fields, based on your current setup.

Basic authorisation is also supported, so you should change the following based on a unique set of username and password:

  • restapi_username
  • restapi_password

The default port used is 8192, if you need to change it, edit the restapi_port parameter.

Deployment

Retrieve the <mongodb_network_name> in the ./docker_build.sh from the second line of the following command's output (the MongoDB setup is done in the sentiment classification engine component setup): docker inspect <mongo_image_id> | grep -A 2 "Networks"

Then run ./docker_build.sh to deploy this on your Linux machine of choice. Access the GUI (built on Swagger) through: <host>:8192/api-docs/#/, where host is your Linux machine's IP address (the docker exposes the application on localhost).

Built With

  • Docker - The secure way to build and share this application, anywhere.
  • NodeJS - A powerful Javascript runtime where scalable network applications are built.
  • Swagger - Used for API documentation and exposure on its GUI tool

Contact

If you encounter any problems, please contact the following:

CyRIC | Cyprus Research and Innovation Centre

License

Apache-2.0

Acknowledgments