Giter Club home page Giter Club logo

rope's Introduction

Rope

Rope is a public Kite registry with proxy support between kites. Also introduces bi-directional communication between Kites.

Getting Started

Before starting make sure to call npm install and go get github.com/koding/kite if you want to try go example. Then to start Rope server;

 $ node rope.js

This will start the server on 0.0.0.0:8080 which then you can run one of the node examples (in another terminal session);

 $ node rope-node.js

will create a Rope Node with Node.js, same file also supports browsers which you can try it out;

 $ open rope-browser.html

will load the kite.js bundle and then runs the rope-node.js which will create another Rope Node in the browser this time. To try another Rope Node in Go this time;

 $ go run rope-node.go

Which will do the same with others.

Once ready, you can start playing with nodes by calling run over Rope Server. The best way to do that for now opening Dev Console in your choice of Browser after loading the rope-browser.html. Which will connect to Rope Server, identifies itself and will get a list of Kites registered before which you can access from publicKites global variable. There will be another public variable called kite which will allow you to interact with Rope Server. And for an example of usage of run over Rope Server would be (in Dev Console of rope-browser.html);

kite.ping

 > kite.tell('run', {kiteId: publicKites[0], method: "kite.ping"}).then(console.log.bind(console))
 pong

will ping the first public kite which will end with a simple pong

kite.systemInfo

 > kite.tell('run', {kiteId: publicKites[0], method: "kite.systemInfo"}).then(console.log.bind(console))
 {
   diskTotal: 975902848,
   diskUsage: 328007624,
   homeDir: "/Users/gokmen",
   memoryUsage: 12602589184,
   state: "RUNNING",
   totalMemoryLimit: 17179869184,
   uname: "darwin",
 }

will return the system info from first public kite.

kite.prompt

 > kite.tell('run', {kiteId: publicKites[0], method: "kite.prompt", args: ["Your Name? "]}).then(console.log.bind(console))

 # on the terminal of first public kite you will see the prompt "Your Name? "

   λ go run rope-node.go
   2017-07-06 01:24:30 [dope] INFO     New listening: 0.0.0.0:49558
   2017-07-06 01:24:30 [dope] INFO     Serving...
   2017-07-06 01:24:30 [dope] INFO     Identify requested!
   2017-07-06 01:24:30 [dope] INFO     Following Kites found on Rope: [8542b5e3-fc67-4c6b-a368-968c12d69357 11f4f2f9-1cd7-4f77-862b-4de07a42a991]
   Your Name? Poyraz

 # once provided it will return the result to the browser console.
 Poyraz

square

 > kite.tell('run', {kiteId: publicKites[0], method: "square", args: [5]}).then(console.log.bind(console))
 25

you can check it out the implementation in rope-node.{go, js}

rope's People

Watchers

Devrim Yasar avatar James Cloos avatar  avatar Umut Sirin avatar Mehmet Ali avatar Hakan Karadis avatar  avatar  avatar

Forkers

isabella232

rope's Issues

Run method should inform rope count about the process

Before starting the process and after sending the response back to the requester, rope-server should let rope-count to count the operation on behalf of logged in user. Currently rope-count provides /start and /stop endpoints for these operations.

User token support needs to be implemented

  • create a new collection (tokens) in mongodb
type Token {
  _id: ObjectId
  label: String
  value: UUID
}
  • Add CRUD endpoints for tokens
    • GET /tokens to retrieve tokens
    • POST /tokens to create a new token (request body with token label)
    • DELETE /tokens/{uuid} to delete tokens

User registration should be implemented.

Currently all the requests are open for anyone which is making hard implementing the payment/count stuff. Thus we need to keep track of the operations and registered nodes/servers etc.

We can use an existing library like passport.js to be able to easily implement registration over an existing authentication like GitHub/twitter/bitbucket or google.

This also requires us to keep these information in a dedicated db such as mongodb.

rope: api for creating tasks

Krypto is going to bundle a rope-oracle library, so every contract deployed with krypto dapp deploy can include and use it out of the box.

The rope-oracle library is going to be a thin wrapper around oraclize.it [1] with preset rope endpoints. It will be used to send jobs (javascript code?) to be executed on rope.

I'd need an api to post a rope task and read the results, do we have any?

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.