My favorites | Sign in
Project Logo
                
Show all Featured downloads:
howlr-0.1.0.41.gem
People details
Project owners:
  matt.zukowski

RESTful Messaging with Howlr

The 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.

Features

Installation

  1. Install the gem and its dependencies:
  2. gem install -y howlr
  3. Run Howlr for the first time to generate a sample configuration file:
  4. howlr -c ~/howlr.yml
  5. Edit configuration in
  6. /etc/howlr/config.yml
  7. Run again:
  8. howlr -c ~/howlr.yml
  9. 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.

Usage

Simple 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 <test@example.foo>"
message.recipients = "John Doe <jdoe@example.foo>; Sally Smith <ssmith@example.foo>"
  
# 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.









Hosted by Google Code