Description: This is a module intended for developers that want to use a message broker in combination with drupal. It allows you to send and receive messages without caring about the underlying technical challenges.
Possible use cases include synchronizing drupal sites, integrating external systems, implementing distributed business logic or seperating heavy processing tasks from your normal drupal requests.
Project page: Message Broker
Repo: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/sirup/1807310.git message_broker
Intended for Drupal 7
Similar modules
There are two similar modules: RabbitMQ and AMQP. This are the differences:
- both modules are tied to amqp, this module is more generic and would allow to plugin other protocols like STOMP (the dummy module proves that this is already possible)
- this module stores the routing configuration in simple json files, allowing to reuse the file in other non-drupal applications (which is essential in many distributed systems)
- we allow to test AMQP messaging in-memory via our unique dummy module
- amqp module in detail
- the module is only available for Drupal 6.x
- it adapts the Drupal Queue interface, which has its advantages but also throws away the power of the AMQP concepts: AMQP allows much more powerful things than queuing
- even the queueing implementation is not finished, because the drupal queue interface can not be mapped easily on the AMQP concepts
- besides the name, it actually uses the RabbitMQ product directly via a http interface that is not available when using other amqp products
- rabbitmq module in detail
- the module also adapts the queue interface from drupal with the same limitations
- not usable in combination with non-PHP systems or legacy systems as it has many assumptions about the structure of messages and exchanges
Conclusion: Both modules do provide only queuing functionality on top of Drupals queue interface. In contrast this module is a full messaging solution that could be used for queueing, but is not limited to this use case. See the project page for more examples.
In fact the module names are misleading, because the amqp module is tied to rabbitmq and the rabbitmq one is more generic than the name states.
Reviews of other projects
http://drupal.org/node/1840698#comment-6739492
http://drupal.org/node/1842792#comment-6744726
http://drupal.org/node/1840692#comment-6739522
http://drupal.org/node/1842792#comment-6741930
http://drupal.org/node/1882080#comment-6915780, http://drupal.org/node/1882000#comment-6915796 and http://drupal.org/node/1877836#comment-6915840
http://drupal.org/node/1880120#comment-6915908
http://drupal.org/node/1889164#comment-6942104
Thanks in advance
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | coder-results.txt | 6.96 KB | klausi |
| #5 | amqp-consume.png | 34.41 KB | sirup |
Comments
Comment #1
sirup commentedOne note to the http://ventral.org/pareview/ script: There seem to be many false positives which pop up when analyzing this modules code. For instance it does not recognize nested sub modules.
Comment #2
dDoak commentedHi,
A lots of work have to be done according to this report :
http://ventral.org/pareview/httpgitdrupalorgsandboxsirup1807310git ?
Manual review :
A great idea to place configuration in json.
Why not using drupal autoloader? DB calls?
For example :
If you add this in dot info file:
files[] = message_broker_exception.incThis function will become useless :
In message_broker_amqp_integration module, files are not correctly named (prefixed with module name) : amqp_message_broker.inc
Comment #3
sirup commentedI didnt knew that the Drupal autoloader does not issue a DB call when the file is listed within the .info file. I will try and change it.Update: my asumption was true, the drupal autoload uses a database table to autoload classesThe reason for the seperate method was that we were required to throw the exception even when the database connection was lost. This may occur when you run an AMQP consumer via drush for a long time. The standard behavior of mysql is to kill the connection after a large amount of idle time.
Will fix the other problems the next days.
Thanks
Comment #4
sirup commentedI fixed all Coder fixes and warnings except the following false positives:
Furthermore i re-added the helper method message_broker_integration_throw_critical_error and explained in the comment why: It allows to create the exception instance even when the DB connection was lost. Therefore we cant rely on Drupals autoloading which reads from the registry_files table.
Comment #4.0
sirup commentedcompare this module with similar ones
Comment #5
sirup commentedReviewing this module is a bit difficult, because it requires to install external libraries and third party software. Therefore we have written a step-by-step list which explains how to test the two modules:
Message Broker Dummy Integration module
Message Broker AMQP Module
sites/all/modules/message_broker_integration/modules/message_broker_integration_example/example_config.jsonThis should ease the review hopefully.
Comment #5.0
sirup commentedfix typos
Comment #6
sirup commentedadding review bonus tag
Comment #7
grisendo commentedThere are still many line indentation errors.
i.e.: message_broker_amqp_integration.install, line 28: ERROR | Line indented incorrectly; expected 4 spaces, found 6
There are also some strings form_set_error messages without t():
i.e.: message_broker_amqp_integration.module, lines 178 and 186.
Removing review bonus tag, after fixing you can add it again if you have done another 3 reviews of other projects.
Comment #8
sirup commentedThere are still many line indentation errors.Please read all posts carefully before raising issues discussed already above. See comment #4.
Following other reviews i re-add the tag as the removal requires an in-depth review. Therefore please try to use the module and follow the steps given above to test all functionality. Small formatting issues are not cricitical and are no reason to set the state back to "needs work".
Comment #9
grisendo commentedI made a in-depth review, I followed all the steps and tested both Dummy and AMQP, and everything went OK for me. So I started to try security hacks, and check code line by line...
I also read all previous comments, so I didn't say anything about that false positives you say.
I just informed about that two lines with the extra spaces, that are not part of your "false positives".
The reason I change back to "needs work" and removed "pareview: bonus review" tag is because you didn't use the t() function in that form_set_error messages:
http://drupal.org/node/1187664
Otherwise, you can wait for days to a git admin that will review the project and ask for that changes... and wait more days for the git admins to re-review your project.
Comment #10
sirup commentedI followed all the steps and tested both Dummy and AMQP, and everything went OK for me.Great!
The reason I change back to "needs work" and removed "pareview: bonus review" tag is because you didn't use the t() function in that form_set_error messages:Ok. This is fixed now.
If nothing else popus up, we can switch to "reviewed & tested by the community" :-)
Comment #11
sirup commentedremove tag that was added accidently
Comment #12
sirup commentedComment #13
sirup commentedupdate priority
Comment #14
monymirzaWhat about errors/warnings pending at http://ventral.org/pareview/httpgitdrupalorgsandboxsirup1807310git ?
please follow drupal code standards.
Comment #15
sirup commented@monymirza: Please read the whole issue before posting comments!
Sorry, but these are false positives. This is an automated tool, so its not uncommon to have warnings and errors that are not relevant or simply not true.
Comment #16
sirup commentedraising the priority as no review was done for more than four weeks
Comment #16.0
sirup commentedadd links to reviewed projects
Comment #16.1
sirup commentedadd more code reviews
Comment #16.2
sirup commentedadd link to anther comment
Comment #17
sirup commentedadding review bonus tag
Comment #18
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
So since the XSS exploit can only be triggered with the "administer site configuration" permission this does not qualify as security issue per http://drupal.org/security-advisory-policy . The rest is not a major blocker either, so I guess this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #19
klausiNow actually removing tag,
Comment #20
sirup commentedThanks for the review!
1. Renamed all modules.
2. Fixed the security problem.
Comment #21
stborchertBtw., please update your account to a personal profile. At the moment it is not clear who is behind http://drupal.org/user/2321604.
Comment #21.0
stborchertadd the third comment
Comment #22
sirup commentedThanks for the hint. I've added the full name.
Comment #22.0
sirup commentedfix grammar
Comment #22.1
sirup commentedchange module name in summary
Comment #23
sirup commentedFixed coder warnings (and ignoring some of the false reports) and started to work on more features (a new drush command).
Comment #24
klausino other objections for more than a week, so ...
Thanks for your contribution, sirup!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #25.0
(not verified) commentedadd link to a review