Java binding for libxs -- Crossroads IO
OTHER License
Java binding for libxs
-- the Crossroads IO library.
This package contains two Java bindings for libxs
, the Crossroads IO library:
libxs
.You will need the following:
A copy of the JDK. The binding has been tested on v1.6.0_30
running on a Windows 7 machine.
A copy of ant. I use v1.8.4
.
When using JNI (the supported option), a C compiler. I use MSVC 2010.
When using JNI (the supported option), a copy of cpptasks
, an
ant
helper that automates compilation of C code. I use v1.0b5
.
You can run at with ant -lib lib/ant/cpptasks-1.0b5.jar jar
to use
the included cpptasks
Look at the build.<OS>.properties
file for your OS. Pay
particular attention to the value of: dir.jni.headers
Once your environment is set up and you have downloaded jxs
, you can
do any of these:
ant jar
-- create all JAR
s.ant test
-- run all unit tests (none for now).ant run
-- run a specific class in one of the JAR
s.ant perf
-- run performance tests.It can be helpful to run the build using ant -v
to debug compilation issues.
ant -v -lib lib/ant/cpptasks-1.0b5.jar jar
ant -Dcn=io.crossroads.jni.Tester run
You may need to specify the path to the libxs.(dll,dylib,so).
DYLD_LIBRARY_PATH=../libxs/lib ant -Dcn=io.crossroads.jni.Tester run
LD_LIBRARY_PATH=../libxs/lib ant -Dcn=io.crossroads.jni.Tester run
ant -Dcn=io.crossroads.jni.local_lat -Dargs="tcp://127.0.0.1:5556 1 100000" perf
ant -Dcn=io.crossroads.jni.remote_lat -Dargs="tcp://127.0.0.1:5556 1 100000" perf
Similarly, for the throughput test:
ant -Dcn=io.crossroads.jni.local_thr -Dargs="tcp://127.0.0.1:5556 1 100000" perf
ant -Dcn=io.crossroads.jni.remote_thr -Dargs="tcp://127.0.0.1:5556 1 100000" perf
Finally, for the inproc
-based latency and throughput tests (these do
not require two command prompts):
ant -Dcn=io.crossroads.jni.inproc_lat -Dargs="1 100000" perf
ant -Dcn=io.crossroads.jni.inproc_thr -Dargs="1 100000" perf
The XS library is about 90% supported now. Still missing are:
xs_setctxopt()
).xs_setsockopt()
,xs_getsockopt()
).This project is released under the LGPL license, as is the native libxs library. See LICENSE for more details as well as the Crossroads I/O Licensing page.