Coder Social home page Coder Social logo

gyre's Introduction

Gyre GoDoc Build Status

This is a Golang port of Zyre 2.0, an open-source framework for proximity-based peer-to-peer applications, implementing the same ZeroMQ Realtime Exchange Protocol.

Description

Gyre does local area discovery and clustering. A Gyre node broadcasts UDP beacons, and connects to peers that it finds. This class wraps a Gyre node with a message-based API.

All incoming events are delivered via the recv call of a Gyre instance. The first frame defines the type of the message, and following frames provide further values:

ENTER fromnode headers ipaddress
    a new peer has entered the network
EXIT fromnode
    a peer has left the network
JOIN fromnode groupname
    a peer has joined a specific group
LEAVE fromnode groupname
    a peer has left a specific group
WHISPER fromnode message
    a peer has sent this node a message
SHOUT fromnode groupname message
    a peer has sent one of our groups a message

In SHOUT and WHISPER the message is a single frame in this version. In ENTER, the headers frame contains a packed dictionary.

To join or leave a group, use the Join and Leave methods. To set a header value, use the SetHeader method. To send a message to a single peer, use Whisper method. To send a message to a group, use Shout.

Example (docker)

Run following command in a terminal:

docker run --rm -i --tty -t armen/gyre chat -name yourname

And repeat the above command in another terminal, the chat instances will discover eachother. Happy chatting!

Api

View the API docs GoDoc

Project Organization

Gyre is owned by all its authors and contributors. This is an open source project licensed under the LGPLv3. To contribute to Gyre please read the C4.1 process that we use.

To report an issue, use the Gyre issue tracker at github.com.

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.