项目作者: X5GON

项目描述 :
Cross modal, cross cultural, cross lingual, cross domain, and cross site global OER network
高级语言: JavaScript
项目地址: git://github.com/X5GON/platform-api.git
创建时间: 2018-02-06T08:55:20Z
项目社区:https://github.com/X5GON/platform-api

开源协议:BSD 2-Clause "Simplified" License

下载


X5GON Platform API

Node
Node.js CI
Linux Build
OSX Build
License

The X5GON project stands for easily implemented freely available innovative technology elements that
will converge currently scattered Open Educational Resources (OER) available in various modalities
across Europe and the globe.

preprocessing pipeline

This project contains the code base used to setup the main component that connects different services
together. The project contains various services:

  • Platform API. Contains the Platform API and redirections to other microservices.
    The code is found in the platform folder. In addition, the platform service
    also serves the frontend, which can be found in ./platform/frontend folder. The frontend is
    a submodule whose code base is found here.

  • Recommender Engine. Contains the code for providing recommendations. The code is found
    in the recsys folder.

  • Search API. The Search API is included as a submodule. The code will be stored in the
    search folder, but The whole documentation and code of the service is found
    here.

A component that is not included within this repository is the
X5GON Processing Pipelines. The code
is separated so that the data processing part can be done on another machine. The communication between
the Platform and Processing Pipelines is done through the Apache Kafka, which is part of the
Processing Pipeline code base.

Prerequisites

  • A running Elasticsearch service (one can download and install it from here
    or use a docker image). NOTE: Required for the Search API
  • PostgreSQL version 10 or greater
  • NodeJS version 10 or greater

    To test that your nodejs version is correct, run node --version in the command line.

Installation

  • Have a running PostgreSQL database and Elasticsearch service

  • Make a clone of this repository

    1. git clone https://github.com/X5GON/platform-api.git
    2. # navigate into the project
    3. cd platform-api
  • Recursively download all submodules (i.e. the search and frontend).

    1. git submodule update --init
  • Create an .env file in the /env folder (see instructions).

  • Install the nodejs dependencies and prepare submodule dependencies:

    1. npm run build
  • Configure submodule dependencies:

  • Create the x5gon database where all of the data is going to be stored:

    1. # switch to the postgres user and create the 'x5gon' database
    2. sudo su postgres && createdb x5gon && exit
    3. # create the tables in the database
    4. npm run postgres:create
  • Create the recommendation models:

    1. npm run recsys:create

Running the Services

The easiest way to run the services is with PM2. This will run them
in the background, will automatically restart if the services crash and is fully configurable through the
./ecosystem.config.services.yml file.

To install PM2 one must run

  1. # global install PM2
  2. npm install -g pm2

To run the service using PM2 one must simply run the following command:

  1. pm2 start ecosystem.config.services.yml --env production

This will also run the pipelines in the background. To control the pm2 services please see
their documentation.