Git Product home page Git Product logo

9pjson's Introduction

9pJSON

A new Javascript implementation of the 9p protocol. Unlike most other implementations this one decouples the marshalling. In this way we can put classic 9p2000 packets on the wire, or JSON (9pJSON). Use as a module for node.js, or in a web page (ixp.all.js).

The node.js test suite runs with grunt. Please npm install -g 'grunt-cli' first, then use npm install in this directory. It should install a current version of the actual 'grunt' and associated modules.

For 'over-the-wire' calls you need to build a packet according to the formats in ixp.js:packets[] and send it to service.answer(). You'll get a response packet (as a javascript object). Within your program you can make direct protocol function calls, "service.Tattach({...})" for example.

Usage

Browser

First run grunt concat to build 9pJSON.all.js, then include it in your .html file. See proto.html for more information.

Node.js

Require 9pJSON, then call .Server() or .Client() as needed. Servers will build a file tree and then respond to requests by calling .answer(packet).

Contributing

Porting any of the following:

  • libdraw (to HTML5 Canvas)
  • auth (kinda essential)
  • factotum
  • secret store

To contribute please fork this repository, make sure all the tests pass (including jshint), then submit pull requests. Code aligned with the project direction is more likely to be merged into the master branch. Unlikely to be accepted: overly complex code, patches that change multiple features, patches without tests.

Much of this code is based on https://github.com/aiju/jsdrawterm. Most of this code was developed using Acme and a 'test first (mostly)' process.

9pjson's People

Contributors

rsbohn avatar

Watchers

 avatar  avatar

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.