What follows are thoughts while reading Embedded Linux - Hardware, Software and Interfacing. Really enjoyed it.
It walks through planning for an automation system for a winter resort. Currently at chapter 6 and there’ve been a few things I’ve not done before.
Right away I discovered you could use gdb remotely with gdbremote. Great for remote debugging of cross-compiled applications.
I’ve done cross-compilation, albeit indirectly using buildroot, but I was still aware of what went on behind the scenes, aka: compiling gcc and glibc multiple times, the first being a way to bootstrap and create a more “pure” versions tailed specifically for the target platform.
Had the energy and focus to make more progress on my ideas for redis last night. See my previous post here if you don’t remember what those ideas were.
The only things left to do:
Fix freeSetObject() such that it frees intset and/or hash table memory that may have been allocated Fix code in rdb.c that’s responsible for loading the data from disk and writing to it when redis is shut down.
Had an idea for reducing the memory footprint of redis sets. A redis set may be encoded as an intset (if the set contains nothing but integers) or a hash table. But if a set contains integers and other values, you lose out on the benefit of intsets (speed and memory efficiency) and in some cases you have to wait while redis converts your intset to a hash table. This may not be a big penalty, but it all depends on the order in which you add items.
Pieter responded to my thread. He’s worked on compressed sorted sets recently, and while doing that he fixed the issue I was having with intsets. His code should be merged into 2.2 in a few weeks after enough people have tested. Apparently I’m the only one to report the problem with intsets.
His branch’s code is similar to my approach, in that he also extended zsetopsrc with type and encoding variables.
At Thursday night’s PDX Hackathon I worked more on the redis changes I wanted to make. I mostly completed them, and announced my progress on the mailing list that night. Seems no one was aware that zinterstore was broken for a set encoded as an “intset” (a more efficient way to store sets of integers). So yay, I found a bug! But now another programmer has alerted me he’s made progress in another area of the code that should be relevant to me, so I’ve got to check that out.
Spent another hour reading the redis source today, and I’m beginning to feel more enlightened. I’m thankful for the comment at the top of t_zset.c that describes how sorted sets are implemented with a hash and a skiplist. Weighing that knowledge against the t_set.c code for un-sorted sets, it’s now much clearer how the two types are alike and how they differ.
This is all in an effort to teach redis to zinterstore sets against sorted sets.
Moved away from storing individual string values to storing whole objects/documents in redis hashes. Hashes make more sense when you need to store a group of data values like a blog post.
But I’m not making a blog. My task it to create an updated version of my personal journal and information storage system. Daily I use it to log my thoughts, to stage blog posts (like this one), keep track of links to check later (which often doesn’t happen), keep todo lists for projects, and other things.
In my quest to learn new things, specifically the following things, I’ve been both excited and drained:
node.js Redis document database haml sass a micro-framework By “new things” I really mean “some cutting edge stuff that seems pretty cool”, the “cutting edge” portion being the source of most of my struggle. New tools, languages and software have sharp edges.
Since I love fast and light software, node.js is my current casual focus.
I’ve worked on several new and different things since July, and all thanks to my new job. Say “hooray” with me… Hooray! Luckily I recently got to do some compiler-style expression parsing. Not sure whether it’s my 100% favorite brand of problem to solve, but anything compiler-related is very, very near the top of my list.
We’re working on a jQuery plugin that I won’t share the details of yet, but the API contains a way to filter data using string matching expressions.
Trying to do a brain-dump of things I’ve encountered at my new job, since I’ve been doing work in several new areas.
My employer’s website was crashing on IE7. When I tried to re-create the issue on my IE8 machine, it crashed for me as well. Also crashed when I put IE8 in IE7 mode (the Developer Tools are quite nice).