[openstack-dev] [oslo][messaging] messaging vs. messagingv2

2014-06-16 Thread Ihar Hrachyshka
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi all,

I'm currently pushing Neutron to oslo.messaging, and while at it, a
question popped up.

So in oslo-rpc, we have the following notification drivers available:
neutron.openstack.common.notifier.log_notifier
neutron.openstack.common.notifier.no_op_notifier
neutron.openstack.common.notifier.rpc_notifier2
neutron.openstack.common.notifier.rpc_notifier
neutron.openstack.common.notifier.test_notifier

And in oslo.messaging, we have:
oslo.messaging.notify._impl_log:LogDriver
oslo.messaging.notify._impl_noop:NoOpDriver
oslo.messaging.notify._impl_messaging:MessagingV2Driver
oslo.messaging.notify._impl_messaging:MessagingDriver
oslo.messaging.notify._impl_test:TestDriver

My understanding is that they map to each other as in [1].

So atm Neutron uses rpc_notifier from oslo-rpc, so I'm going to
replace it with MessagingDriver. So far so good.

But then I've checked docstrings for MessagingDriver and
MessagingV2Driver [2], and the following looks suspicious to me. For
MessagingDriver, it's said:

This driver should only be used in cases where there are existing
consumers deployed which do not support the 2.0 message format.

This sounds like MessagingDriver is somehow obsolete, and we want to
use MessagingV2Driver unless forced to. But I don't get what those
consumers are. Are these other projects that interact with us via
messaging bus?

Another weird thing is that it seems that no other project is actually
using MessagingV2Driver (at least those that I've checked). Is it even
running in wild?

Can oslo devs elaborate on that topic?

Thanks,
/Ihar

[1]: https://review.openstack.org/#/c/100013/3/setup.cfg
[2]:
https://github.com/openstack/oslo.messaging/blob/master/oslo/messaging/notify/_impl_messaging.py
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCgAGBQJTnvDhAAoJEC5aWaUY1u57bCcH/3l05eZZob+ZeNJBuDjmURQi
S8p2CCPpMKxXk714Czne9b39+SZaPPH/smyIOObx18aXYcIqKdJzRkB+Ft/ObLB/
2/dc/Vi7vzAIY3at11yXc2g+o0Ix1SmHBz3Jhh4V0x+Zp6U950ZsG75Jm+Mp2E/v
YK6Qy2snSpe2irdkNoTjz+DEK6kSZZvuOE9mLjGttTyMLhk+dWPlPITXu1MZfam1
9b32O22gf06KOePGHu15W7eVJu9M6Z4EyFMAQsZFcc4IgQV4r2hXM2R/x7ER/SHC
Xsug33LJnsu2yWbS1zxSXr9sUVs7ZtDEdmvLUg30BLfOxEICD1L3ygj2uPhsupY=
=NSoq
-END PGP SIGNATURE-

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo][messaging] messaging vs. messagingv2

2014-06-16 Thread Mark McLoughlin
Hi Ihar,

On Mon, 2014-06-16 at 15:28 +0200, Ihar Hrachyshka wrote:
 Hi all,
 
 I'm currently pushing Neutron to oslo.messaging, and while at it, a
 question popped up.
 
 So in oslo-rpc, we have the following notification drivers available:
 neutron.openstack.common.notifier.log_notifier
 neutron.openstack.common.notifier.no_op_notifier
 neutron.openstack.common.notifier.rpc_notifier2
 neutron.openstack.common.notifier.rpc_notifier
 neutron.openstack.common.notifier.test_notifier
 
 And in oslo.messaging, we have:
 oslo.messaging.notify._impl_log:LogDriver
 oslo.messaging.notify._impl_noop:NoOpDriver
 oslo.messaging.notify._impl_messaging:MessagingV2Driver
 oslo.messaging.notify._impl_messaging:MessagingDriver
 oslo.messaging.notify._impl_test:TestDriver
 
 My understanding is that they map to each other as in [1].
 
 So atm Neutron uses rpc_notifier from oslo-rpc, so I'm going to
 replace it with MessagingDriver. So far so good.

So far so good, indeed.

 But then I've checked docstrings for MessagingDriver and
 MessagingV2Driver [2], and the following looks suspicious to me. For
 MessagingDriver, it's said:
 
 This driver should only be used in cases where there are existing
 consumers deployed which do not support the 2.0 message format.
 
 This sounds like MessagingDriver is somehow obsolete, and we want to
 use MessagingV2Driver unless forced to. But I don't get what those
 consumers are. Are these other projects that interact with us via
 messaging bus?
 
 Another weird thing is that it seems that no other project is actually
 using MessagingV2Driver (at least those that I've checked). Is it even
 running in wild?

The idea is that deployments should move over to the v2 on-the-wire
format, but we've never made any great efforts for that to happen.

Part of the issue here is that notifications are consumed by codebases
outside of OpenStack and, so, changing the default to v2 would likely
unnecessarily disrupt some people.

The reason no-one has pushed very hard on a firm deprecation plan for
the v1 format is that the v2 format doesn't yet offer a huge amount of
advantages. Right now it just adds a '2.0' version number to the format.
When we gain the ability to sign notification messages, this will only
be available via the v2 format and that will encourage more focus on
switching over fully.

Mark.


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev