Giter Site home page Giter Site logo

atolab / zhe Goto Github PK

View Code? Open in Web Editor NEW
49.0 14.0 11.0 1.39 MB

Lighter-than-air, peer-to-peer, bounded, non-blocking, non-threaded, etc., publish-subscribe networking

License: Apache License 2.0

C 63.32% C++ 18.96% Perl 0.85% Makefile 0.33% TeX 12.34% CMake 0.64% Haskell 3.58%
ble low-latency low-power c embedded ros2 dds

zhe's Introduction

This is the old proof-of-concept for Zenoh. It still offers some interesting tricks, but it doesn't even come close to giving you all you get with the new Zenoh. Chances are you're looking for https://github.com/eclipse-zenoh/zenoh-pico. But if perchance you are looking for a proof-of-concept of a peer-to-peer publish-subscribe system without any call to malloc or free, then do read on.

Zeno-He (zhe for short) is a compact implementation of the Zenoh protocol that does not depend on dynamic allocation or threading. Instead, it is a non-blocking implementation that assumes single threaded use with polling, and a system that can be sized at compile time. Zhe can be configured to operate in peer-to-peer mode or to operate as a client that relies on a broker.

Targeted configurations vary from a minimal client on an Arduino Uno (an 8-bit CPU with only 2kB of RAM) to a bunch of low-power, high-integrity CPUs running a real-time, distributed control system, and on to dozens of peers running on high-end CPUs and saturating a fast network. Whether it will actually meet all these requirements remains to be seen. Still, so far, so good.

Zhe does not call any operating system functions directly (its use of the standard library is currently limited to mem*, strlen and isalnum). It does rely on a small abstraction layer for sending a message without blocking (it may of course be dropped), comparing addresses and converting an address to text. What constitutes sending data on a network or what an address looks like is deliberately left undefined.

Please note that it is currently a research project under active development. Only the basic functionality supported by the Zenoh protocol has so far been implemented, and still missing are several features we consider important, such as selections and transient data support. These will be implemented in the near future. Furthermore, none of the settings are final, and everything can (and probably will) still change.

zhe's People

Contributors

eboasson avatar grassjelly avatar kydos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zhe's Issues

License missing?

In your post to ROS Discourse you state that this code is under Apache 2:

I wanted to let you know that we have just released under Apache 2 a peer-to-peer implementation of our zenoh protocol called Zeno-He (Zenoh Helium).

Right now however this repository does not contain any LICENSE file, nor do any of the files have license headers.

Unable to build

Hi,
When trying to build I'm getting all sorts of errors that mostly stem from std=c99 (instead of gnu99), it seems:

./example/roundtrip/roundtrip.c: In function ‘main’:
./example/roundtrip/roundtrip.c:130:5: warning: implicit declaration of function ‘srandom’; did you mean ‘srand’? [-Wimplicit-function-declaration]
     srandom(time(NULL) + getpid());
     ^~~~~~~
     srand
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./example/platform/zhe-util.c -o gen/zhe-util.o
./example/platform/zhe-util.c: In function ‘init_rnd_gen’:
./example/platform/zhe-util.c:29:5: warning: implicit declaration of function ‘srandom’; did you mean ‘srand’? [-Wimplicit-function-declaration]
     srandom(time(NULL) + getpid());
     ^~~~~~~
     srand
./example/platform/zhe-util.c: In function ‘cfg_handle_addrs’:
./example/platform/zhe-util.c:168:11: warning: implicit declaration of function ‘strdup’; did you mean ‘strcmp’? [-Wimplicit-function-declaration]
     str = strdup(mcgroups_join_str);
           ^~~~~~
           strcmp
./example/platform/zhe-util.c:168:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     str = strdup(mcgroups_join_str);
         ^
./example/platform/zhe-util.c:185:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     str = strdup(mconduit_dstaddrs_str);
         ^
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./src/zhe-bitset.c -o gen/zhe-bitset.o
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./src/zhe-icgcb.c -o gen/zhe-icgcb.o
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./src/zhe.c -o gen/zhe.o
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./src/zhe-uri.c -o gen/zhe-uri.o
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./src/zhe-unpack.c -o gen/zhe-unpack.o
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./src/zhe-pack.c -o gen/zhe-pack.o
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./src/zhe-uristore.c -o gen/zhe-uristore.o
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./src/zhe-pubsub.c -o gen/zhe-pubsub.o
cc   -std=c99 -pedantic -g -Wall -I./src -I./example/platform -I./example/configs/p2p -I./example/throughput -I./example/roundtrip -c ./example/platform/platform-udp.c -o gen/platform-udp.o
./example/platform/platform-udp.c: In function ‘zhe_platform_trace’:
./example/platform/platform-udp.c:60:5: warning: implicit declaration of function ‘flockfile’; did you mean ‘_IO_flockfile’? [-Wimplicit-function-declaration]
     flockfile(stdout);
     ^~~~~~~~~
     _IO_flockfile
./example/platform/platform-udp.c:64:5: warning: implicit declaration of function ‘funlockfile’; did you mean ‘_IO_funlockfile’? [-Wimplicit-function-declaration]
     funlockfile(stdout);
     ^~~~~~~~~~~
     _IO_funlockfile
./example/platform/platform-udp.c: In function ‘zhe_platform_join’:
./example/platform/platform-udp.c:266:20: error: storage size of ‘mreq’ isn’t known
     struct ip_mreq mreq;
                    ^~~~
./example/platform/platform-udp.c:266:20: warning: unused variable ‘mreq’ [-Wunused-variable]
./example/platform/platform-udp.c: In function ‘zhe_platform_send’:
./example/platform/platform-udp.c:300:33: warning: implicit declaration of function ‘random’; did you mean ‘rand’? [-Wimplicit-function-declaration]
     if (udp->randomthreshold && random() < udp->randomthreshold) {
                                 ^~~~~~
                                 rand
makefile:51: recipe for target 'gen/pla

I didn't find any build instructions either; I'd appreciate your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.