Development Seed Blog

Improved Aggregator for Drupal 7: What's Under the Hood
engineer

An Overview of Its New Features and a Request to Test Drive It

An Overview of Its New Features and a Request to Test Drive It

The patch for an improved aggregator for Drupal 7 is now available on Drupal.org #236237. This code is result of Aron Novak's Google Summer of Code project and it is available as a Drupal project with regular patches against Drupal HEAD #236237. The patch has been out for a couple of weeks, so it's high time to talk about what improvements it aims to bring to Drupal core.

Before I dive into the details though, I'd like to point out that several people requested to break the patch into smaller pieces as it is rather big and touches on more than one functionality of the aggregator. We yet have to work on this, however I do think that there is a value in presenting the proposed improvements as a whole. So here we go.

There are four major differences in comparison to the existing aggregator:

  • Extensible architecture - allows external modules to add or replace functionality
  • Per feed content type configuration of aggregator
  • Replaces aggregator's XML parser with a SimpleXML based parser
  • Replaces aggregator's category system with taxonomy

1. Extensible architecture

This change is the widest reaching of all. At its core, there are the concepts of parsers and processors for aggregator. Parsers download and parse feeds, normalize feed data and expose it to other parts of the application. Processors grab feed data and act on it. For example they create database records for feed items.

In order to define a parser or a processor, one of two hooks need to be implemented:

  • hook_parse() for defining a parser
  • hook_process() for defining a processor

According to the parser/processor architecture, the new structure of aggregator is as follows:

  • aggregator module - implements API and standard download routines
  • syndication_parser module - standard RSS/Atom/RDF parser module that is supposed to ship with core. Can be used independently from aggregator.
  • aggregator.light.inc (part of aggregator module) - this implements a processor that stores feed items as lightweight database records just as the current aggregator does

The implementation of parsers and processors can be seen in syndication_parser module and in aggregator.light.inc. There is also a feed-items-as-nodes implementation in the project version of aggregator for Drupal 7. To my knowledge, the parser/processor architecture was first introduced in Drupal by Ted Serbinski with SimpleFeed, and it also exists in FeedAPI.

Current discussion points around the extensible API are:

Setting Up a Two-Way SMS Gateway with Gnokii and Drupal
coder, sms integrator

Gnokii Sends and Receives SMS Text Messages Using USB or Bluetooth

Gnokii Sends and Receives SMS Text Messages Using USB or Bluetooth

In addition to all of the work being done on the SMS Framework, we have also started researching how to quickly create our own two-way SMS gateway for sending and receiving SMS messages. It is a proof of concept based on needs we are hearing from development agencies. Our solution is based around gnokii, an open source project that can be used to control the various functions of any mobile phone it supports. gnokii sends and receives SMS text messages over a USB or Bluetooth connection with the phone. 

In our setup we’re using a Nokia 6102i mobile phone, gnokii 0.6.8 (installed using Macports) and a MacBook Pro with Bluetooth.

A daemon, written in Python, manages the process of sending and receiving messages and a Drupal module acts as the end point on the Drupal side. The daemon periodically checks the phone for incoming messages and the server for outgoing messages. If a message is found it is processed and passed to the other side.

An outgoing message that originated from a Drupal module will be stored in a queue temporarily. The daemon checks the queue using an HTTP request. When it finds the queued message it connects the phone, sends the message, and clears the item from the queue. Incoming messages are handled in a similar fashion. When a message is first received it is queued on the mobile phone temporarily. When daemon finds the message waiting on the phone, it passes it to the server using an HTTP request and deletes the entry from the phone.

We are making the daemon open source so check out the code in the Drupal CVS repository and let me know if you want to talk about this.

Week in DC Tech: August 4th Edition
Communications Strategist

Facebook, Art and Technology Mashups, and Copyright Law: Another Fun Week in DC Tech

Facebook, Art and Technology Mashups, and Copyright Law: Another Fun Week in DC Tech

August in Washington, DC usually means empty streets, emptier bars, and lots heat advisories. Congress is in recess, Hill staff flee the city for vacations, and everyone else leaves to escape the unendurable humidity. Who knows if it's high gas prices, a delayed exodus, or just the mild weather, but August is off to a different start this year. It's absolutely beautiful outside and looks like it's staying that way for most of the week, and there are a ton of very fun tech events happening all week long. Here's a look at the ones we're most excited about. As always, Ross has a full listing over at DC Tech Events.

Monday, August 4

Dusk

Screen on the Green: Start the week off with a relaxing picnic on the Mall and a flick. This week The Apartment is showing on the giant screen in front of the Capitol Building.

Tuesday, August 5

6:30 -  8:30 pm

CopyNight DC: Copyright law is a huge issue with online content, mostly because it's still far from black and white. Come out to the American Library Association to talk copyright law. This month's discussion will be on Georgia State's E-reserve lawsuit, along with other current goings on in copyright law.

Wednesday, August 6

Noon to 1:30 pm

Facebook for Nonprofits: Curious as to the best way to use Facebook for your nonprofit? Join the teleconference to hear advice from two nonprofits active on Facebook - Amnesty International and the League of Young Voters - and a Facebook rep working with apps and Causes. 

Surviving Information Overload: FeedAPI Mail Watches Your Mailing Lists
Multilingual Engineer

FeedAPI Mail Plugin Lets You Aggregate Your Email With Your News Feeds

FeedAPI Mail Plugin Lets You Aggregate Your Email With Your News Feeds

Keeping up with all the information we get every day is no easy job. We follow hundreds of websites using feed readers and get hundreds of emails every day. If that wasn't enough, there are new sites everyday producing their own streams of information, sites like Flickr, Facebook, Twitter, and probably someone is launching a new one as I'm writing this. We definitely need help to manage all this information, so we use tools like email filters, feed aggregators and readers, and tagging tools.

Just one of the tools mentioned above means one more piece of software or website to deal with. And that means that when we find some other tool that can mix what two tools do into just one, we have at least some hope that the next day we'll have some spare time to do the real work. That's what FeedAPI Mail does for FeedAPI in Drupal -  adds one more functionality to the mix. 

Now we have the first proof-of-concept module for a FeedAPI plugin that adds mailing lists into the equation. With this plugin, you can follow mailing lists and enjoy the same features available for the other content. It treats individual mailing lists as if they were web feeds, allowing the same features for incoming emails as for the rest of the content, including automatic tagging (and geotagging), reading the emails in a single news reader, easy sharing with your team, and so on. Here's a look at it running in our team news aggregator/analyzer Managing News:

This FeedAPI Mail module works together with Mailhandler and FeedAPI, which grabs the rest of the feeds and presents them in a single web interface. In addition it has also a specific mail reader UI that can display threads and authors, which puts single emails in context.

To get started we need a mail account and to set up a mail inbox with Mailhandler so emails are read and made into nodes. Next we need to add a 'Mailing list' and set it up with the mailing list email address so incoming emails can be classified as coming from different lists. Then we just need to subscribe our email address to the mailing list (which may take some manual steps to handle confirmation emails), and we're all set.

What's to Come with FeedAPI Mail

Week in DC Tech: July 28 Edition
Communications Strategist

Come Out to Talk Tech This Week

Come Out to Talk Tech This Week

It's another busy week for techies in Washington, DC with several interesting tech events to choose from. Here's a quick look at the meetups we hope to attend this week. For a full listing of what's going on around town, check out DC Tech Events.

Monday, July 28

8:30 am - 5:00 pm

Maps in Our Lives: This is short notice, but there's an interesting discussion happening today at the Library of Congress about maps. Stop by to see historical maps mixed with new GIS technology and some unique examples of how powerful data can be when it's displayed on a map. 

Tuesday, July 29

12:30 pm

DrupalCon Szeged Session Proposals: Aggregation, Context and Spaces, Messaging and Notifications, and Drupal Talent
Communications Strategist

Vote on the Sessions You Want to See at DrupalCon

Vote on the Sessions You Want to See at DrupalCon

We're getting excited to come over for DrupalCon Szeged in just over a month. This will be the fifth DrupalCon that Development Seed has attended, and it always amazes me how much these conferences show off just how fast this community is growing and how far Drupal has come as a platform. We've looking forward to talking about some of our latest work to add and refine functionalities to Drupal. Here's a quick summary of the sessions we've proposed to lead. If you're interested in these topics, please vote for them!

Spaces and Context Modules: Tools for Site Building: The Context and Spaces modules are two relatively new tools in Drupal's aresenal that make it easier to build complex websites. In this session, Jeff Miccolis will talk about both modules' approach and show developers how they can be used and extended. He'll also show some examples of the modules in use on community portals, sites-within-sites, and intranets. Vote here.

Messaging and Notifications Frameworks: At DrupalCon Boston, Jose Reyero introduced the beta versions of these frameworks. A lot has been done to improve them since, and in this session Jose will talk about the upgrades, specifically in how they handle subscriptions, notifications of events, and the various delivery methods for sending messages. Another focus of this session will be to discuss the shift way from email only delivery methods to multi-platform methods. Vote here.

A New Aggregator for Drupal 7: Drupal's core aggregator is getting a revamp in Drupal 7. In this session, Aron Novak and Alex Barth will talk about why this step is needed and what you can expect from the new core aggregator. Aron began this work as a Google Summer of Code project last summer and this summer has continued to finetune it. The result is a simple yet extensible and efficient architecture that should serve Drupal well. Vote here.

Attracting and Retaining Drupal Talent: At the rate Drupal's popularity is growing, we're finding that there just aren't enough developers to meet the demand. Web shops and organizations are coming up short in finding the Drupal talent they need to build and run the online tools they want. This session will look at ways to beat out the hiring competition to find and retain Drupal talent. Eric Gundersen will talk about how Development Seed has grown our team, and Kris Krug from Raincity will share his experiences and lessons learned.

You can vote on all the sessions (including BoFs) you want to see at DrupalCon Szeged here. See you in Szeged!