Today I upgraded from WordPress 2.3.3 to 2.6.1. I’m such a late adopter sometimes.
I had to go through and repeat a few hacks. For example, 2.3.x didn’t allow you to do get_sidebar($name), so I’d hacked the “get_sidebar()” function. And I replaced the still-broken Atom feed reading widget with James Wilson’s Google Reader Widget.
Then I finally got fed up with the default “Search” widget, which doesn’t look like the other widgets at all (no title), so I started hacking into that one. Then I realized “why hack, when I can extend?”
So, here it is, Better Search Widget.
All it does is add a search widget with a customizable title, submit button, and field size. Quick-and-useful. You can see the results in the sidebar.
If you decide to use it, leave a comment and I’ll check out your blog.
I’ve been reading Eran Hammer-Lahav’s intelligent posts on microblog scalability, and now I’m concerned about my own “microblog” site, Picofiction.
Similar to social networks, social updates, social messaging, social… Like many social web sites—amongst our weaponry…—Picofiction lets you “follow” your favorite authors, displaying all their posts along with yours.
I handle this very naïvely: everything is offloaded to the database. There are three tables involved here, one of users, one of posts, and one of follower/followee bindings.
Here’s the basic structure of this query:
SELECT post_id, post_body, post_date, post_type, user_name AS author_name, user_id AS author_id FROM posts LEFT JOIN users ON posts.author_id = users.user_id WHERE author_id = 'CURRENT_USER' OR author_id IN ( (SELECT followed_id FROM followers WHERE following_id = 'CURRENT_USER') ) ORDER BY post_date DESC LIMIT PAGE_START,20;
Here’s where I need help: this works great on a single database, but it does not scale horizontally.
Since this horizontal scalability is such a hot topic right now, I’m asking for ideas. I’d like to put in the infrastructure before there is a need for it.
Eran points out that caching is not as simple a solution as we’d like to think. What do you cache? How do you keep caches in sync?
Does anyone have experience with MySQL Cluster Servers? It seems like the best way of scaling is to make the process as parallelizable as possible. The database then handles the parallelization, so the less I can do in the program the better, right?
I wanted to put something specific in the title, like “Speed up your service” or “Reduce server load” or “Limit database calls” or… You see why I chose “Better Living.”
Memcached is a memory caching system with an obvious name. It allows you to store basically any data that can be serialized into a giant, memory-resident hash, then retrieve it with its unique key.
Imagine not querying your database on every request, and you only begin to get a sense of how useful this is.
Let’s go through a simple, single-server setup. Read the rest of this article »
Yet Another Short URL.
I just launched s.hort.cc to offer something that TinyURL and Tiny.cc didn’t: an easy API for creating short URLs, or “s.hort.cuts,” and returning them in a format my program could use.
You can visit the s.hort.cc website, of course, but you can also create a short URL and have it returned to you in XML, JSON, YAML, or plain text. (Even if you decide to parse the whole XHTML page, it’s easy to find the s.hort.cut with the DOM or an XPath parser.) I’ll gladly add other formats if people suggest them.
I’m working on a Firefox extension, but in the meantime, drag this link: s.hort.cut to your bookmarks toolbar to automagically turn the current page into a s.hort.cut.
Read more technical info below the break. Read the rest of this article »
Picofiction is new project: telling stories in 140 characters.
Picofiction is a combination of microfiction, text messaging and Twitter. If you can write a story in a two-page spread, and tell the world what you’re doing in 140 characters, maybe you can tell a story in 140 characters.
140 characters is the length of a standard text message. Text messaging has its own vocabulary to deal with the limit, but story telling can be even more flexible with words.
The site is up and running and you can start sharing stories right now! Some features haven’t been finished yet but I’m working on it.
And remember that this Saturday is MSU’s Technology Conference 2007. If you’re a teacher in Michigan you should come!
Follow Me