没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > howlr |
howlr
|
0 | 0 | 33 |
贡献者 | 讨论 | 代码提交 |
RESTful Messaging with HowlrThe Howlr daemon provides RESTful interface for sending outgoing messages. Messages are submitted via HTTP and dispatched to other protocols. Currently only email (SMTP and Sendmail) is supported, but other delivery methods (SMS, IM, etc.) are possible.
The idea is to provide a RESTful messaging service, as part of a larger REST-based enterprise infrastructure.
FeaturesRESTful HTTP interface for back-end integration with other RESTful network resources Modular support for messaging protocols. Regular e-mail (via SMTP or sendmail) is available out of the box. Platform-independent, stand-alone server, installable as a Linux init.d service (it should be run on Windows as a background daemon too) Easy to configure via a single YAML file. Supports delivery callbacks that trigger further REST calls when a message is sent out to each of its recipients. InstallationInstall the gem and its dependencies: gem install howlr
Run Howlr for the first time to generate a sample configuration file: howlr -c ~/howlr.yml
Edit configuration in ~/howlr.yml
Run again using the edited config file: howlr -c ~/howlr.yml
Open up your browser and go to http://localhost:7008/messages/new to make sure it's working (your URL will be different if you changed the port and url prefix in your configuration). That's it. Your Howlr instance should now be ready to start receiving REST requests for sending out messages.
UsageSimple example using Ruby's ActiveResource:
require 'active_resource'
- Define the proxy class
class Message < ActiveResource::Base
self.site = 'http://localhost:7008'
end
message = Message.new
message.subject = "Howlr Test"
message.body = "This is just a test!"
message.from = "Test McTestski "
message.recipients = "John Doe ; Sally Smith "
- Saving the message commits it to the server, causing the message to
- be sent out.
message.save
- The server temporarily stores copies of all sent messages. Saving a
- message (i.e. sending it) assigns to it a unique ID. We can use this
- ID to later retrieve a copy of this message.
message2 = Message.find(message.id) Also a look at the HowlrAPI, and the PHP Zend_Rest_Client sample code.
You will also probably want to configure Howlr to run as an init.d service.
Finally, if you're interested in other RESTful services, have a look at Taskr, a RESTful scheduler daemon.