Informatiq (Talk | contribs) m (moved BOSS/AIR to Infrastructure/BOSS/AIR) |
Dawnfoster (Talk | contribs) m (moved Infrastructure/BOSS/AIR to Release Infrastructure/BOSS/AIR: Original title was broader than intended) |
Contents |
AIR is a library developed for BOSS to provide simple RPC semantics over AMQP for multiple languages.
AIR currently supports:
Perl is planned.
There are many similar RPC/AMQP solutions but they tend to be language specific; AIR is focused on simplicity and interoperability.
The basic premise is to define the message format and to ensure correct use of the AMQP reply_to header. See the AMQP Specification (pdf) page 17, section 2.1.5.2
from AIR.Client import Client, Timeout
air_server = Client(amqp_host = "amqpvm", amqp_user = "air",
amqp_pass = "air", amqp_vhost = "AIR")
print air_server.call("service1", timeout=None, count=5)
require 'AIR/Client'
air_server = AIR::Client.new(:host => "amqpvm", :user => "air",
:pass => "air", :vhost => "AIR")
puts air_server.call("service1", :timeout => nil, :count => 5)
from AIR.Server import Server
srv = Server(amqp_host = "amqpvm", amqp_user = "air",
amqp_pass = "air", amqp_vhost = "AIR")
srv.register("service1", instanceA.method1)
srv.register("service2", other.method2)
srv.run()