Author: jonathanb

  • What Dat?

    Scraping the web for cheap transfer of database content to web pages, I got stuck on the number of products with the name WebDB, many essentially running something like SQLite backed by web local storage…. one of them drives Beaker Browser, a peer-to-peer web browser using DAT built upon Electron. The rabbit hole along my search to find a corporate IT alternative surfaced into a hacker community. So, what are DAT and peer-to-peer browsing?

    Share…. FTP or BitTorrent ish

    Dat is a peer-to-peer file-sharing protocol that builds a distributed directory to publically readable filesystems. There is a Node command-line implementation to share and clone directories and a NPM package for programatic access. Dat is similar to BitTorrent, but it’s lighter-weight, since Dat clients can choose to download and share portions of filesystems. The requirements are so minimal that Dat can even run from my Chromebook after a minor configuration twiddle and installation of python2, gcc, et al…. via pkg from Termux.

    The Dat Project has a tutorial to install Dat and install files. The TLDR; is

    • use npm to install dat (repeatedly until you satisfy all the gyp requirements),
    • run dat create to share a directory,
    • populate the directory with your stuff,
    • and run dat clone to access the directory elsewhere.

    If you want your files to persist beyond your terminal session, HashBase will host your data, the first 100MB is free. There’s a Dat podcast, DAT;Cast, with Dat enthusiasm and events from January 2018 onward.

    Interface…. _Browser_

    Dat ships with a web server, just run “dat sync –http“. More generally, running dat-gateway will bridge content to your browser, but now we’re back to server land. Beaker Browser merges a Dat node with a web-browser.

    What makes this a happy marriage? Along with providing basic editing tools, Beaker provides Dat to its rendered web applications. Without Beaker, a web app’s I/O is limited to HTTP or Websockets, which require a third-party adaptor (e.g. dat-gateway). I’ve failed at using a couple of Websocket-based approaches, much of the browser support is out of date, so I’d advise starting with Beaker or dat-node.

    Sadly, Beaker won’t run on most Chromebooks anytime soon. Beaker is built on Electron, which runs poorly on Google’s high-end PixelBook (only in development mode?), but not on lesser Chromebooks, and the Electron team turns away requests to accommodate Chrome OS. So this next step requires a lap or desktop computer…..

    How Dat…. A Sample P2P App

    Here’s a simple peer-to-peer application to support consensus: Cahoots! The basic idea is that each voting-bloc member controls and publishes her own ballot containing her opinion, notes, and optionally references to other bloc members she has invited. Each bloc member can traverse the web of references starting from a master or config ballot to listen for ballot updates and count the common opinions.

    { "displayName":
      "issueName":
      "participants": [
        
      ],
      "proposal":
      "notes": [
        [ 1531859696122, "I don't like cold soup"]
      ]
    }
    

    Entrance to the election is controlled through the write permission of the config ballot. Other ballots can contain additional invites, but we (each member, even) can choose to limit the entrance by the distance from the config.

  • The Maritimes

    The lighthouse at Peggy’s Cove.

    On the theme of traveling with M&J, upon return of my Magdeburg trip, S and I traveled to the Canadian Maritimes with another M&J couple for a vacation. TLDR/W: Nova Scotia is oddly like Minnesota, with better accents and a bigger lake, and Prince Edward Island was idyllic, if cold.

  • Magdeburg

    I’m back from a quick trip to Germany. M&J had to visit an ophthalmologist in Magdeburg, and the destination seemed like a stretch for them. Worse, yet, there’s no commercial airport in Magdeburg, so we sequenced planes, trains, and automobiles from Arizona to erstwhile East Germany. The response I’ve learned for the question of “Where is Magdeburg?” is that is the birthplace of Georg Telemann, about a 90-minute train ride west of Berlin.

    M&J await their train at Berlin Hauptbahnhof station.

    Adding to the level of travel difficulty, M booked our stay with Airbnb in Neustadt. In the flurry of emails and confusion preceding departure, we misplaced the check-in instructions. Adding insult to injury, we struggled with German telephone numbers, an unfamiliar American iPhone, spotty Internet, forgotten passwords, unseasonal heat, and cranky taxi drivers, so after 18 hours of travel and another 2 waiting outside our apartment, we gave up. Luckily, S saved the day in a pinch, booking our evening at the Maritim downtown, so that we could gather ourselves and leverage reliable Internet to message our host.

    Magdeburg is a lovely town. There are lots of restaurants downtown and a wide variety of architectural styles. There are walking and biking paths up the river providing views of the city’s parks and cathedral.

    One restaurant worth mentioning is Hyaku Mizu in the Pink Palace. Mildly, M&J can be difficult customers, frequently ordering off the menu, always making special requests. Our inability to speak German and scarcity of English-language proficiency in Saxony-Anholt, added additional hurdles. The Hyaku Mizu staff, however, rolled with the punches. For example, when M asked if the curried tofu could be softer, our waitress accommodated, directing the chef to substitute tofu from the miso for wok-fried….

    We spent the next few days settling in, learning how to use the Magdeburg tram system, exploring grocery stores, and shopping for transit services. The latter stemmed from my worries that M&J could not manage to get their bags to the train station, to the bus, to the airport…. so I spent a few hours scouring the Internet for reviews and visiting travel agencies before settling on a booking from Sachsen-Anhalt Tours, where Pfau graciously arranged for someone to take M&J to Tegel Airport.

    The Berlin Cathedral and I crossed paths during my wandering of the city prior to my flight out.

    I left to overnight in Berlin the afternoon before my flight home. Being my father’s son, I’m always a bit nervous getting to the airport and would rather have a short morning trip than a trek to the airport….

    I stayed in Alexanderplatz, which looked like the Times Square equivalent for East Berlin. Everything there is big — the buildings, restaurants, even the radio tower which is still the second tallest structure in the EU. I headed over to Checkpoint Charlie to see the murals and wall remains. On the way back I passed by lovely cathedrals and concert halls in the dusk, ending the night at Hofbrau Wirtshaus for some brew and the grand bierhaus experience.