It's even worse than it appears.
Wednesday June 23, 2021; 1:43 PM EDT
  • See the GitHub thread for this post. #
  • I've been building apps on the assumption that if you store something on GitHub, when you get the raw version of that thing, it'll be current. I was getting inconsistent results, so I decided to test that assumption, and it seems that it is not reliable storage. #
  • If you read an object immediately after writing it, you will not always get back what you wrote. It's not just a matter of waiting a second or two, sometimes it's wrong for up to 10 seconds (the delay I programmed into the test).#
  • Here's the Node app I'm running to test this. It wakes up every minute and saves a file to GitHub with the current local time string. If I reload the non-raw version of the page, it usually seems to have the current value. But if I reload the raw version of the page, it often does not have the correct value. #
  • Here are the results of the app for the first half hour.#
    • everyMinute: 1:58:13 PM, status == 200, bad#
    • everyMinute: 1:59:00 PM, status == 200, bad#
    • everyMinute: 2:00:00 PM, status == 200, bad#
    • everyMinute: 2:01:00 PM, status == 200, good#
    • everyMinute: 2:02:00 PM, status == 200, bad#
    • everyMinute: 2:03:00 PM, status == 200, bad#
    • everyMinute: 2:04:00 PM, status == 200, bad#
    • everyMinute: 2:05:00 PM, status == 200, bad#
    • everyMinute: 2:06:00 PM, status == 200, bad#
    • everyMinute: 2:07:00 PM, status == 200, good#
    • everyMinute: 2:08:00 PM, status == 200, bad#
    • everyMinute: 2:09:00 PM, status == 200, bad#
    • everyMinute: 2:10:00 PM, status == 200, bad#
    • everyMinute: 2:11:00 PM, status == 200, bad#
    • everyMinute: 2:12:00 PM, status == 200, bad#
    • everyMinute: 2:13:00 PM, status == 200, good#
    • everyMinute: 2:14:00 PM, status == 200, bad#
    • everyMinute: 2:15:00 PM, status == 200, bad#
    • everyMinute: 2:16:00 PM, status == 200, bad#
    • everyMinute: 2:17:00 PM, status == 200, bad#
    • everyMinute: 2:18:00 PM, status == 200, bad#
    • everyMinute: 2:19:00 PM, status == 200, good#
    • everyMinute: 2:20:00 PM, status == 200, bad#
    • everyMinute: 2:21:00 PM, status == 200, bad#
    • everyMinute: 2:22:00 PM, status == 200, bad#
    • everyMinute: 2:23:00 PM, status == 200, bad#
    • everyMinute: 2:24:00 PM, status == 200, bad#
    • everyMinute: 2:25:00 PM, status == 200, good#
    • everyMinute: 2:26:00 PM, status == 200, bad#
    • everyMinute: 2:27:00 PM, status == 200, bad#
    • everyMinute: 2:28:00 PM, status == 200, bad#
  • You can see that more often than not the raw value is incorrect after ten seconds. #
  • I'm leaving the app running for a while, so if you want to verify this, you can. #
  • I'll post a note in the GitHub thread when I turn the app off. #

copyright 1994-2021 Dave Winer.

Last update: Wednesday June 23, 2021; 6:20 PM EDT.

You know those obnoxious sites that pop up dialogs when they think you're about to leave, asking you to subscribe to their email newsletter? Well that won't do for Scripting News readers who are a discerning lot, very loyal, but that wouldn't last long if I did rude stuff like that. So here I am at the bottom of the page quietly encouraging you to sign up for the nightly email. It's got everything from the previous day on Scripting, plus the contents of the linkblog and who knows what else we'll get in there. People really love it. I wish I had done it sooner. And every email has an unsub link so if you want to get out, you can, easily -- no questions asked, and no follow-ups. Go ahead and do it, you won't be sorry! :-)