Coder Social home page Coder Social logo

melon's Introduction

MELON

MELON is a new communication paradigm for mobile ad hoc networks (MANETs).

This library is a prototype implementation of MELON in Ruby.

Concepts

Conceptionally, MELON communicates via a semi-persistent shared storage space. Messages are retrieved by matching them against a template (similar to tuple-spaces). Templates may really be any features, but in this implementation messages are arrays and they are matched using arrays with either literal values (e.g., 1) or classes (e.g, Integer).

MELON has two basic types of messages: read-only and take-only.

Read-only messages may only be retrieved by copying, never removed from the storage space. These can be considered "broadcast" messages.

Take-only messages may only be retrieved from the storage space by removal, and only once.

All messages may only be retrieved once by a given process. Messages are retrieved in per-sender FIFO order. In other words, messages from a given sender will be retrieved in the order that sender stored them.

MELON also provides bulk read and take operations.

Operations

  • Melon#store - store a take-only message
  • Melon#write - store a read-only message
  • Melon#take - retrieve a matching take-only message
  • Melon#read - retrieve a matching read-only message
  • Melon#take_all - retrieve all available matching take-only messages
  • Melon#read_all - retrieve all available matching read-only messages

Retrieval operations are blocking by default. They will block the process until a matching message is found. To return nil after a best-effort search of available processes, pass false as the second argument.

Note all retrieval methods are best effort. There is no guarantee that a matching message will be retrieved, even if it exists.

Guarantees:

  • Each message will only be retrieved at most once per process
  • Matching messages will be retrieved in per-process FIFO order
  • Take-only messages can only be retrieved at most once

Requirements

  • Ruby

Installation

git clone [email protected]:presidentbeef/melon.git
cd melon
gem build melon.gemspec
gem install manet_melon*.gem

Example Applications

See README.md in the examples directory for information about running the code examples.

Documentation

See here for more details about MELON.

melon's People

Contributors

presidentbeef avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

adit0210

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.