0.0
No commit activity in last 3 years
No release in over 3 years
Buschtelefon can be used to automatically share information between Ruby clients over a network
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 3.0
~> 10.0
~> 3.0
~> 0.16
~> 0.1
 Project Readme

Buschtelefon

Travis Build Status

With buschtelefon you can setup a gossiping meshnet. All of it should behave just like human beings tattling at a coffee party.

There basically are two features:

  • Nodes make coffee klatsch available between each other automatically.
  • Nodes can be asked about stale information to fight FOMO.

Communication happens via UDP. Autodiscovery of nodes is not implemented (yet).

Installation

You can use this gem with Ruby versions starting from 2.1. Add the following line to your application's Gemfile:

gem 'buschtelefon'

And then execute:

$ bundle

Or install it yourself as:

$ gem install buschtelefon

Usage

You can setup your local tattling meshnet the following way:

require 'buschtelefon'
include Buschtelefon

aunt_may = NetTattler.new(host: '127.0.0.1')
aunt_ruth = NetTattler.new(host: '127.0.0.1')
remote_aunt_ruth = RemoteTattler.new(host: '127.0.0.1', port: aunt_ruth.port)

aunt_may.connect(remote_aunt_ruth)

Thread.new { aunt_may.listen }
Thread.new { aunt_ruth.listen }

aunt_may.feed(Gossip.new('Did you hear about the cool company "Renuo"?'))

puts aunt_may.knowledge
puts aunt_ruth.knowledge

Comfortability hint: Be aware that NetTattler binds itself to 127.0.0.1 per default. Use NetTattler.new(host: '0.0.0.0') to bind it on all interfaces.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/check to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/renuo/buschtelefon.

License

The gem is available as open source under the terms of the MIT License.