developer.com
Search EarthWeb
CodeGuru | Gamelan | Jars | Wireless | Discussions
Navigate developer.com
Architecture & Design  
Database  
Java
Languages & Tools
Microsoft & .NET
Open Source  
Project Management  
Security  
Techniques  
Voice  
Web Services  
Wireless/Mobile
XML  
Technology Jobs  

   Developer.com Webcasts:
  The Impact of Coding Standards and Code Reviews

  Project Management for the Developer

  Defining Your Own Software Development Methodology

  more Webcasts...




See the Winners!


Developer Jobs

Be a Commerce Partner
Data Center Solutions
Corporate Gifts
Rackmount LCD Monitor
Computer Hardware
Holiday Gift Ideas
KVM Switch over IP
Computer Deals
Web Hosting Directory
Promotional Pens
Shop Online
Domain registration
Promotional Gifts
Online Universities
Car Donations

 
 
Search
 



Developer News -
SaaS Tool Offers Custom Database Development    May 9, 2008
Microsoft’s Automated Agent: Can We Talk?    May 7, 2008
Borland Finally Sells CodeGear    May 7, 2008
Red Hat Heads For The JON 2.0    May 7, 2008
Free Tech Newsletter -

Serve your customers, not your servers, with VERIO FreeBSD VPS. Click here for your full-access, test-drive.

The Gmail email client
By Robert Bernstein

Go to page: 1  2  3  Next  

An MUA (Mail User Agent) featuring an innovative approach to email message storage is now under development, and it bodes well for those email users who number their messages in the thousands. Gmail (http://gmail.linuxpower.org/), the brainchild of Wayne Schuller, a young Australian programmer, uses the MySQL database server, and retrieves, sorts and displays messages via SQL, the well known "Structured Query Language." It became possible to develop Gmail as an Open Source project when, earlier this year, MySQL changed its licensing to the GNU GPL. Schuller is a advocate: "I'm a big supporter of the GNU project and the importance of GPL licensing; that pushed me in the [direction of] Gnome two years ago." (He also reminded this reviewer that Gmail is not the only MUA using a SQL database; Pronto (http://www.muhri.net/pronto/), written in Perl, is very much a going concern.)


Gmail in "three pane" mode. (Click here for larger image)

It isn't hard to accumulate thousands of email messages. If one makes some careful choices among the myriad mailing lists that abound across the Internet, messages by the hundreds will pour in daily, and add up to thousands as the days go by. Given that hard drive space has become quite inexpensive, anyone can now create their own archives of lists that are of interest to them. If you've ever struggled with those online "searchable" archives of email lists, accessed with a web browser, then you can appreciate how such personal archives can have a use, sometimes a life-saving use, if the solution to a quandry can be quickly found because those archives were created and maintained.

Gnomes, Trees, and Queries

Storing thousands of pieces of information in a fashion that permits easy retrieval is a task computers have always been eminently qualified to undertake. Over the past ten years or so the development of computer databases has converged on SQL as the preeminent tool for manipulating the contents of these vast warehouses or "mines" of data. SQL is common to practically all the major commercial database products. The historical timeline stretches from origins in the Ingres and Postgres databases and forward to the current Open Source incarnations of PostgreSQL and MySQL. Gmail takes advantage of this mature technology to "nail down" the software requirements for storing, sorting, and viewing thousands upon thousands of messages.

Like many Open Source projects, Gmail began as a way to learn programming in a particular environment, in this case, the Gnome graphical desktop. In keeping perhaps with the trend set by pine and elm, several MUAs written for the Gnome desktop have adopted names of trees, such as Balsa, Spruce, Mahagony and Eucalyptus. Initially Schuller wanted to join the Balsa project, already well underway:

"The project [Gmail] allowed me to learn how to code in gtk and the gnome technologies. I did want to contribute to Balsa, but after many hours effort I found I couldn't really understand the code. Starting from scratch allowed me to learn all the gtk/gnome stuff."

Although still very much in "beta" phase, Gmail is already on its way to becoming a full-featured email client. For receiving mail it supports POP downloads from multiple mail accounts. APOP and IMAP have not been added yet, but APOP accounts can be utilized via a combination of fetchmail and a POP server (for instance qpopper) running on the local host. There is drag and drop support for utilizing the Gnome addressbook to manage email addresses. Messages stored in the MySQL tables can be exported to a standard Unix mbox file format, and, as noted, Unix inbox spool files can be read into Gmail with a POP server. Sound events can be configured via the Gnome Control Center, and printing is provided by the Gnome-Print facility. For users of dialup connections, outgoing messages can be composed offline and queued for sending later. Just in the past month or so Gmail's mime support has made great strides. For the true "hacker" (not to be confused with computer security vandals) Gmail's user interface can be custom tuned with a little proficiency in the use of Gnome's "glade" facility.

Virtual Folders: Mileage Out of SQL

Despite this impressive list of features, Gmail's real strength, what sets it apart from the pack, is its use of SQL queries to create and maintain "virtual folders." Many email clients have built-in facilities for sorting incoming mail into various "folders," or separate files according to rules defined by the user. The old Unix workhorse for this purpose, procmail, is still widely used, but many newcomers shy away from procmail due to "regex phobia," fear of the arcane syntax used by the "regular expressions" that make up procmail's rules for sorting.

For users who need only a few folders, and don't anticipate accumulating thousands of messages, a few separate "folder" files will not present any problems. But for the industrial strength email list addict (or anyone else who finds it necessary to shepherd thousands of messages) these separate files soon become both numerous and large, factors which make the work of backing up or archiving messages increasingly tedious. At a certain point the diminishing returns of the file folders method become apparent, and it makes more sense to maintain (and eventually archive) *one* file that contains all the messages received in a certain period of time. Instead of individual files ("folders") containing the messages of each email list (or subject, or sender, or whatever criteria are used to define the folders...more on which later) Gmail creates virtual folders which are simply SQL "views" of the message database. From Gmail's User Guide:

"It's main feature is the powerful vfolder mechanism. Imagine all your emails are sitting in the one big folder, but you can look at it in different ways (queries). These queries happen at run-time. So you can have a virtual folder (vfolder) which gives you all messages with 'ham' in the subject. And you can have another vfolder which gives you all messages with 'pork' in the subject. And if someone sends you a message with 'pork and ham' in the subject, it will appear under both queries!"

No new files are created, but from the user's point of view, these virtual folders appear to be identical in appearance and use to those that are based on a set of individual folder files. When it comes time to archive the MySQL tables (two are used) that hold Gmail's messages, one has the option of exporting the tables to an mbox format file. Then all sorts of possibilities are open, such as indexing that file with a tool like "glimpse" (http://www.webglimpse.org), or compressing it with either gzip or bzip2 and then using grepmail (http://grepmail.sourceforge.net) to read out messages matching a given condition or set of keywords. Or, other MySQL tools can be utilized (or created!) to access and retrieve messages directly from the tables. The use of MySQL tables means the keyword for Gmail's message storage is: power.

Go to page: 1  2  3  Next  

Previous article: New Email Clients: An Introduction


Tools:
Add www.developer.com to your favorites
Add www.developer.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed


Open Source Archives

Whitepaper: XML Processing in Applications--Take the Next Step
Generate Complete .NET Web Apps in Minutes . Download Iron Speed Designer today.
Whitepaper: Embeddable Content Platform for OEM's
Flash Demo: Learn how IBM Information Server Blade is easy to manage, highly scalable and efficient.
Whitepaper: Enterprise Information Integration--Deployment Best Practices for Low-Cost Implementation



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES