Code Monkey home page Code Monkey logo

gdp-router-client-proxy's Introduction

Global Data Plane (GDP) Pub-Sub Demo

Overview

A publisher advertises a topic called "helloworld" to the Global Data Plane(GDP), at the same time claiming it is a publisher of this topic.

A subscriber sends a "connect me" request to the GDP to be added to the "helloworld" topic.

The publisher then pushes some message to the topic hosted in the GDP, and the subscriber receives the message.

Limitation

  • The routing part of the network is yet to be integrated. Currently, all the topic information are simply stored in an entity called "access point" in the GDP. It behaves like a ROS master to manage all the topic related things in a centralized manner.

  • Any message pushed to any topic would be received on every registered proxy since we are broadcasting the message to all proxies. Security is a big TODO. Also, this broadcasting approach leaves the filtering responsibility (from a proxy's standpoint, it will need to figure out if a received message is from a topic that it is subcribed to) to the proxy itself.

Steps to run this demo

This demo needs 5 NUCs: gdpmobile2-6. gdpmobile5 as a publisher, gdpmobile6 as a subscriber. gdpmobile2 and gdpmobile4 as switch. gdpmobile3 as the access point.

  1. Set up a GDP network:

    • On gdpmobile3, starts the access point
      rungdp
      cd gdp/jiachen_playground
      cargo run -- -m 1
      
    • On gdpmobile2 and gdpmobile4, start and register switch to the access point (IP of gdpmobile3 is 128.32.37.41)
      rungdp
      cd gdp/jiachen_playground
      cargo run -- -m 0 -a 128.32.37.41
      
  2. Register a proxy that only has a publisher, and advertise a topic called "helloworld". On gdpmobile5, run

    cd gdp-router-client-proxy/
    . venv/bin/activate
    

    and then, using the gdpname showed on gdpmobile2 (IP address is 128.32.37.82),

    sudo env "PATH=$PATH" python gdp_for_ros.py 128.32.37.82 [gdpname of gdpmobile2] 1 123123123
    
  3. Register a proxy that only has a subscriber, and connect itself as a subscriber to the topic "helloworld". On gdpmobile6, run

    cd gdp-router-client-proxy/
    . venv/bin/activate
    

    and then, using the gdpname of gdpmobile4 and the gdpname of the topic "helloworld" (this should show on the gdpmobile5 terminal starting with "0x" prefix, remember not to include this hex prefix), run

    sudo env "PATH=$PATH" python gdp_for_ros.py 128.32.37.42 [gdpname of gdpmobile4] 0 [gdpname of "helloworld" topic]
    

    By ths time, gdpmobile3 tab should show that there is a topic called "helloworld" in the GDP, and this topic has one publisher and one subscriber

  4. Push a message to topic "helloworld", just hit any key on gdpmobile5

gdp-router-client-proxy's People

Watchers

Jiachen Yuan avatar

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.