Networked dhttp
When you point a browser at a local instance of dhttp, you can pretend that you’re running a purely local application. It doesn’t matter whether you’re online or offline, and this offine capability is one of the unique strengths of the local-web-server technique. But dhttp really is an HTTP server, so if you’re connected to the office LAN or WAN, your colleagues can use your plug-in apps just the same way you do. In other words, a network of dhttp nodes is a peer-to-peer network.
This peer capability is so general that it takes a bit of getting used to. Suppose you and I each run an instance of dhttp, and we each maintain our own private database of contacts—mine on machine my-dhttp, and yours on machine your-dhttp. Table 15.2 shows the matrix of possibilities.
Table 15-2. Peer-Networking Matrix
Operation |
Browser |
URL |
---|---|---|
I use my database. |
mine |
http://my-dhttp/sfa_home |
I use your database. |
mine |
http://your-dhttp/sfa_home |
You use your database. |
yours |
http://your-dhttp/sfa_home |
You use my database. |
yours |
http://my-dhttp/sfa_home |
Why wouldn’t we both simply use another machine, visible to both of us? We could, that’s another option. Nothing prevents you from deploying dhttp on a conventional shared server. For light-duty intranet applications, its single-threadedness isn’t a problem. And sometimes a shared data store makes the most sense.
Won’t the use of a central server cripple our ability to use local data and to work offline? Not necessarily. ...
Get Practical Internet Groupware now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.