WebDAV walkthrough from Creare

Original URL: http://rbnb.creare.com/rbnb/WP/RBNB_WebDAV_WalkThrough.html

RBNB V2.0 WebDAV Interface

Getting Started: A Walk Through

March 3, 2003

This is a walk-through to introduce new users to the RBNB WebDAV interface.  It starts from the point where you have downloaded and installed the RBNB WebTurbine package.  This is an evolving document that is expected to be further refined over time.

1) Start WebTurbine

Use the desktop icon or command-line per download instructions to startup the delivered Tomcat-based web server.

2)  Visit the WebTurbine Home Page

With a browser, go to URL localhost:8080.  You should see a WebTurbine welcome page.

3) Start RBNB Server

Click on the rbnbServer link, then click ‘Start Server’ using the default entries.  This should launch an RBNB server on your local machine. (It should be possible to start the RBNB outside of Tomcat and have it work, but this way ensures Tomcat is running and makes launching RBNB easier for first time users).

4) Review RBNB Content with Browser

With your browser, go to URL localhost:8080/RBNB.  You should see a “folder” entry of “Server”.  Click it.  You are now looking at the local RBNB sources, which by default should include “_Metrics” and “_Log”.  Go in the _Log directory, and click one or more items to see if you can retrieve the text log messages.

5) Mount RBNB as WebDAV File System

Now lets try to mount the RBNB/WebDav server as a file system.  In all cases, the <RBNB-URL> will be of the form “http://your-machine:8080/RBNB” (“localhost” may or may not work).

On a PC, do one of the following:
a) From Internet Explorer, choose File/Open…  Click “Open as Web Folder”. Enter the <RBNB-URL>
b) From the Windows File Explorer (on XP), select “Map Network Drive” and enter the <RBNB-URL>

On a Mac, do one of the following:
a) From the Go/Connect to Server pull-down and type in the <RBNB-URL>
b) From a command line, using mount_webdav:
mount_webdav <RBNB-URL> /Volumes/RBNB (or whatever mount point you want)

Confirm the file system is mounted using standard File Explorer or other interface.

On PCs, the IE “Web Folder” is a GUI that lets you drag and drop content, but does not mount a true file-system interface available to other applications.  The “Map Network Drive” option is only available on XP, and must use the standard web server port 80 (not 8080).  Edit the Tomcat server.xml file to change this. Third party WebDAV filesystem clients for various Windows OS are also available.

Under some circumstances killing Tomcat while an RBNB WebDAV is mounted leaves an orphaned filesystem that is difficult to unmount.

6) Create RBNB Source and Channel via WebDAV

From a command line shell, go to the mounted filesystem, create a folder (new source), and create a data channel. (Here, Unix syntax is used, but equivalent PC/DOS commands will work).

$ cd /Volumes/RBNB/Server
$ mkdir foo
$ cd foo
$ echo hello > c@t=1
$ cat c
$ echo world > c@t=2
$ cat c@t=1
$ cat c@t=2
$ cat "c@t=1&d=2"

The @timestamp “munge” has 3 main keys, separated by the ‘&’ symbol, e.g:


t: timestamp (seconds)
d: duration (seconds)
r: reference (oldest | newest | absolute)

The default with no-munge is simply "t=0&d=0&newest".  If a time is specified, the default reference is “absolute”. Absolute time is seconds since midnight Jan 1 1970 GMT. On write, “newest” means current time of day.

Quotes around the filename-with-munge are not always necessary, but depending on the OS may be required because of the treatment of the special ‘@’ and ‘&’ characters.

With RBNB V2.0, all channels put to RBNB must have increasing timestamps.  Thus, you can’t put in a@t=2 followed by b@t=1.  This changes in a future release, where we use independent RBOs for every channel (vs one for each source).  In many cases it is best to simply use automatic time-of-day timestamps for data sources.

Most file systems and web browsers try really hard to cache content.  This means after you ask for the default “newest” data from file “x” once, you may keep getting the same (cached) value even if newer data is available.  One simple work around for this is to use an (otherwise meaningless) increment, as in:

$ echo 1 > x
$ cat x
$ echo 2 > x
$ cat x
$ cat x@i=1
$ echo 3 > x
$ cat x@i=2
$ cat x@d=99

7) User Other Applications to Create and View Content

After creating some channels via the file system interface, try reviewing them with other applications:

  • File Explorer or equivalent
  • Web browser (http://localhost:8080/RBNB)
  • RBNB Admin program (rbnbAdmin)

Open an rbnb file (channel) using Notepad or other text editor.  Save the result.  Review the earlier and most recent versions via the file system:

$ cat myfile.txt
$ cat myfile.txt@r=oldest

Use rbnbChat to send messages, then look at the messages via the file system or browser.

The RBNB WebDav interface does not yet fully support file copying/renaming/deleting.  Some applications do a save-to-temporary file then move it to the real name.  This may fail and/or strand RBNB channels of the temporary names.

8) Mount the RBNB WebDAV as File System on Other Machines

Mount the RBNB as file system from other machines:

  • Web Folder, part of MS Internet Explorer
  • “Map Network Drive” via Windows XP File Explorer
  • davfs for Linux (standard with Mandrake Linux, available for others)
  • WebDrive for windows from South River Technologies
  • WebFile Client from Xythos

Each of these other WebDav-as-Filesystem clients has its own quirks.  For example, the XP map network drive will not recognize a port, so you have to run your Tomcat at port  80.  To do this, edit the jakarta/config/server.xml file, and (if Unix) run the tomcat server as root.

9) Publish Conventional Files via rbnbFolder

Use the rbnbFolder PlugIn (available as a link on the RBNB Welcome web page) to point to a traditional file folder on your hard drive.  See these reflected as RBNB channels via the WebDAV interface.  Note how this lets you intermix “real” files with RBNB content as seen by web browser and other clients.

10) Route RBNB Servers Together

Connect RBNB servers in parent/child routed connections.  Peruse content from remote servers via the WebDAV interface to your local machine.  Try using the RBNB PlugIn rbnbFolder to “publish” remote (real) file content.

You can only create new folders on the server to which you are directly connected.  This is because your WebDAV interface is the “source” for locally created content, and your local WebDAV server does not have direct rbnb source connections to the remote servers.  Put another way, you have write privilege locally and read-only privilege to remote/routed servers.

11) Create Virtual Data Processing Channels

This exercise sets up a more sophisticated scenario similar to the on-line demo at http://rbnb.creare.com/rbnb/rbnbWeather.html.

a) Start an RBNB server using default settings
c) Start the PNGPlugIn using default settings
d) Start rbnbSource, connect to RBNB, click Start
e) Start a Virtual Source Plugin with Origin: “PNGPlugIn/rbnbSource”
d) Use your web browser to look at the resulting PNG plot, e.g:


e) Review the resulting files and folders via the WebDAV file interface.

Note that this demo creates a streaming data source that you can repeatedly read via any application that can be set to continuously open/read the associated URL or WebDAV file.

Open Source DataTurbine Initiative © 2017 Frontier Theme