ripple 0.5.3

Ripple

Lightweight Dart messaging server; supporting STOMP messaging protocol.

See also Stomp Dart Client.

Build Status

Installation

Add this to your pubspec.yaml (or create it):

dependencies:
  ripple:

Then run the Pub Package Manager (comes with the Dart SDK):

pub install

Usage

First, you have to import:

import "package:ripple/ripple.dart";

Then, you can start Ripple server by binding it to any number of Internet addresses and ports.

new RippleServer()
  ..start() //bind to port 61626
  ..startSecure(); //bind to port 61627 and using SSL

For how to use a STOMP client to access Ripple server, please refer to STOMP Dart Client.

WebSocket

You can have Ripple server to serve a WebSocket connection. For example,

HttpServer httpServer;
RippleServer rippleServer;
...
httpServer.listen((request) {
  if (...) { //usually test request.uri to see if it is mapped to WebSocket
    WebSocketTransformer.upgrade(request).then((WebSocket webSocket) {
      rippleServer.serveWebSocket(webSocket);
    }).catchError((ex) {
      // Handle error
    });
  } else {
    // Do normal HTTP request processing.
  }
});

Limitations

  • Support STOMP 1.2 or above
  • Support UTF-8 encoding

Incompleteness

  • Transaction not supported.
  • Heart beat not supported.
  • ACK and NACK not supported.

Potential Enhancement

  • Support subscribeBlob() better. Currently, messages will be held in the memory before sending to subscribers. It could be an issue if the message is huge.

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  ripple: ">=0.5.3 <0.6.0"

If your package is an application package you should use any as the version constraint.

2. Install it

If you're using the Dart Editor, choose:

Menu > Tools > Pub Install

Or if you want to install from the command line, run:

$ pub install

3. Import it

Now in your Dart code, you can use:

import 'package:ripple/ripple.dart';
Version Uploaded Archive
0.5.3 Nov 05, 2013 Download ripple 0.5.3 archive
0.5.2 Oct 29, 2013 Download ripple 0.5.2 archive
0.5.1 Aug 15, 2013 Download ripple 0.5.1 archive
0.5.0 Aug 14, 2013 Download ripple 0.5.0 archive

About

Lightweight Dart messaging server; supporting STOMP messaging protocol.

Author

Email tomyeh@rikulo.org Tom Yeh

Homepage

https://github.com/rikulo/ripple

Documentation

http://api.rikulo.org/ripple/latest

Uploader

tomyeh@rikulo.org

Share