99 lines
3.1 KiB
Plaintext
99 lines
3.1 KiB
Plaintext
|
|
TODO:
|
|
|
|
- apps need to be able to register backwards compat aliases for
|
|
entry point names
|
|
|
|
get_transport(conf, driver_aliases={
|
|
'nova.openstack.common.rpc.impl_kombu': 'rabbit',
|
|
'nova.openstack.common.rpc.impl_qpid: 'qpid',
|
|
'nova.openstack.common.rpc.impl_zmq: 'zmq'})
|
|
|
|
- we need some way for the dispatcher to take the incoming
|
|
context dict and instantiate a user-supplied request context
|
|
object with it
|
|
|
|
- @expose decorator
|
|
|
|
- when shutting down a dispatcher, do we need to invoke
|
|
a cleanup method on the listener?
|
|
|
|
- ClientException - e.g. the executor should handle this being
|
|
raised by the dispatcher
|
|
|
|
- the InvalidTarget checks seem like they're generic preconditions
|
|
that all drivers would want enforced
|
|
|
|
- _safe_log() logs sanitized message data
|
|
|
|
- unique_id used to reject duplicate messages
|
|
|
|
- local.store.context used by common logging - basically, how to make
|
|
sure the context of the currently dispatching rpc is available to
|
|
logging. Need to abstract out the dependency on eventlet for this.
|
|
|
|
- I'm not sure listener.done() is really needed - can't we ack the
|
|
message before returning it from poll() ?
|
|
|
|
- envelope=True/False really sucks - it's a transport driver specific
|
|
flag and we're only using it to communicate whether to use the new
|
|
or older on-the-wire notification message format. Maybe we should
|
|
have a high-level "notification message format version" which each
|
|
transport driver can map to an on-the-wire format. Meh.
|
|
|
|
Things I don't like:
|
|
|
|
- CallContext - we already abuse the term "context" enough
|
|
|
|
- There's something about using a context manager for prepare() that
|
|
I like:
|
|
|
|
with client.prepare(version='2.6') as cctxt:
|
|
cctxt.call('select_host',
|
|
request_spec=request_spec,
|
|
filter_properties=filter_properties)
|
|
|
|
but it seems a bit nonsensical
|
|
|
|
- "endpoints" - better than api_objs, callbacks, proxyobj, etc.
|
|
|
|
- we probably won't use BlockingRPCExecutor anywhere, but I think
|
|
it does a good job of showing the basic job of a dispatcher
|
|
implementation
|
|
|
|
|
|
There's a bunch of places where what fields are used in a target
|
|
is unclear:
|
|
|
|
- in driver.listen() and server.start():
|
|
- required: topic and server
|
|
- optional: exchange
|
|
- ignored: namespace, version, fanout
|
|
|
|
- in dispatcher:
|
|
- required: none
|
|
- optional: namespace, version
|
|
- ignored: exchange, topic, server, fanout
|
|
|
|
- in driver.send():
|
|
- required: topic
|
|
- optional: server, fanout and exchange
|
|
- ignored: namespace, version
|
|
|
|
- in client.call() and client.cast():
|
|
- required: (topic is required by send())
|
|
- optional: namespace, version (server, fanout, exchange optional to send())
|
|
- ignored: none
|
|
|
|
driver porting guide:
|
|
|
|
- implement a BaseDriver subclass:
|
|
|
|
- send() should be similar to call()/cast()
|
|
- listen() should be similar to create_consumer()
|
|
|
|
- implement a base.Listener subclass
|
|
|
|
- poll() should pull a message off the queue
|
|
- done() should ack it
|