Write clients for Meteor's DDP Protocol

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

MIT licensed by Lyndon Maydwell
Maintained by

The Deadpan-DDP project includes a debugging-tool, as well as a general purpose library.

DDP is the protocol that Meteor speaks between client and server.

The DDP tech-stack is: Websockets -> JSON -> EJson -> Collections -> Subscriptions + RPC.

In order to use the debugging tool, install this package and run deadpan for a usage statement.

In order to use the library, simply import Web.DDP.Deadpan.

The DSL monad is largely based around RPC calls and callbacks. In order to write an application you would call Web.DDP.Deadpan.runClient with

  • An initial application state (this includes initial callbacks)

  • A set of connection parameters

  • A Web.DDP.Deadpan.DSL.Deadpan application

There are several callback-sets provided in Web.DDP.Deadpan, however, if you want to pick in a more granular fashion, look inside Web.DDP.Deadpan.Callbacks.

The connection parameters are the triple (Domain, Port, Path)...

For convenience the function getURI is provided to turn a URI of the form websocket://localhost:3000/websocket into the triple (Right ("localhost", 3000, "websocket"))... or an error (Left "error message").

Refer to the on Github for more information.


Deadpan-DDP Change Log

  • RPC now only takes a list of params

  • Hex GUID strings

  • Better TODO Example
  • Added subscription methods that return the subscription id

  • Fixed the exit error

  • Made GUID newtype abstract to prevent abuse

  • Added newtype for IDs to prevent library mistakes

  • Subscription capabilities have begun to be added
  • Add Data
  • Remove Data
  • Modify Data (Simplistic)
  • Wait on subscription

  • Fixed some bugs
  • RPC responses now return an Either to indicate success or failure

  • Large refactor including API changes
  • No longer require specifying app-state to run an app
  • Added blocking RPCWait

  • Added further callback implementations
  • Added test-app
  • Added documentation

  • Completed adding RPC method call support

  • Updated license file to include copyright info

  • Custom Show instance to render prettier output in debugging app [09c9876]
  • Improved error reporting in debugging app [6dcf272]

  • Added a Changelog

Initial version uploaded to Hackage.

Some values still undefined.

comments powered byDisqus