Skip to main content
Senior Developer
Feb 04, 2010

At Pronovix we've been thinking about distributed service systems. I was asked to do some background/proof of concept research, and after one day, here is the first experimental module, called remote blocks. The first thing what I want to say about this module, is that the access control is currently omitted, because I haven't find a really easy and clean way to do it (something what works in 5 minutes). On the first screenshot, you can see the module's admin interface in my Drupal sandbox.

Currently there isn't so much setting here. But here you can enable the server mode, so that other sites where remoteblocks are enabled, can pull data from your site. It can be a better solution to refactor this functionality to a different module, but now it is OK.
This is where you can add block to your site. If your JavaScript is turned off, then you will have 3 textfields (URL, module, delta). If JavaScript is on, then it hides the module and delta textfield (as you can see on the screenshot), and based on the URL, it asks the remote block server of the available modules and deltas.
As you can see, it is really easy to set it up. It may makes sense to remove completely the module part, and put all available delta into one list, but this is rather an usability issue than a technical one.
After you have added the block, you can edit or delete it under the "List" tab. The delta is represented by a number, because currently I don't store the $block['info'] in the database.
If you go the admin/build/block page, you can see the new block.
This is where the remote block is enabled, and it fetches data from a different site (in this screenshot actually it fetches from the same site, because I was lazy to set up a new site). I hope that I can do some further experiments in this exciting new area. The module is published on Drupal.org: http://drupal.org/project/remoteblocks

Tamás is responsible for the development and design of custom Drupal modules and back-end solutions. He's a self-taught programmer, with his main focus on Drupal, Go and iOS development. Besides programming languages, he's interested in distributed computing, computer graphics, image processing and security. He has a couple of contributed modules on Drupal.org, and he completed the Summer of Code at Drupal in 2010 and 2011. His bigger projects at Pronovix include participating in Drupal Gardens development, helping to create sites for Warner Music Group, Pfizer and Florida Hospitals. He did performance optimizations on Qatarliving. He's one of the main contributors to the Brightcove module used by large Drupal sites worldwide.

Newsletter

Articles on devportals, DX and API docs, event recaps, webinars, and more. Sign up to be up to date with the latest trends and best practices.

 

Subscribe