March 29, 2014

Being Consistent

Consistency across distributed data stores is a big issue in building distributed systems. Here's a recent article from ACM Queue on consistency: Eventually Consistent: Not What You Were Expecting? Achieving consistency is made more interesting by the CAP theorem that states that you can only achieve two out of the three goals of Consistency, Availability, and Partition tolerance.

Posted by windley at 6:28 PM | Comments ()

March 27, 2014

Using Bitcoin Ledgers

Today I mentioned some of the things a distributed ledger can be used for. This TechCrunch article gives links to some of those: Enter The Blockchain: How Bitcoin Can Turn The Cloud Inside Out. And since hierarchical certificate play a direct role in the plot of Rainbows End, here's a paper on using the blockchain for certificates: Decentralized Anonymous Credentials (PDF).

Posted by windley at 8:32 PM | Comments ()

Beestings and Runtime Errors

When you write #{<expr>} in KRL, that's called a beesting. Beestings are parsed at runtime, not compile time. Consequently, the parser isn't checking the syntax of any code inside the beesting when you run your ruleset through the validator. Unfortunately, the runtime code that optimizes beestings wasn't handling errors correctly and consequently, it was possible to write code that passed the parser but would cause problems at runtime.

I have fixed the problem in the beesting optimization code to handle these errors. Unfortunately, it will take a while for those changes to make their way through the deployment cycle. In the meantime, check your beestings for parse errors if you're having problems.

In this particular case, the problem was trying to dereference a map like this:

my data = <<
   Location: #{checkin_data.location}
>>;

You will need to do this instead

my data = <<
   Location: #{checkin_data.pick("$.location")}
>>;

Not as clean, but it parses. :)

Posted by windley at 11:16 AM | Comments ()

March 25, 2014

Bitcoin and Distributed Consensus

On Thursday, we're going to talk about Bitcoin as an example of a practical distributed consensus protocol and some of the uses we can make of such a thing. If you're not familiar with public key cryptography, digital signatures, and cryptographic hashes, be sure to read the Wikipedia articles I linked to in the lecture notes.

Posted by windley at 9:43 PM | Comments ()

March 21, 2014

Space Monkey Slides

Alen Peacock was kind enough to send along a copy of his slides from his guest lecture along with links to a few of the papers he mentioned.

Posted by windley at 7:53 AM | Comments ()

March 20, 2014

Digital Transformation Forum Wednesday

OIT is holding their second Digital Transformation Forum this coming Wed from 8-12 in the Wilkinson Center Varsity Theatre. The event is primarily for university administrators, staff, and faculty, but interested students are welcome as well. You might find some of the talks interesting. It's close and the price is right. No registration is required and participants can attend all or part of the presentations as they choose.

Posted by windley at 4:03 PM | Comments ()

March 18, 2014

Automatically Run the KRL Parser When You Commit Code

I created a pre-commit hook you can use to automatically parse your KRL code before you check it in with Git. See my blog for details.

Posted by windley at 3:49 PM | Comments ()

Assignment

The assignment told you to name an event location:current.

The problem is that current is a reserved word and the current parser doesn't allow reserved words as event names. Feel free to name it whatever makes sense, just document what it is. I've updated the assignment with this information as well.

Also, several people have had problems with things not working, and even their SQTG account not working due to code that caused an error when it parsed.

The parser (Antlr-based) has a problem with dying on some erroneous input rather than returning a nice parse error. Not good behavior. We're putting in some fixes for that. In the meantime, you'll avoid these problems if you parse your code before you submit it. Many of you have found very creative syntax for things and that's been good. We're finding bugs that no one has found for six years! :)

Posted by windley at 2:19 PM | Comments ()

March 11, 2014

The Mental Accounting Barrier to Micropayments

Here's a good essay on why micropayments are hard. The barrier, according to Szabo isn't technological, but mental. Note that this was written in 1996 and 20 years on, we still don't have good micropayments systems.

Or do we? One could make the argument that ad-tech (e.g. Google ad words, Facebook ads, etc.) is a form of micropayment based on attention instead of dollars. Why?

Posted by windley at 4:39 PM | Comments ()

Larry Smith: Why you will fail to have a great career

Posted by windley at 4:18 PM | Comments ()

March 7, 2014

Ethereum: Programming Distributed Ledgers

The key idea behind Bitcoin is a cryptographically-secure, distributed ledger. But ledgers are useful for a lot of things besides keeping track of money. For example, Namecoin using a cryptographically-secure ledger to register and resolve domain names. Ethereum is a system for building and using building and using Bitcoin-like ledgers for almost anything. Need a distributed ledger for your next project? Ethereum hopes to provide the tools.

IntroducingEthereum from Ethereum on Vimeo.

Posted by windley at 2:28 PM | Comments ()

March 6, 2014

Rainbows End Exercise

The Rainbow's End exercise document is here

Posted by windley at 8:19 AM | Comments ()

March 4, 2014

Service Installed in Temperature Zone

In class, I was trying to demonstrate where the service was installed, but it wasn't working due to the cert issues, I believe. Worked great once I got off BYU's network. Here's the point I was trying to make.

I've created a pico that represents the temperature zone in the office. That's what the thermostat talks to (using an event channel just like you're doing in the lap). If you look at the services installed on my account, the CT-30 thermostat service isn't installed there. But if you log into the temperature zone's pico and look at the services installed there, you see this:

CT-30 service installed in temperature zone's cloud

You can see that the service is installed there, listening for thermostat:temperature events and responding as needed.

Also, I've restarted the daemon, so if you go to Xively you can see the temperature charts for my office again.

Posted by windley at 10:40 AM | Comments ()