GithubHelp home page GithubHelp logo

plurality's Introduction

Plurality

Plurality is a data staging service using containers to use custom protocol for data transfers between DTN (Data Transfer Nodes). The minimum software stack for on a DTN server is ssh and Singularity. Plurality assumes no root access to DTN nodes and uses Singularity containers to deploy custom data transfer protocols.

Setup config files

nodes.db

This config file describes the ssh access parameters for the nodes to be accessed by the Plurality e.g.

{
  "capabilities": {
    "singularity": "which singularity",
    "slurm": "which sbatch"
  },
  "hosts": [
    {
      "capabilities": {},
      "host": "HOST1",
      "keyFile": null,
      "port": 22,
      "user": "USER1",
      "dirs": [
        "/mnt/dss/dtn"
      ]
    },
    {
      "capabilities": {},
      "host": "HOST2",
      "keyFile": null,
      "port": 22,
      "user": "USER2"
    }
  ]
}

protocols.db

This config file describes the container images to be used for each custom protocol e.g.

{
  "udt": {
    "name": "udt",
    "src": {
      "image": "recap/udt-singularity",
      "cmd": "singularity run udt.img sendfile 9000",
      "stop": "ps -C sendfile | grep -v PID | awk '{print $1}' | xargs kill -9"
    },
    "dst": {
      "image": "recap/udt-singularity",
      "cmd": "singularity run udt.img recvfile ##HOST## 9000 ##RPATH## ##LPATH##"
    }
  },
  "http": {
    "name": "http",
    "src": {
      "image": "recap/http-singularity",
      "cmd": "singularity run http.img python -m SimpleHTTPServer 8080",
      "stop": "ps -C 'python -m SimpleHTTPServer 8080' | grep -v grep | awk '{print $1}' | xargs kill -9"
    },
    "dst": {
      "image": "recap/http-singularity",
      "cmd": "singularity run http.img wget http://##HOST##:8080/##RPATH## -O ##LPATH##"
    }
  }
}

The above describe two protocols udt and http and their respective containers for sender and receiver.

API

  • POST /api/v1/copy submit an array of copy requests to the staging service. E.g.
[{
  	  "protocol": "http",
      "src": {
        "host": "HOSTNAME",
        "path": "PATH"
      },
      "dst": {
        "host": "HOSTNAME",
        "path": "PATH"
      }
  },
  {
  	  "protocol": "udt",
      "src": {
        "host": "HOSTNAME",
        "path": "PATH"
      },
      "dst": {
        "host": "HOSTNAME",
        "path": "PATH"
      }
  }]

The above submits a request to copy a file using http and udt from one host to the next.

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.