Giter Site home page Giter Site logo

thebookworm101 / opardum-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liamoc/opardum-server

0.0 2.0 0.0 5.95 MB

operational transforms based collaborative editing server written all in literate haskell

License: BSD 3-Clause "New" or "Revised" License

opardum-server's Introduction

Opardum

Opardum is an operational transforms based server for collaborative document editing, written entirely in literate haskell.

Generating Literate Sources

You will need lhs2tex, and a pdflatex implementation.

cd lhs
./generate.sh

Building

Opardum is made up of several packages:

  • opardum -- the main server implementation
  • Storage Backends - by default, Opardum uses a null storage backend that 'forgets' a document as soon as all clients disconnect.
    • opardum-mongodb -- a MongoDB-based permanent storage backend
    • opardum-file -- a flat file permanent storage backend
    • opardum-tokyo -- a Tokyo Cabinet permanent storage backend (TBA).
  • Transport Protocols - by default, Opardum uses web sockets to interface with the web client, however other transport protocols exist.
    • opardum-simplesockets -- A normal TCP sockets based transport protocol (TBA).

To compile and install Opardum with the Haskell Platform, simply type:

cabal configure
cabal build
cabal install

The Setup.hs script can also be used.

To build any of the sub-packages, simply run the same commands in their relevant directories.

Dependencies

Dependencies of Opardum include:

  • Dyre
  • GHC
  • Network
  • MongoDB (for optional MongoDB backend)
  • Tokyo Cabinet (for optional Tokyo Cabinet backend)

Configuring

Opardum is configured using the dyre package, enabling it to be configured in the Haskell language itself, in a way similar to xmonad.

The configuration file will be located in $XDG_CONFIG_HOME/opardum/opardum.hs. On Linux systems, this is ~/.config/opardum/opardum.hs

A simple configuration file is as follows:

import Opardum.Configuration

main = opardum defaultConfig

By default, Opardum runs on port 9988, with the websocket protocol, and a null storage backend (document state is lost when all clients disconnect).

A more useful configuration file is as follows (using the mongoDB storage backend to enable permanent storage)

import Opardum.Configuration
import Opardum.Storage
import qualified Opardum.Storage.MongoDB as M

main = opardum defaultConfig { storage = M.mongoDB M.defaults }

See the file Opardum/Configuration.lhs for a full description of options.

Running opardum with a changed config file will cause it to recompile.

Web Client

A simple, probably buggy testing client has been implemented as a web page with an embedded Mozilla Skywriter editor. In order to use the client, you will need to:

Run a web server to serve up the "Client" directory, such that:

http://localhost/opardum/index.html

Refers to the index.html file located there. localhost can be substituted for any hostname.

HTML page and navigate there with a compliant browser such as Google Chrome. Note that advanced HTML5 features are required for Bespin, and WebSockets are used for the transport protocol. Hence Firefox 3.5 and any version of IE will not work.

opardum-server's People

Contributors

liamoc avatar

Watchers

James Cloos 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.