Skip to content
YANG Fan edited this page Sep 12, 2016 · 3 revisions

Skeleton

The skeleton of a C++ Husky program is as follows,

#include "core/engine.hpp"

using namespace husky;

void job() {
    // work here ...
}

int main(int argc, char** argv) {
    init_with_args(argc, argv);
    run_job(wc);
    return 0;
}

A Simple Config

The following shows a very simple configuration file for single-machine setting.

master_host=localhost
master_port=10086
comm_port=12306

[worker]
info=localhost:4

It's in INI format. At the beginning it defines the master host, the port that the master should use (master_port) and the port that the workers should use (comm_port). In the end it says that run four Husky worker threads on the same machine.

A Simple Program

TODO

Clone this wiki locally