jmettraux / ratpack forked from kennethkalmer/ratpack
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
f190976
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Dec 07 08:44:58 -0800 2008 | |
| |
README.rdoc | ||
| |
bridge.rb | ||
| |
config/ | ||
| |
lib/ | ||
| |
test.sh | Sun Dec 07 12:11:18 -0800 2008 |
ratpack
DESCRIPTION:
Ratpack is a small Sinatra-based HTTP to XMPP bridge, allowing you to send jabber messages in a RESTful fashion. Messages can be sent to a pool of contacts in broadcast or round-robin mode, or individually.
I’m aware of BOSH, but I’m not sure if this will compete against it since BOSH should be for publicly accessible resource that need to scale (It is can XEP by the way).
Ratpack is meant to be used where XMPP forms part of the backend processing environments, like bots that perform rankings or crawl sites or whatever impractical use you can think of :)
FEATURES/PROBLEMS:
- Send messages asynchronously to individual contacts
- Send messages asynchronously to groups of contacts (broadcast & round-robin)
- Send messages synchronously to individual contacts, blocking for response
- Read incoming messages
- Performance is slow, expected for POC
TODO:
- Speed this baby up, gonna need some help here
SYNOPSIS:
GET / POST /message with to & message where to is valid JID POST /broadcast with recipients[] & message where recipientsp[] valid JID's POST /pool with pool & message where pool is in config/pools.yml
Here are some examples with curl
$ curl -F to=kenneth@devbox -F message=test http://localhost:4567/message $ curl -F recipients[]=kenneth@devbox -F recipients[]=kenneth@devbox -F message=test3 http://localhost:4567/broadcast $ curl -F pool=sample -F message=test_pool http://localhost:4567/pool
REQUIREMENTS:
- sinatra
- xmpp4r-simple
INSTALL:
$ git clone git://github.com/kennethkalmer/ratpack.git ... review config in bridge.rb ... $ ruby bridge.rb
LICENSE:
(The MIT License)
Copyright © 2008 Kenneth Kalmer
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.

