1.0.5 • Published 9 years ago

oryx-js v1.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

Oryx-JS

Basic module to communicate with Oryx.

Installation & configuration

Install Oryx

See the Oryx doc for installation, you can get releases here.

Install the module

npm install oryx-js

Run your Oryx server and computation instances

Create a file called oryx.conf with the following informations :

model=${als-model}
model.local-computation=false
model.local-data=false
model.instance-dir=/user/name/repo
model.features=25
model.lambda=0.065
serving-layer.api.port=8091
computation-layer.api.port=8092

And run the jars with the following lines :

java -Dconfig.file=oryx.conf -jar oryx-computation-x.y.z.jar
java -Dconfig.file=oryx.conf -jar oryx-serving-x.y.z.jar

Usage

var OryxService = require('oryx-js')({
    host: 'localhost',
    port: '8091',
    user: user,
    password: pwd
});

Functions

Core

ready

Parameters

  • func callback(err, res, body)

refresh

Parameters

ingest

Parameters

  • data
  • func callback(err, res, body)

getBecause

Parameters

  • int user_id
  • int item_id
  • int count
  • func callback(err, res, body)

getMostSurprising

Parameters

  • int count
  • func callback(err, res, body)

getPopularRepresentativeItems

Parameters

  • func callback(err, res, body)

getMostActiveUsers

Parameters

  • int count
  • int offset
  • func callback(err, res, body)

getMostPopularItems

Parameters

  • int count
  • int offset
  • func callback(err, res, body)

getAllUsers

Parameters

  • func callback(err, res, body)

getAllItems

Parameters

  • func callback(err, res, body)

getKnownItems

Parameters

  • int user_id
  • func callback(err, res, body)

Recommendation

get

Parameters

  • int user_id
  • int count
  • int offset
  • func callback(err, res, body)

getToMany

Parameters

  • int user_ids
  • int count
  • int offset
  • func callback(err, res, body)

getForAnonymous

Parameters

Similiraty

get

Parameters

  • int item_ids
  • int count
  • int offset
  • func callback(err, res, body)

getToItem

Parameters

  • int main_item_id
  • int item_ids
  • func callback(err, res, body)

Estimation

get

Parameters

  • int user_id
  • int item_ids
  • func callback(err, res, body)

getForAnonymous

Parameters

Parameters

Preferences

set

Parameters

delete

Parameters

DEVELOPMENT

Info

The code was developped and tested with Oryx 0.3.0, functions from Oryx 1.x were added but not tested for now.

TODO

Authentication

Handle authentication, none for now

Data format

Handle csv/ json parsing

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago