Archives For MySQL

This is the second of a two-part newsletter on “going big”. By “going big” I mean how one transitions from a Web site with little to moderate traffic, to one that can handle tons of traffic. The previous newsletter looked at going big from the macro perspective: theory, implementation, hardware, and networking. In this newsletter, I’ll look at the micro perspective: how to write code that scales well. And, as it turns out, this newsletter again got to be too big, so this is part one of two parts that makes up part two of the two-part series. (Huh?) In this newsletter, I’ll mostly focus on code. The next will mostly focus on the database.

Before going into details, I’m going to define what it means to be a “big” site. As I said in the previous newsletter, it actually depends upon the kind of content and activity the site has: X number of video requests is far more demanding than the same X number of mostly text pages. Likewise, X number of WordPress page requests is far more demanding than the same X number of static HTML page requests. For the purposes of this discussion, let’s say that “big” is a site that gets in the broad neighborhood of 100,000 to 500,000 pageviews per day. At that point (if not before), you’ll need more than one server to handle the load. (As a counterpoint, on the highest end, Netflix sometimes requires up to 20,000 servers at a single time.)

As always, questions, comments, and all feedback are much appreciated. And thanks for your interest in what I have to say and do!

Continue Reading...

Joshua Thijssen just posted on Speaker Deck the slides for his presentation “15 Pro-tips for MySQL Users”. As the name implies, for the most part, the tips are for more advanced MySQL users, although a couple are the kinds of things I would hope most MySQL users are already doing. There’s plenty to learn here, or at least consider, and it doesn’t take long to peruse. (And, there are actually 16 tips.)

Continue Reading...

I’m happy to announce that a new version has been posted today. This version includes Chapter 13, “Using Extensions,” and Chapter 14, “JavaScript and jQuery.” This concludes Part 2 of the book (better late than never, eh?).

Continue Reading...

Much of the work done with models involves using the methods defined within the model classes. These methods, such as rules() and relations(), are created by the code generator Gii. You’ll also add your own methods to the code generated for you. But, thanks to inheritance, there are lots of methods common to Yii models that you’ll frequently use. In this post, I want to specifically look at methods used to handle model-related events. Before looking at the usage of these methods, let’s first look at event handling in Yii in general.

Continue Reading...

Over the weekend, I posted an update to “The Yii Book”. This is version 0.5, which means I’m halfway there (about the time I was hoping to have the book done; so much for good intentions). With that in mind, my sincerest thanks to everyone for their patience. I know this is taking longer than we’d all like, but I’m doing my best and very much appreciate the understanding on your part. It’ll get done, I promise. And trust that “The Yii Book” is not taking a back seat to anything as far as my work goes these days.

Continue Reading...