Architectural Use Case: Rules Interaction Across Sites

Events happening in the community are now at Drupal community events on www.drupal.org.
eric__'s picture

I have a question about rules operating across entirely separate Drupal 7 sites.

I am designing a client's application as N (N < 6) separate Drupal 7 sites for perforamnce, scalability, and security reasons. Traditional Muliti-site is not an option as they need the option to place different sites on entirely different servers. (see footnote) The sites are linked by 1) pushing content via the Deploy module (i.e. a backend 'publishing' workflow), 2) Single Sign On (with e.g. the Bakery module), and 3) shared business logic.

I believe this can be achieved by using a ruleset to add content or an Entity and push that to other sites. However, I would appreciate any comments on whether this is feasible and on any problems with this method.

Site A needs to run a rule on site B:
On site A: a ruleset 1) does work [optional], 2) creates content: "ruleTransmittal", 3) pushes ruleTransmittal to site B;
On site B: rule triggered on creation or update of ruleTranmittal; does work on site B.

The ruleTransmittal would contain pertinent details about the rule and the content it is acting upon. A small part of the beauty of this that the ruleTransmittal is self-logging. The ruleTransmittal can either be a content type or entity.

I can envision one significant caveat. If a user has not logged into site B, certain types of SSO such as Bakery, will not have created a user. While we could create the user, this could interact badly w/the SSO.

Anyway, does this look OK / acceptable? Thank you for your time.

Eric

Footnotes
1: The reasoning behind this decision is that the client manages publishing, a membership organization, affiliate membership orgs, as well as their own internal operations. All told, the entire application consists of some 20+ roles that needn't contribute to the 'role/permissions multiplication' nightmare, or to the associated risk of misconfiguration or privilege escalation. Unlike a multi-site, this can all run on one host as vhosts, or on e.g. six entirely separate N-tier hosting systems.

Comments

SOA / Service Integration

eric__'s picture

I just finished reading some of the pertinent parts of "Event-Condition-Action rules for distributed content management" available at http://wolfgangziegler.net/thesis. That seems to indicate that Rules can operate within RESTful service architectures. By extension, this ought to enable chaining rules from site to site.

Of course, this isn't definitive. Any other comments while I set up testing would be appreciated.

Eric

Problematic, as far as I know

itangalo's picture

As far as I know, the web hooks in Rules don't work 100%. I have tried to use them, but haven't managed to get anything working. (I also think you need to write code to make use of them at all – there is no config that you can just start using.)

It would be interesting to know if you manage to get this working – my feeling is, like yours, that this should definately be possible with Rules. If the web hooks work.

Thank you

eric__'s picture

Thank you Itangalo. I've quite enjoyed your screencasts, find them immensely informative so I'm both thankful you've responded and disappointed with the answer. However, I've been even more disappointed in my inability to get the Deploy module working in my set-up; so pushing rules is, at the moment (12/10/11), rather moot.

I am building the above mentioned site as separate sites, relying on a Feed, and will use Deploy when it has a full release. In the mean time, I will test and report back to this thread on using a "when content is created" rule as a workaround.

Eric

Best of luck

itangalo's picture

Sorry to hear that the Deploy module isn't working as you want it to. Feeds is a good module, though, so don't be sorry you're stuck with that one. :-)

Best of luck with your site building,
//Johan Falk

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: