Setting up a “feedhose” server

A few days ago I did a quiet launch of feedHose.root to a very small number of users.

It’s ridiculously easy to set up a new feedHose client, at least for the Hacker News hose, which is our canonical demo. You just install the tool from the Tool Catalog page, and choose Open Hacker News from the feedHose sub-menu of the Tools menu. A window opens and as soon as there’s a new item in the Hacker News feed, it displays in the window. I leave mine open on my second monitor and can always see out of the corner of my eye if there’s something new.

How to set up a server

Now, to the more interesting task of setting up a feedHose server. It’s more interesting because it involves script writing, but it’s very simple stuff.

1. We’re going to set up a hose that distributes links to NY Times stories.

2. First, decide what name to give your hose server. I call mine Whatever you decide, go to your domain registrar, and point that domain to the server that feedhose.root is running on.

3. On your server, bring feedHose.root to the front, and open feedHoseSuite. Open the utilities table and you’ll see a script there called setupTimesHose. Double-click on the wedge next to its name to open the script. Click on the Run button. It will ask for the name you’ve chosen. Enter it and press OK. At this point you have a feedhose server running. You can test it by entering this URL, replacing my domain name with yours.

4. Bring config.root to the front. Navigate to feedHose.server.hoses.nyTimes. Expand it. You should see four items: calendar, condition, prefs and stats. condition is a script. We’re going to edit it, so open it.

5. Read the script, especially the comment. Since the script unconditionally returns false, the hose as it’s currentlly set will distribute no items. We’re going to change that.

6. Add the following code, just before the return (false) statement:

  local (url = string.lower (nameof (adrfeed^)))
  if (url contains “nytimes”) or (url contains “nyt/mostrecentheadlines”)
  return (true)
  Here’s a screen shot of what the script should look like.

7. Click the Compile button at the top of the script.

8. Very important. The hose is hooked into the flow of items coming into your River2 installation. It will look at every item that comes in. You must be subscribed to at least one feed from for anything to show up in your hose. Don’t worry about duplicates, the code takes care of that and won’t send an item across two or more times.

9. That’s it. Your hose server is running and will return stories from the Times.

How to set up a client that listens to your server

Okay. If a tree falls in the forest but no one is there to hear it, what’s the big deal?

We have to set up a listener to see if your hose is working.

1. Hopefully you have another machine to play with. Your desktop computer or laptop would be fine. Install OPML if it isn’t already running. Install feedhose.root. Bring feedhose.root to the front. Open the utilities table in feedHoseSuite.

2. You should see a script there named watchTimesNews. Open it and run it. It will ask for the domain name of your feed hose server. Enter it and click OK. A window should open.

3. Leave the window open for a while. It may take a bit of time before there’s a new story. That’s how it goes in the new business.

That’s it for this tutorial. This is a programmer’s feature, so from here, what you want to do with this is up for innovation. You can create communities in hoses, where everyone in the community can post items to the windows on everyone else’s desktop.

I’m pretty sure this technology, which is basically the same as the instant outliner, using long-polling, will hold up pretty well. I guess we’ll find out!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: