RSS
 

Posts Tagged ‘Projects’

So You Wanna Help Mozilla?

03 Dec

A common theme we heard in responses to our web developer survey was: “I wish I could help Mozilla, but I’m just a web developer.”

Well, fellow web ninjas, you can put your skills to work with Mozilla and help make the web a better place. Our web projects are open, just like Firefox, and we’d love your help!

If you’re a web developer and want to help Mozilla and Firefox users while working on sites that see millions of visitors every day, follow me through the jump and I’ll show you around our shop and introduce you to the tools we use. Read the rest of this entry »

 
9 Comments

Posted in Articles

 

WP Plugin: Better Search Widget

04 Sep

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.

 
1 Comment

Posted in Design

 

Help Me Scale

06 Jun

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?

 
Comments Off

Posted in Database, MySQL, PHP

 

Better Living through Memcached

19 May

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 entry »

 
2 Comments

Posted in Uncategorized

 

s.hort.cc makes s.hort.cuts

16 May

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 entry »

 
Comments Off

Posted in Uncategorized