Duda I/O


The tool provide several options that can be grouped in three categories:

  • Prepare the Development Environment
    • Stack Build Options
    • Profiling and Trace
    • HTTP Server Options
  • Others

Prepare the Development Environment

Stack Build Options

Option Description
-V Set the API level (default: 1)
-s Get stack sources from GIT using HTTPS protocol
-g Get stack sources from GIT using Git protocol
-F Force mode, rebuild the Stage area
-r Reset the stack environment.

Before to set the Development Environment, is required to know which API Level or DST branch is going to be used, by default DudaC will offer the most stable level. For more details about the levels available please refer to the Versions section.

The next step is to download the Stack Components. When preparing a Development Environment, the tool requires to download a fresh copy of each component, this can be done using the -s or -g options. Both of them will retrieve sources from our Github repositories using either HTTPS or GIT protocols.

The following is an example to get the stack downloaded and build:

$ dudac -s
Duda Client Manager - v0.23

[+] Monkey: cloning source code                  [OK]
[+] Duda: cloning source code                    [OK]
[+] GIT Monkey  : switch HEAD to 'dst-1'         [OK]
[+] GIT Duda    : switch HEAD to 'dst-1'         [OK]
[+] GIT Monkey  : archive                        [OK]
[+] GIT Duda    : archive                        [OK]
[+] Monkey      : prepare build                  [OK]
[+] Monkey      : building                       [OK]

The output describe what was done on each phase, if you look carefully you will realize that everything was obtained from GIT repositories, the level was changed to DST-1 and then it was compiled.

If for some reason you want to remove the Stack just downloaded and built, you can use the -r option which will reset the Development Environment. It will delete the whole content of the path ~/.dudac/.

Profiling and Trace Options

Duda I/O stack provides some extra options for debugging and profiling to be used on build time, those options can be used directly from DudaC, here is a summary of the modes available:

Option Description
-A Use libc memory allocator instead of Jemalloc (disabled)
-X Enable Jemalloc statistics (disabled)
-J Enable Jemalloc profiling and leaks detection (disabled)
-T Enable Linux Trace Toolkit (disabled)

By default, for performance and scalability reasons, the stack uses the Jemalloc memory allocator, which is distributed as part of the sources of the stack. The -A option instruct DudaC to do not use Jemalloc and just link to the standard system memory allocator: libc.

Jemalloc provide several options that are useful for developing and troubleshooting process. When enabling the -X option, the library will compile with the statistics mode enabled. More details about this feature on the Jemalloc Wiki Page. Another option available is to enable profileing and leak detection, this can be enabled with the -J option and it usage is described here.

As described in the Stack Components section, Monkey HTTP Server is a fundamental part of the stack and it natively supports Linux Trace Toolkit (LTTng). When enabling this feature is possible to trace several core statuses that are very useful when troubleshooting stack internals. For more details about it please refer to the Monkey Debugging documentation site.

HTTP Server Options

On build time, there are a few options for the HTTP Server:

Option Description
-p Set TCP port (default 2001)
-S Web Service will run with SSL mode enabled

By default, the stack uses the TCP port 2001, this can be changed with the -p option on build time. Also if desired to use SSL for secure communication over your services, specifying the -S option will take care to build the SSL support and configure the service with some self-generated certificates. Those certificates can be changed later in the configuration.

Other Options

These options are not part of the setup process but are common enough to understand what are they for:

Option Description
-h Print help of DudaC
-v Print DudaC version