GithubHelp home page GithubHelp logo

dodikuswono / erwa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bwegh/erwa

0.0 2.0 0.0 1.86 MB

A wamp.ws router written in Erlang.

License: MIT License

Makefile 0.24% Erlang 97.40% Ruby 0.02% Python 2.34%

erwa's Introduction

Erwa

passing or failing?

Erwa is an implementation of WAMP (Web Application Messaging Protocol) router in Erlang. The client/peer side has been moved to a seperate project called Awre. Both use the library Wamper.

Table of Contents

Description

Erwa is the implementation of the WAMP protocol in Erlang. It supports the router, so the server side.

Pull Requests, Bug Reports, Comments and any other kind of feedback is welcome.

Back to TOC

Features

Erwa has the following features:

  • the complete basic profile revision RC4
  • Advanced Profile (only listing stable/implemented)
    • RawSocket Transport
    • Batched Websocket Transport
    • Messages
    • Feature Announcement
    • Agent Identification
    • Subscriber Black-and Whitelisting
    • Publisher Exclusion
    • Publisher Identification
    • Progressive Call Results
    • Cancelling Calls
    • Call Timeouts
    • Caller Identification
  • NOT yet supported
    • LongPoll Transport
    • Challenge Response Authentication (Database needs to be implemented by user)

Back to TOC

Router

The router implementation in Erwa uses the great ranch and cowboy from Loïc Hoguin (essen) to handle the incomming connections and the webserver part for the websockets. Erwa has two modules to work either as a protocol for ranch on incomming TCP connections, or as websocket handler with cowboy on incomming websocket connections.

All you need to do to get a simple WAMP router up and running is to add a dispatch rule to ranch and/or cowboy:

A WAMP router on websockets:

%% start erwa to handle any incomming connections to any host at the path /wamp
%% start it with 100 parallel acceptors on port 8080
ok = erwa:start_websocket("/wamp", 8080, 100).

In the examples directory you can find the simple_router which includes just the above and starts a WAMP router, including a simple javascript client, using wampy.js.

The other possibility is to start Erwa as a TCP router:

%% start erwa listening for raw tcp connections on port 5555
%% starting it with 5 parallel acceptors
ok = erwa:start_socket(5555,5).

This is also included in the simple_router example in the examples directory.

By default Erwa does not automatically create realms. This is activated by the boolean autocreate_realm flag. If you only want to support certain realm you need to start them by using erwa:start_realm/1, which takes the name of the realm to start as argument.

Back to TOC

Examples

In the exampes directory you can find a simple router example:

  • simple_router: A very tiny example, showing how easy it is to fire up a WAMP router using Erwa.

Back to TOC

License

The MIT License (MIT)

Copyright (c) 2014-2015 Bas Wegh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Back to TOC

wampws

erwa's People

Contributors

bwegh avatar ethrbh avatar asv avatar dumbris avatar bryant1410 avatar

Watchers

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