Class: RFlow::Configuration::BrokeredZMQConnection
- Inherits:
-
Connection
- Object
- ActiveRecord::Base
- ConfigurationItem
- Connection
- RFlow::Configuration::BrokeredZMQConnection
- Defined in:
- lib/rflow/configuration/connection.rb
Overview
Subclass of Connection for brokered ZMQ connections and their required options.
We name the IPCs to resemble a quasi-component. Outputting to this connection goes to the in
of the IPC pair. Reading input from this connection comes from the out
of the IPC pair.
The broker shuttles messages between the two to support the many-to-many delivery pattern.
Instance Attribute Summary
Attributes inherited from Connection
#input_port, #options, #output_port
Class Method Summary collapse
-
.default_options ⇒ Object
Default ZeroMQ options required for broker connection.
Instance Method Summary collapse
-
#brokers ⇒ Array<Broker>
A brokered ZMQ connection requires one broker process.
Methods inherited from Connection
Class Method Details
.default_options ⇒ Object
Default ZeroMQ options required for broker connection.
99 100 101 102 103 104 105 106 107 108 |
# File 'lib/rflow/configuration/connection.rb', line 99 def self. { 'output_socket_type' => 'PUSH', 'output_address' => lambda{|conn| "ipc://rflow.#{conn.uuid}.in"}, 'output_responsibility' => 'connect', 'input_socket_type' => 'PULL', 'input_address' => lambda{|conn| "ipc://rflow.#{conn.uuid}.out"}, 'input_responsibility' => 'connect', } end |
Instance Method Details
#brokers ⇒ Array<Broker>
A brokered ZMQ connection requires one broker process.
112 113 114 |
# File 'lib/rflow/configuration/connection.rb', line 112 def brokers @brokers ||= [ZMQStreamer.new(self)] end |