module DispatchRider
The demultiplexer in the reactor pattern is implemented in this class. The object needs to be initiated with a queue and a dispatcher. Demultiplexer#start
defines an event loop which pops items from the queue and passes it on to the dispatcher for dispatching to the appropriate message handler. The demultiplexer can be stopped by calling the Demultiplexer#stop
method.
This file contains all the error classes for this gem.
This module tracks which classes inherit from the class that includes the module, and provides an accessor to it.
JSON Log Formatter
Text Log Formatter
This class represents a message. All other objects dela with passing around instances of this class. A message must have a subject and a body. The subject represents the handlers name and the body represents the payload of the process method in the handler. When messages are stored in the queues, they are serialized.
The namespace that holds the notification services services
This is a basic implementation of the Notification service using Amazon SNS. The expected usage is as follows :
notification_service = DispatchRider::NotificationServices::AwsSns.new notification_service.publish(:to => [:foo, :oof], :message => {:subject => "bar", :body => "baz"})
this is a basic notification service which uses a filesystem folder to handle notifications
this represents a FileSystem queue channel (or basically a folder)
This is abstraction around a notifier service for FileSystem based queue services
The namespace that holds the queue services
This queue service is based on aws sqs. To make this queue service work, one would need the aws sqs gem to be installed.
This is the base class that provides the template for all queue services. The child classes must implement the following methods to become a concrete class : assign_storage, insert, raw_head, construct_message_from, delete and size. The instances of this class or it’s child classes are supposed to perform the following actions on the queue service : initialize, push, pop and empty?
This is a rudementary queue service that uses file system instead of Aws::SQS or SimpleQueue. It addresses SimpleQueue’s inability to be used by only one application instance while avoiding the cost of setting up Aws::SQS. This is ideal to be used in development mode between multiple applications.
This is a queue implementation for the queue service based on file systems
This is a simple implementation of an in memory queue using an array.
The namespace that holds the registrars
This is the base class for the registrars.
It defines the interface that other registrars inherit. This is an abstract class. The child classes inheriting this interface must define the 'value' method.
This is the registrar for FileSystem channels, basically storing paths
This is the registrar for the handlers.
This registrar handles the registration of various notification services.
This si the registrar for queue services.
This is the registrar for the Aws SNS channels.
@note: Later this could be pulled out to its own gem and included depending on what ORM the user prefers. Something like: @example
gem "dispatch_rider-active_record" gem "dispatch_rider-rom" # Ruby Object Mapper gem "dispatch_rider-mongo_mapper" gem "dispatch_rider-ohm"
This class takes care of the subscribing side of the messaging system.
This file specifies the current version of the gem.
Constants
- VERSION
Public Class Methods
# File lib/dispatch-rider.rb, line 29 def clear_configuration! @configuration = nil end
# File lib/dispatch-rider.rb, line 24 def configuration @configuration ||= Configuration.new end
# File lib/dispatch-rider.rb, line 20 def configure yield configuration end