Updates from January, 2013 Toggle Comment Threads | Keyboard Shortcuts

  • Urban 08:00 on 18 Jan. 2013 Permalink |  

    Smart Watches, Dolphins and Evolution 

    Watches seem to be a bad fit in the modern world where time is all around us. Glance at your phone or your tablet, and there’s a clock. Glance at your computer screen, TV, car dashboard or digital camera, and there’s a clock. Fish your Fitbit out of your pocket, and it has a clock. Today, keeping time is so cheap that even your oven has its own clock.

    It wasn’t always so; 500 years ago, the clocks might have only been on clock towers. 250 years ago, they came to our living rooms. Then, to your grandfather’s pocket. And then, in an endless feat of miniaturization, they came to your wrist.

    However, in today’s world of Apple iPhones and Google Glass, the uni-tasking device on your wrist has been reduced to a fashion statement and/or a status symbol. But you don’t really need it.

    At least, I don’t.

    What would come in handy, though, is something else — an external screen for my phone. Something to display text messages, incoming calls, e-mails, weather info, and all the things the phone can think of, so that I don’t have to reach for it every time it blips.

    That’s why I’ve been testing a smart watch (Metawatch Strata, more below). It pairs to your phone using Bluetooth Low Energy and does all that, with hopefully more to come.


    A quick review

    Here’s some of the features:

    • It shows texts; see below for notification from one of my servers reporting some stats.1
    • Shows events from calendars synced to your iPhone; this includes Gmail, Exchange, and surprisingly, FB birthdays
    • Displays weather forecast, which is of course location-sensitive; the phone already knows your location, so weather can always be local
    • Shows stocks and phone battery level
    • Displays incoming calls, which you can also reject by pushing a button
    • Has media player controls,
    • Features a vibrating motor to alert you to a call, text or a calendar event,
    • as well as a 3 axis accelerometer and an ambient light sensor, both unused in the current firmware.



    All this works by pairing the watch to your iPhone (Android is supported, but currently lacks many features). In fact, you have to pair it as a Bluetooth 2.1 device for displaying texts and incoming calls (as you would your Bluetooth car kit), and as a Bluetooth 4.0 device for everything else.

    Once paired, you run the app (MetaWatch Manager) that manages the widgets on the watch. You get 4 screens and you can place on them anything from 4 small widgets to 1 large widget occupying the entire 2×2 grid.


    The software is supposed to be open source, and there’s plenty of projects doing more with it. Haven’t looked into it yet.

    One of the more peculiar things is its display, which is nothing I’ve ever seen before. It’s a Sharp low-power memory LCD (video) with 96×96 pixel resolution, but there’s no black or white pixels; the only two states are mirror-reflective and white. This takes some getting used to, so be sure to check if you like it before buying. All photos are cleverly set up to reflect only black, so the effect is not obvious unless you check it in a video. On the bright side, it requires almost no energy when it’s not updating (similarly as e-ink), so the battery lasts for about a week.


    So, is this wearable computing?

    MetaWatch is of course not alone; there’s Pebble, which is just about to ship, with similar features. Pebble uses an e-ink display, so the battery life is reportedly similar (around a week). There’s also the Italian i’m Watch, which is entirely Android powered and uses an active display (hence the battery only lasts for about a day).

    It’s quite obvious something is going on in that space, and that a new computing form-factor is emerging.

    And if you think back, the exact same thing has already happened before: computers started out as large mainframes, where all the computing power was centralized. They were accessed only by a dumb terminal, which was little more than a remote keyboard and screen. Yet, gradually, technological progress killed the mainframe and made the dumb terminal the new protagonist. It became smart enough to survive by itself, sitting under your desk, then on your lap, and finally in your pocket. The smart phone in your pocket is indeed more powerful than your desktop computer was 10 years ago.

    And yet again, there are new dumb terminals to take place of the old. Smart watch is nothing but a dumb terminal for the mainframe in your pocket. Right now it can’t do much more than display what the mainframe has to say. But it might not be long before you won’t need the mainframe anymore.


    The meandering path of evolution

    I’ve been thinking lately how all this relates to biology. Watches seem to have had a similar evolutionary path as dolphins.

    You see, first there were fish (bear with me). Gradually, some fish got tired of water, became mammals, grew lungs and legs and came to land. They evolved further, and eventually they became us. But something else also happened: a group of mammals got tired of land and went back to water. Dolphins are a part of that group, and so are whales. They might swim like fish, but they have lungs and have to come to the surface for air. And funnily, today they mostly hang out with other fish (which have always been fish) and get confused with them by almost everybody.

    Compare that to watches. A clock, as an ideal of craftsmanship, the ultimate precision mechanism, gradually evolves into a mechanical Babbage machine that fills an entire room. Later, that becomes a computer, and the computer gets smaller and smaller, until it becomes wearable, and finally migrates to your wrist. There, it hangs out with the old mechanical relics, only to be confused with them for years to come.



    1. I’m using Nexmo to deliver those, costing me 1 cent per message []
  • Urban 11:00 on 17 Nov. 2012 Permalink |  

    Least popular 192.168 networks 

    Having a home VPN server on the default subnet is a pain due to address collisions. Indeed, if I haven’t bothered to change it before, why should I expect a random cyber cafe/hotel/company or anyone at all to use a different default subnet?

    So I’ve decided to renumber my home network. But first, I wanted to find a 192.168.x.0/24 subnet with the lowest popularity, so I could minimize the potential collisions.

    I asked Google1, querying all the default gateways2 of the form “192.168.x.1”, and got the following result (x axis is the number of Google results, in log scale). Click to enlarge.

    Keep in mind that the Google AJAX search API used here returns somewhat strange numbers, which are by a factor of 10 lower than in plain old desktop Google search, but at least that factor appears to be consistent (I checked the first 10 IPs).

    In fact, the data here is not intuitively comprehensible. The pie chart below is better, showing that anything except the 7 subnets in the legend should give you a sufficiently low probability of collision (lower than 1%). Click to enlarge.

    Note: all data as of Nov 14 2012. Here’s the raw dataset.

    But renumbering the network is a lot of work, really, so maybe I should just pick something from the 10 or 172 subnets. These seem to be much rarer (especially 172). Of course I’d have to retrain my muscle memory.

    There’s other options as well, but I don’t find them very practical. For example, using a 1:1 NAT to provide additional address mapping to VPN users just complicates the network, not to mention firewall rules. And using static client side routes is another non-option, since it can’t be used on locked down devices, such as  iPhones and iPads. So renumbering it is.



    1. I used Google AJAX Search API, stuck the URL into a Ruby script and iterated from 0 to 254 []
    2. I made two hopefully reasonable assumptions, namely that the network popularity is proportional to the amount of people talking about its default gateway, and that the default gateway is has the .1 address []
  • Urban 09:00 on 14 Nov. 2012 Permalink |  

    Smart bulbs (and other musings) 

    As a gadget enthusiast I instinctively clicked “Back this” when I saw the Lifx project on Kickstarter. I was torn, however, when I saw the public outcry regarding the founder and his alleged incapability to ship a cardboard box. I hesitated until the last day, not sure whether to keep the pledge or cancel it.

    Meanwhile, I happened to stumble upon another similar project at the Mini Maker faire at Strataconf NY–the Visualight. It instantly caught my eye and one of the founders explained to me how he was just finishing the writeup when the Lifx project came online.

    So I said, “convince me that you’re better and I’ll cancel the Lifx pledge and back yours instead.”

    He did give me a pitch with plenty of differentiation, saying that Visualight is a great data visualization tool which sports open APIs for all the communication. Who needs disco effects and music visualization, when you can have the light change color according to weather, stocks or subway service (kind of like the Nabaztag / Karotz).  He also showed me a working prototype.

    But right there, I couldn’t decide which one had a better premise. It all boiled down to the “smart bulb, stupid network” (Lifx) vs. “smart network1, stupid bulb” (Visualight) dilemma, and I got an instant case of analysis paralysis.

    I started thinking that I’ve seen the story many times before.

    For example, in computers.

    In computing we started off with a centralized design (mainframes) and dumb terminals. Then the brain moved to the local box (PC), and now, finally, it’s moving back to the network (cloud), with the clients getting more and more stupid once again (just take a look at Chromebook).

    Something similar seems to be happening in mobile phones, with the brain first moving from the network to your iPhone, and now slowly creeping back into the datacenter (Siri, anyone? Or maps with server-computed turn-by-turn?)

    But right now the infrastructure is not quite there yet. It’s not infallible and 99.999% robust, and it pisses us off when Siri can’t take a simple note. Imagine you can’t turn on your light at 2AM because your server’s down.

    So that’s what I was thinking while standing there, staring blankly into empty space. I decided that (at least my) world might not be ready for a remote controlled stupid bulb.. yet.

    And a couple of days later, Philips announced the Hue. It’s severely limited (iOS only, and the bulbs are not self-sufficient; it uses an additional ethernet-connected gateway which communicates with bulbs via ZigBee). However, with its market cap, lighting expertise, reputation and virtually the same price point, Philips might have just eaten the lunch of every other lighting startup.

    Then there’s another issue where Philips wins: safety. A product like that, done wrong, can easily burn down your house. I’ve already seen the remains of an exploding Chinese USB charger, and this is indeed a great concern. Compared with cheap Chinese LED bulbs that I bought en masse years ago, such a smart bulb has to be always on to benefit from its embedded computer. If you switch it off, it’s dead.

    So we’ll have to wait and see who’s going to be the winner here. The race is long. In fact, it’s never-ending.

    And no, I haven’t cancelled the pledge.



    1. and here, by “smart network” I mean “a server” []
  • Urban 22:23 on 16 Jun. 2012 Permalink |  


    Today’s sunspots.


    Sunspots 2012-06-16; click to enlarge

    Some notes on taking the picture: I used a budget Celestron Powerseeker 127eq with a bunch of DIY accessories. The small aperture of the front mask was covered with mylar film; instead of the eyepiece I used a T-mount, made from a camera body cap and a piece of PVC sink pipe, held together by plumber’s putty. It sounds pretty much like MacGyver, and it was. Why complicate so much, you ask, if you can get a T-mount for pocket change? Because you can’t get one the last day when you finally decide you want to take pictures of the venus transit.

    Of course, to prevent shaking, a 10s timer and mirror lockup had to be used. Finally, the photo was cropped and adjusted for better contrast.

    Compare that to the one NASA captured.


  • Urban 02:01 on 9 Jan. 2012 Permalink |  

    Some notes on Nexenta/ZFS 

    So far I’ve been pretty satisfied with my Nexenta setup. Dedup is a great feature and I’ve rsynced all other computers to it without a single thought of which files are copied more than once (all Windows and program files, multiple copies of pictures, multiple copies of Dropbox dirs, etc.). However, the following three things drove me nuts; here’s a word on how I’ve resolved them.


    Smbshare vs. Samba

    Yes, native ZFS smbshare is great; it even exposes snapshots as “Previous versions” to Windows boxes. And it can be simply managed from napp-it. However, smbshare won’t allow you to share the file system’s children 🙁

    Here’s how this works: let’s say you have 3 nested file systems:

    • mypool/data
    • mypool/data/pictures
    • mypool/data/pictures/vacation

    When you share mypool/data and navigate to it, you won’t see the pictures dir. When you navigate to pictures, you won’t see the vacation dir.

    It drove me crazy and it seems it won’t be supported anywhere in the near future. That’s why I disabled smbshare completely and installed plain old Samba. Because Samba’s not ZFS-aware (but instead a plain old app that accesses the file system) it shares everything as you’d expect. Problem solved.


    Backing up an entire zpool

    I wanted the following:

    • to backup the entire data pool to an external USB drive of the same capacity (2TB)
    • a solution that would be smart enough to recognize matching snapshots and only copy the diffs
    • it should also delete the destination snaps that no longer exist in the source pool
    • it wouldn’t hurt if it supported remote replication in case I wanted that later

    Much has been written about the awesomeness of zfs send | zfs receive, but I was immediately disappointed by all the manual work that still needed to be done. Sure, it supports recursive send/receive, it can be used over ssh, but it only operates on snapshots. It can incrementally copy the last delta (if you tell it exactly which two snapshots are to be used for diff), but if you prune your old snapshots to save space, it won’t know anything about that. So your backup size will grow indefinitely, constantly appending more data.

    What I wanted was a simple 1:1 copy of my pool to an external drive. I even considered adding the drive to the mirror to create a 3-way mirrored pool; once resilvering would complete, I could split the mirror and disconnect the USB drive. However, resilvering is not that smart and takes days; all the data needs to be copied every time, and making a snapshot interrupts and restarts the process.

    Then I found the excellent zxfer. It does work on Nexenta and allows you to mirror an entire pool; the procedure is pretty straightforward: first determine the path of your external USB drive using rmformat:


    1. …
    2. Logical Node: /dev/rdsk/c3t0d0p0
    Physical Node: /pci@0,0/pci103c,1609@12,2/storage@3/disk@0,0
    Connected Device: WD 20EADS External 1.75
    Device Type: Removable
    Bus: USB
    Size: 1907.7 GB
    Label: <Unknown>
    Access permissions: Medium is not write protected.

    Then create your USB drive backup pool:

    zpool create Mybook-USB-backupzpool /dev/rdsk/c3t0d0

    Finally, recursively backup your entire data zpool (here we set the target to be compressed with gzip-5 and deduped with sha256,verify)

    zxfer -dFkPv -o compression=gzip-5,dedup=verify -R sourcezpool Mybook-USB-backupzpool

    On subsequent runs it identifies the last common snapshot and copies only the diffs. [-d] switch deletes pruned snapshots from the target pool. For more, read the zxfer man page.



    This has been pretty disappointing; it’s a pain to set it up and it performs badly (that is, compared to VmWare on similar hardware). It burns around 15% of the CPU running an idle and freshly installed Ubuntu box. Command-line config is a pain and virtualizing (P2V) certain Windows boxes spits out errors that (according to Google) noone has ever seen before. The same image Just Works ™ under VmWare.

    Nonetheless, it’ll have to do for now. For more info on how to set it up, consult the following:

    • Gea 23:33 on 12 Jan. 2012 Permalink

      about SMB
      There are efforts to solve this problem.
      Currently: Each ZFS dataset is completely independant from others. You can set a mountpoint to mount the logically below others. But you cannot SMB browse between because they cannot inherit properties.

      Workaround: use one share

      about zfs send
      the target does not increase. its always an exact copy of the source including all volumes and snaps. Transfers are based on modified data blocks so its more efficient than file based methods

      About Virtialbox
      Why do you try to virtualize on top of OS when you need performance. Use a barebone virtualizer like ESXi instead and virtualize all OS’s including a ZFS NAS/SAN
      look at napp-it all-in-one

    • Urban 15:58 on 15 Jan. 2012 Permalink

      Hey, thanks for your elaborate comment.
      Regarding SMB, I think Samba is a pretty decent workaround as well; as far as I can tell, all you lose is “previous versions”.

      About zfs send: my understanding is that only the diff between two snaps is sent, while older snaps are left intact (I did in fact check that).
      Let’s say I have a weekly snapshot schedule and only want to keep 5 snaps. After a snap, I also send the incremental diff to the USB drive. In week 5, I still have two identical filesystems. However, in week 6 I make snap6 and destroy snap1; then I send delta (-i) between snap5 and snap6 to external drive. Now drive 1 has snaps 2-6 and drive 2 has snaps 1-6. This is not what I want, since drive 2 grows in size compared to drive 1. 

      Regarding Vbox: thanks for the tip, I’ll definitely try the all-in-one solution.

    • jaymemaurice 06:01 on 22 Dec. 2013 Permalink

      Old post – but you also lose out on a great multi-threading CIFS implementation by using Samba.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc