Giter Club home page Giter Club logo

gnunet-mqtt's People

Contributors

nemooudeis avatar vsaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

nemooudeis

gnunet-mqtt's Issues

Allow UFT8 Topic Strings

The MQTT Spec says the following about topic strings:

Topic name: A UTF-encoded string. This must not contain Topic wildcard ("+", "#") characters.

See also MQTT and UTF8

Our current implementation for example failes to match topics like "/music/michal-jackson/" if there is any non alpha-numeric characters

Multicast Channel Announcement

When a peer is publishing a message it searches for subscribers via GNUNET_REGEX.
When a subscription is found create a new multicast channel
announce it (if there is no existing channel for the topic already) under

    GNUNET_HashCode dht_key_of_accept_state = ... // get via REGEX api
    GNUNET_HashCode dht_key_of_channel;
    GNUNET_CRYPTO_hash(dht_key_of_accept_state, sizeof(struct GNUNET_HashCode), &dht_key_of_channel);

Enable GNUnet logging

Right now no log output appears. It is unclear if this is because of configuration issues or if the log system is broken/not used correctly.

Fix make check

gnunet-mqtt has the option to run a self test using make check. This however fails with the following message:

Parallelism: 4
Parallelism: 4
Jun 01 14:56:20-232872 mqtt-api-16563 WARNING Failed to connect to the MQTT service!
/bin/bash: line 5: 16563 Segmentation fault      ${dir}$tst
FAIL: test_mqtt_single_peer
Parallelism: 4
Parallelism: 4
Jun 01 14:56:20-480316 arm-16600 ERROR Default service `mqtt' not configured correctly!
Jun 01 14:56:20-492117 arm-16601 ERROR Default service `mqtt' not configured correctly!
Jun 01 14:56:20-957997 mqtt-api-16584 WARNING Failed to connect to the MQTT service!
/bin/bash: line 5: 16584 Segmentation fault      ${dir}$tst
Jun 01 14:56:20-963431 transport-16606 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:20-963569 transport-16606 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:20-964888 transport-16607 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:20-964909 transport-16607 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
FAIL: test_mqtt_multiple_peers
Parallelism: 4
Parallelism: 4
Jun 01 14:56:21-163587 mqtt-api-16618 WARNING Failed to connect to the MQTT service!
/bin/bash: line 5: 16618 Segmentation fault      ${dir}$tst
FAIL: test_mqtt_unsubscribe
Parallelism: 4
Parallelism: 4
Jun 01 14:56:21-401538 arm-16655 ERROR Default service `mqtt' not configured correctly!
Jun 01 14:56:21-406345 arm-16656 ERROR Default service `mqtt' not configured correctly!
Jun 01 14:56:21-874616 mqtt-api-16639 WARNING Failed to connect to the MQTT service!
/bin/bash: line 5: 16639 Segmentation fault      ${dir}$tst
Jun 01 14:56:21-880565 transport-16661 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:21-880595 transport-16661 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:21-882079 transport-16662 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:21-882104 transport-16662 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
FAIL: test_mqtt_regex_hash
Parallelism: 4
Parallelism: 4
Jun 01 14:56:22-229670 arm-16695 ERROR Default service `mqtt' not configured correctly!
Jun 01 14:56:22-237867 arm-16694 ERROR Default service `mqtt' not configured correctly!
Jun 01 14:56:22-726978 mqtt-api-16673 WARNING Failed to connect to the MQTT service!
/bin/bash: line 5: 16673 Segmentation fault      ${dir}$tst
Jun 01 14:56:22-733813 transport-16704 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:22-733847 transport-16704 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:22-735597 transport-16700 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
Jun 01 14:56:22-735620 transport-16700 ERROR Assertion failed at gnunet-service-transport_neighbours.c:2085.
FAIL: test_mqtt_regex_plus
===================================
5 of 5 tests failed
Please report to [email protected]
===================================

Announce Subscription anonymously

When a peer subscribes to a regex announce the regex anonymously (using the new REGEX api).
Get the dht keys for accept states for the announced regex.
Check DHT for multicast channel for those accept states, get the channel public key form dht via a key generated like this

    GNUNET_HashCode dht_key_of_accept_state = ... // get via REGEX api
    GNUNET_HashCode dht_key_of_channel;
    GNUNET_CRYPTO_hash(dht_key_of_accept_state, sizeof(struct GNUNET_HashCode), &dht_key_of_channel);

add the channels to a subscription list

Join Multicast channels

  • Persist channels
  • join all channels on startup
  • leave all channels on unsubscribe, disconnect or shutdown

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.