Web Service

Grigori Fursin edited this page Aug 30, 2018 · 7 revisions

[ Home ]

One of the most important CK features is the possibility to easily exchange data and crowdsource experiments (for example, benchmark and optimize various workloads across mobile devices and HPC servers provided by volunteers) via CK web service with JSON API.

We use it to implement our community-driven crowd-benchmarking and crowd-tuning of software and hardware to speed it up, make it smaller, reduce power consumption, improve accuracy, etc:

Unified JSON API used in CK makes P2P data exchange simple and transparent. You just need to add a new CK repository, mark it remote, and provide hostname and port of the remote CK web service.

Let's consider that you've started CK web service on a machine with a hostname ck-server as follows:

 $ ck start web

You can add a repository on your machine associated with this CK web service as follows:

 $ ck add repo:my-remote-repo --remote --hostname=ck-server --port=3344 --quiet

You can now access remote CK repository as any other local CK repository while CK will transparently tunnel your requests to this server via JSON API.

For example, you can list all modules on a remote CK server as follows:

 $ ck list my-remote-repo:module:*

You can also browse repository (or implement your own dashboard for experiments) using any standard browser via http://ck-server:3344 .

If you use Apache2, Microsoft IIS or Nginx to pass requests to CK server via PHP (useful to implement authentication, for example) you need to provide a full URL, i.e.

 $ ck add repo:ck-remote-repo --remote --url=http://cknowledge.org/repo/ck.php? --quiet

Note, that default CK distribution already has one remote repository registered: remote-ck. It is connected with our public http://cknowledge.org/repo crowdtuning service and you can also use it for test:

 $ ck list remote-ck:module:*

Questions and comments

You are welcome to get in touch with the CK community if you have questions or comments!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.