Skip to Content
Practical Internet Groupware
book

Practical Internet Groupware

by Jon Udell
October 1999
Beginner
521 pages
15h 28m
English
O'Reilly Media, Inc.
Content preview from Practical Internet Groupware

Replicating Data

Like all web applications, the Jobs module’s API can be used programmatically as well as interactively. We can imagine a web-client script that would replicate data across multiple dhttp nodes. It would perform the following steps:

  1. Invoke each instance’s viewer.

  2. Parse the resulting HTML table.

  3. Build a master data set.

  4. Create and invoke the update URLs needed to transmit the newest version of each record to each node.

That’s doable but tedious. Not because it’s hard to fetch and parse the data—it’s actually trivial to convert an HTML table into lists and hashtables. What’s tedious is building the fetch and update URLs. Each plug-in exports its own unique web API, so scripts that use those APIs are hardwired to each plug-in.

What if we were to turn dhttp into an SQL server? The public function do_engine_sql( ) shown in Example 15.7 does just that. It accepts a URL-encoded SQL query, and returns a result set formatted as a list-ofs. Amazingly, in just 25 lines of Perl, this function transforms a Windows PC into a low-intensity database server. Suddenly the ODBC interface and the Jet engine—components that exist on a vast number of desktop machines—can export SQL capability to local or remote web clients.

Example 15-7. Turning dhttp into a Lightweight SQL Server

sub do_engine_sql { my ($args) = @_; my ($argref) = Engine::PrivUtils::getArgs($args); my ($st) = Engine::PrivUtils::unescape($$argref{st}); my ($conn) = Engine::PrivUtils::unescape($$argref{conn}); my ($dbuser) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

How to Develop a Great Digital Strategy

How to Develop a Great Digital Strategy

Jeanne W. Ross, Cynthia M. Beath, Ina M. Sebastian
Are You an Authentic Leader or an Authentic Jerk?

Are You an Authentic Leader or an Authentic Jerk?

Hannes Leroy, Michael A. Daniels, Kristin L. Cullen-Lester, Alexandra Gerbasi
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 1565925378Catalog PageErrata