22:50 Themes are GPL, too » WordPress Development Blog

If WordPress were a country, our Bill of Rights would be the GPL because it protects our core freedoms. We’ve always done our best to keep WordPress.org clean and only promote things that are completely compatible and legal with WordPress’ license. There have been some questions in the community about whether the GPL applies to themes like we’ve always assumed. To help clarify this point, I reached out to the Software Freedom Law Center, the world’s preëminent experts on the GPL, which spent time with WordPress’ code, community, and provided us with an official legal opinion. One sentence summary: PHP in WordPress themes must be GPL, artwork and CSS may be but are not required.

Matt,

You asked the Software Freedom Law Center to clarify the status of themes as derivative works of WordPress, a content management software package written in PHP and licensed under version 2 of the GNU General Public License.

We examined release candidate 1 of WordPress 2.8, which you provided to us at http://wordpress.org/wordpress-2.8-RC1.tar.gz. The “classic” and “default” themes included in that release candidate comprise various PHP and CSS files along with an optional directory of images. The PHP files contain a mix of HTML markup and PHP calls to
WordPress functions. There is some programmatic logic in the PHP code, including loops and conditionals.

When WordPress is started, it executes various routines that prepare information for use by themes. In normal use, control is then transferred via PHP’s include() function to HTML and PHP templates found in theme package files. The PHP code in those template files relies on the earlier-prepared information to fill the templates for serving to the client.

On the basis of that version of WordPress, and considering those themes as if they had been added to WordPress by a third party, it is our opinion that the themes presented, and any that are substantially similar, contain elements that are derivative works of the WordPress software as well as elements that are potentially separate works. Specifically, the CSS files and material contained in the images directory of the “default” theme are works separate from the WordPress code. On the other hand, the PHP and HTML code that is intermingled with and operated on by PHP the code derives from the WordPress code.

In the WordPress themes, CSS files and images exist purely as data to be served by a web server. WordPress itself ignores these files[1]. The CSS and image files are simply read by the server as data and delivered verbatim to the user, avoiding the WordPress instance altogether. The CSS and images could easily be used with a range of HTML documents and read and displayed by a variety of software having no relation to WordPress. As such, these files are separate works from the WordPress code itself.

The PHP elements, taken together, are clearly derivative of WordPress code. The template is loaded via the include() function. Its contents are combined with the WordPress code in memory to be processed by PHP along with (and completely indistinguishable from) the rest of WordPress. The PHP code consists largely of calls to WordPress functions and sparse, minimal logic to control which WordPress functions are accessed and how many times they will be called. They are derivative of WordPress because every part of them is determined by the content of the WordPress functions they call. As works of authorship, they are designed only to be combined with WordPress into a larger work.

HTML elements are intermingled with PHP in the two themes presented. These snippets of HTML interspersed with PHP throughout the theme PHP files together form a work whose form is highly dependent on the PHP and thus derivative of it.

In conclusion, the WordPress themes supplied contain elements that are derivative of WordPress’s copyrighted code. These themes, being collections of distinct works (images, CSS files, PHP files), need not be GPL-licensed as a whole. Rather, the PHP files are subject to the requirements of the GPL while the images and CSS are not. Third-party developers of such themes may apply restrictive copyrights to these elements if they wish.

Finally, we note that it might be possible to design a valid WordPress theme that avoids the factors that subject it to WordPress’s copyright, but such a theme would have to forgo almost all the WordPress functionality that makes the software useful.

Sincerely,
James Vasile
Software Freedom Law Center

[1] There is one exception. WordPress does reads CSS and image files to create previews of templates for the template selection portion of the administrative interface. Even in that case, though, nothing in those files calls any WordPress functions, is treated as a command by PHP, or alters any other WordPress data structure. These files are read as data and used to create an image and display a miniaturized version of a webpage to the user.

Even though graphics and CSS aren’t required to be GPL legally, the lack thereof is pretty limiting. Can you imagine WordPress without any CSS or javascript? So as before, we will only promote and host things on WordPress.org that are 100% GPL or compatible. To celebrate a few folks creating 100% GPL themes and providing support and other services around them, we have a new page listing GPL commercially supported themes.

21:30 Podcast about Facebook's Cassandra Project and the New Wave of Distributed Databases » High Scalability - Building bigger, faster, more reliable websites.

In this podcast, we interview Jonathan Ellis about how Facebook's open sourced Cassandra Project took lessons learned from Amazon's Dynamo and Google's BigTable to tackle the difficult problem of building a highly scalable, always available, distributed data store.

21:10 Gathering queries from a server with Maatkit and tcpdump » MySQL Performance Blog

For the last couple of months, we've been quietly developing a MySQL protocol parser for Maatkit. It isn't an implementation of the protocol: it's an observer of the protocol. This lets us gather queries from servers that don't have a slow query log enabled, at very high time resolution.

With this new functionality, it becomes possible for mk-query-digest to stand on the sidelines and watch queries fly by over TCP. It is only an observer on the sidelines: it is NOT a man in the middle like mysql-proxy, so it has basically zero impact on the running server (tcpdump is very efficient) and zero impact on the query latency. There are some unique challenges to watching an entire server's traffic, but we've found ways to solve those. Some of them are harder than others, such as making sense of a conversation when you start listening in the middle. In general, it's working very well. We can gather just about every bit of information about queries that mysql-proxy can, making this a viable way to monitor servers without the disadvantages of a proxy. In theory, we can gather ALL the same information, but in practice we are going for the 95% case.

As always with Maatkit, this has minimal dependencies. It doesn't require any Net::Pcap or other modules from CPAN. It's written in pure Perl, and it parses the output of tcpdump, rather than watching the network traffic directly. This might sound useless, but it's not. It means you can go tcpdump some traffic on a machine without Perl installed, and copy it to another machine for analysis, or send it via email to your friendly consultant, or do any of a number of other things. Decoupling things is very helpful sometimes.

Let's see how to gather queries and do something useful with them. I'll just watch the queries on a sandbox server on my laptop, and print out the profile synopsis so you can see how it works.

CODE:
  1. sudo tcpdump -i lo port 3306 -s 65535 -x -n -q -tttt> tcpdump.out

I run a few queries, quit, and cancel tcpdump. Now I've got a file and I'm ready to analyze it. Let's see:

CODE:
  1. mk-query-digest --type=tcpdump --report-format=profile tcpdump.out
  2. # Rank Query ID           Response time    Calls   R/Call     Item
  3. # ==== ================== ================ ======= ========== ====
  4. #    1 0x088084BF139954D8     0.1009 90.2%       1   0.100881 SELECT dual
  5. #    2 0x261703E684370D2C     0.0110  9.8%       1   0.011017

I'm kind of showing off the summary profile here to illustrate that you can get really compact results to see what's going on inside your server. What do you suppose that one query was that took a tenth of a second? We can find out.

CODE:
  1. mk-query-digest --type=tcpdump --limit 1 tcpdump.out
  2. # 460ms user time, 30ms system time, 8.88M rss, 11.79M vsz
  3. # Overall: 8 total, 6 unique, 0.15 QPS, 0.00x concurrency ________________
  4. #                    total     min     max     avg     95%  stddev  median
  5. # Exec time          114ms       0   101ms    14ms   100ms    33ms   737us
  6. # Hosts                  8
  7. # Time range        2009-07-01 23:55:41.334082 to 2009-07-01 23:56:33.929945
  8. # bytes                215      14      49   26.88   46.83    9.76   26.08
  9. # Errors                 8
  10. # Rows affe              0       0       0       0       0       0       0
  11. # Warning c              0       0       0       0       0       0       0
  12. #   0% No_good_index_used
  13. 12% No_index_used
  14.  
  15. # Query 1: 0 QPS, 0x concurrency, ID 0x088084BF139954D8 at byte 7517 _____
  16. # This item is included in the report because it matches --limit.
  17. #              pct   total     min     max     avg     95%  stddev  median
  18. # Count         12       1
  19. # Exec time     88   101ms   101ms   101ms   101ms   101ms       0   101ms
  20. # Users                  1 msandbox
  21. # Hosts                  1 127.0.0.1
  22. # Databases              1
  23. # Time range 2009-07-01 23:56:31.022602 to 2009-07-01 23:56:31.022602
  24. # bytes         22      49      49      49      49      49       0      49
  25. # Errors                 1    none
  26. # Rows affe      0       0       0       0       0       0       0       0
  27. # Warning c      0       0       0       0       0       0       0       0
  28. #   0% No_good_index_used
  29. #   0% No_index_used
  30. # Query_time distribution
  31. #   1us
  32. #  10us
  33. # 100us
  34. #   1ms
  35. #  10ms
  36. # 100ms  ################################################################
  37. #    1s
  38. #  10s+
  39. # Tables
  40. #    SHOW TABLE STATUS LIKE 'dual'\G
  41. #    SHOW CREATE TABLE `dual`\G
  42. # EXPLAIN
  43. select 1 from ( select sleep(.1) from dual ) as x\G

Indeed, it's no surprise the query took a tenth of a second to execute, and now you see where "SELECT dual" comes from.

Notice that it is inspecting the protocol enough to see the flags set in the protocol, indicating the warning count, error count, rows affected, and whether no index or no good index was available. Look at the top of the report -- what is up with the 12% of queries that say No_index_used? If we increase --limit a bit, we can see

CODE:
  1. #   0% No_good_index_used
  2. # 100% No_index_used
  3. # Query_time distribution
  4. ... snip ...
  5. show databases\G

I did not know that SHOW DATABASES sets the "no index used" flag, did you? Now we both do!

This is just a brief introduction to what the protocol parser can do. Of course, in real life it's much more useful than just seeing a query or two -- it has all the power of mk-query-digest for filtering, aggregating, printing and so forth.


Entry posted by Baron Schwartz | 2 comments

Add to: delicious | digg | reddit | netscape | Google Bookmarks

16:31 Latency is Everywhere and it Costs You Sales - How to Crush it » High Scalability - Building bigger, faster, more reliable websites.

Update 5: Shopzilla's Site Redo - You Get What You Measure. At the Velocity conference Phil Dixon, from Shopzilla, presented data showing a 5 second speed up resulted in a 25% increase in page views, a 10% increase in revenue, a 50% reduction in hardware, and a 120% increase traffic from Google. Built a new service oriented Java based stack. Keep it simple. Quality is a design decision. Obsessively easure everything. Used agile and built the site one page at a time to get feedback. Use proxies to incrementally expose users to new pages for A/B testing. Oracle Coherence Grid for caching. 1.5 second page load SLA. 650ms server side SLA. Make 30 parallel calls on server. 100 million requests a day. SLAs measure 95th percentile, averages not useful. Little things make a big difference.
Update 4: Slow Pages Lose Users. At the Velocity Conference Jake Brutlag (Google Search) and Eric Schurman (Microsoft Bing) presented study data showing delays under half a second impact business metrics and delay costs increase over time and persist. Page weight not key. Progressive rendering helps a lot.
Update 3: Nati Shalom's Take on this article. Lots of good stuff on designing architectures for latency minimization.
Update 2: Why Latency Lags Bandwidth, and What it Means to Computing by David Patterson. Reasons: Moore's Law helps BW more than latency; Distance limits latency; Bandwidth easier to sell; Latency help BW, but not vice versa; Bandwidth hurts latency; OS overhead hurts latency more than BW. Three ways to cope: Caching, Replication, Prediction. We haven't talked about prediction. Games use prediction, i.e, project where a character will go, but it's not a strategy much used in websites.
Update: Efficient data transfer through zero copy. Copying data kills. This excellent article explains the path data takes through the OS and how to reduce the number of copies to the big zero.

Latency matters. Amazon found every 100ms of latency cost them 1% in sales. Google found an extra .5 seconds in search page generation time dropped traffic by 20%. A broker could lose $4 million in revenues per millisecond if their electronic trading platform is 5 milliseconds behind the competition.

read more

How to Achieve RevenueHow to Change the World » 车东's shared items in Google Reader
Fotolia_402046_XS.jpg

The harsh reality of the startup scene today is that revenue is the best, and maybe only, form of funding. While many conferences focus on gaining the attention of investors, we’ve put one together that focuses on generating revenue.

It’s called Revenue Bootcamp. It’s on Friday, July 10th, at the Microsoft Mountain View, California campus. Click here to learn more about it and to register.

The topics include increasing traffic, selling advertising, and utilizing other revenue streams. There is also a keynote and booksigning with Chris Anderson, the author of Free: The Future of a Radical Price.

The final session is a fireside chat with Mike Moritz of Sequoia Capital (think: Google) and Paul Graham of YCombinator. Again, click here to learn more. Use this discount code to get $50 off: “FGK09.”

What we've learned about spamThe Official Google Blog » 车东's shared items in Google Reader
Blended threats. Payload viruses. Spam. If you're one of the more than 15 million people whose work email is protected by Postini's email security products, we hope you don't spend a lot of time thinking about these things. And if we're doing our job right, they certainly shouldn't be showing up in your inboxes. But we process more than 3 billion business emails per day for our customers, culling the spam, viruses, and other threats out, so we do think about this stuff. A lot.

On occasion, we like to share some of what we've learned, so that those of you who are interested can see what spammers are up to. If you're one of those people, head over to our Enterprise Blog for an update on spam trends over the past few months.

Posted by Ellen Leanse, Google Enterprise team
08:09 xtrabackup-0.8 » MySQL Performance Blog

Dear community,

The release 0.8 of the opensource backup tool for InnoDB and XtraDB is available for download.

Key features:

tar4ibd is made to be sure that read of InnoDB page is consistent. Before we had some complains what in stream mode some pages are getting corrupted, and we suspect tar can do read of pages in time when they changed. So we patches libtar to make read consistent.

Export is added to support moving .ibd tablespaces between servers.

The list of other features in the release includes:

Fixed bugs:

The binary packages for RHEL4,5, Debian, FreeBSD as well as source code of the XtraBackup is available on http://www.percona.com/mysql/xtrabackup/0.8/.

The project lives on Launchpad : https://launchpad.net/percona-xtrabackup and you can report bug to Launchpad bug system:
https://launchpad.net/percona-xtrabackup/+filebug. The documentation is available on our Wiki.

For general questions use our Pecona-discussions group, and for development question Percona-dev group.

For support, commercial and sponsorship inquiries contact Percona.


Entry posted by Aleksandr Kuzminsky | 4 comments

Add to: delicious | digg | reddit | netscape | Google Bookmarks


^==Back Home: www.chedong.com

^==Back Digest Home: www.chedong.com/digest/

<== 2009-06-30
  七月 2009  
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
==> 2009-07-02