[Miwi-middleware] KIARA: Version 0.9.0

Dmitri Rubinstein rubinstein at cs.uni-saarland.de
Mon Jan 6 12:32:40 CET 2014


Hi. I finished and pushed to ZHAW Gitorious Repos a new version of 
KIARA. This is a major feature release.

* New features:

1. First version of KIARA preprocessor tool.

The current version supports only C language. C++ support is not fully 
implemented yet.

By running kiara-preprocessor --help you can get a list of command line 
options.

Usage example:

On Linux:

cd kiara
LLVM_INCLUDE=$(llvm-config --libdir)/clang/$(llvm-config --version)/include
KIARA_INCLUDE=$(devenvGetModuleCPPPATH kiara)
BOOST_INCLUDE=$(devenvGetModuleCPPPATH boost)
kiara-preprocessor ./src/tests/aostest.c -o out.c -lang c -isystem 
/usr/include -isystem "$LLVM_INCLUDE" -I "$KIARA_INCLUDE" -I 
"$BOOST_INCLUDE"

You may need to fix include directives produced by the preprocessor. The 
resulting file out.c should then contain same macros as in 
src/tests/aostest_kiara_client.h.

In the similar way macros for server example are generated:

kiara-preprocessor ./src/tests/aostest_server.c -o out.c -lang c 
-isystem /usr/include -isystem "$LLVM_INCLUDE" -I "$KIARA_INCLUDE" -I 
"$BOOST_INCLUDE"

On Windows:

You need to find out path to the includes of your MSVC compiler.

For example my path is: c:\Program Files (x86)\Microsoft Visual Studio 
10.0\VC\include.

Command line in MSYS Git/Devenv environment:

MSVCINC=/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include
KIARA_INCLUDE=$(devenvGetModuleCPPPATH kiara)
BOOST_INCLUDE=$(devenvGetModuleCPPPATH boost)
cd kiara
kiara-preprocessor src/tests/aostest.c -o out.c -msvc -D _MSC_VER -lang 
c -isystem "$MSVCINC" -I "$KIARA_INCLUDE" -I "$BOOST_INCLUDE"

Same for server:

kiara-preprocessor src/tests/aostest_server.c -o out.c -msvc -D _MSC_VER 
-lang c -isystem "$MSVCINC" -I "$KIARA_INCLUDE" -I "$BOOST_INCLUDE"

KIARA preprocessor processes description of client-side functions and 
server-side services embedded in form of short macros in the application 
source code. See examples in

./src/tests/aostest.c
./src/tests/aostest_server.c

I will document preprocessor in more detail as soon as possible.

2. New trivial binary protocol (TBP) that can be used as a reference 
implementation for implementing binary protocols in KIARA.

It is located in src/KIARA/Components/TBP directory. JSONRPC 
implementation is moved to src/KIARA/Components/JSONRPC.

For adding new protocol just create new directory with source code and 
adjust src/SConscript file.

3. Support for multiple protocols loaded dynamically.

The protocol used by KIARA is not anymore hardcoded. The server 
specifies protocol when registering client with the call to:

kiaraAddService(server, path, protocol, service);

to the protocol string is added suffix "_kp.bc" (e.g. jsonrpc_kp.bc, 
tbp_kp.bc). This LLVM BC file is loaded at the runtime, and should 
contain protocol implementation supporting KIARA serialization API. (kp 
stands for Kiara Protocol).

As a part of negotiation process the client gets name of the used 
protocol and will load the same BC file.

Note: even if it is possible to select optimal protocol between multiple 
available (e.g. binary and text), I didn't implement it yet.

4. Added an alternative JIT-engine: MCJIT.

LLVM's MCJIT will replace in a future old JIT engine, so I just finished 
and merged an MCJIT implementation done by a student.

Currently MCJIT is not active by default. You can force it by either:

set environment variable KIARA_JIT_ENGINE to MCJIT:
export KIARA_JIT_ENGINE=MCJIT

or

modify/add following KIARA configuration file:

~/.kiara/main.cfg:

{
     "jit" : {
        "useLegacyJIT" : false
     }
}

5. Test suite, started with source devenv/tests.sh, now tests all 
combinations of JIT engines and KIARA protocols.

When adding new protocol please update devenv/test_examples.py

6. Added missing macro KIARA_CXX_STRUCT_ARRAY_MEMBER, this is also 
updated in the documentation.

There are no changes in installation instructions.

Best,

Dmitri



More information about the Miwi-middleware mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy