Joomla K2 Component ERD Schema and Tree traversal optimization with Catalog Mode Thu, Sep 9. 2010
In the recent profile of GB4K.com, I talked about the use of the K2 component from the Folks at JoomlaWorks. While doing some customization, I decided to reverse engineer the K2 tables that are created and used by the component. I provide the diagrams for interested parties and developers looking to understand how K2 is designed. Keep in mind that these are logical diagrams, since Joomla and K2 have no intrinsic support for MySQL other than using the MyISAM engine, which doesn't support key constraints. Click on the image to get the .png version, or this link for a .pdf.
One thing I noticed about K2, is that its tree traversal code can require a lot of queries to be run, especially if you have a lot of categories. Over on the K2 forums, one K2 user with a large number of subcategories was complaining about the substantial overhead involved in displaying the top level Category for their site. With over 1000 subcategories, the site was being hammered with an equal number of queries.
This is because by default K2 will do a query for every category to find its child categories and items. Since this is a recursive problem there's no inherent MySQL solution that would allow the developers to solve this problem in SQL (like the Oracle Start With ... Connect By syntax) so it's somewhat understandable that the JoomlaWorks developers provided a short circuit mechanism into the category configuration they call "Catalog Mode". The description of this configuration flag, which defaults to "No" is:
This setting simply shuts off the recursion behavior for the category.
One thing I noticed about K2, is that its tree traversal code can require a lot of queries to be run, especially if you have a lot of categories. Over on the K2 forums, one K2 user with a large number of subcategories was complaining about the substantial overhead involved in displaying the top level Category for their site. With over 1000 subcategories, the site was being hammered with an equal number of queries.
This is because by default K2 will do a query for every category to find its child categories and items. Since this is a recursive problem there's no inherent MySQL solution that would allow the developers to solve this problem in SQL (like the Oracle Start With ... Connect By syntax) so it's somewhat understandable that the JoomlaWorks developers provided a short circuit mechanism into the category configuration they call "Catalog Mode". The description of this configuration flag, which defaults to "No" is:
If you select 'yes' then only the items directly belonging to this category will be retrieved. If you select 'no' then items from all sub-categories will be retrieved. Setting this option to 'no' is ideal for news/portal/magazine/blog layouts.
This setting simply shuts off the recursion behavior for the category.
Profile of the GB4k.com launch -- Joomla reborn Thu, Sep 2. 2010
I've been helping out Scott McGinnis with a revamp of his web-videos-for-kids and tweens site, Global Broadcast 4 Kids, aka GB4K.com. Scott was a pretty successful actor in the 1980's, who transitioned to directing in the 90's, and like a lot of directors in Hollywood, got his first chance behind the camera courtesy of Roger Corman. After a stint making low budget features, he went on to direct episodes of "Angel" and the TV series "Honey I Shrunk the Kids", and for the last few years, has been producing educational webisodes using Prosumer video equipment, and editing the episodes on a Mac with Final Cut Pro.
The subject matter and production values aren't that much different from what you might expect to find on basic cable networks like The History Channel or Disney Channel. The GB4K "twist" is that all the segments feature kids and teens as the newscasters, reporters and narrators. GB4K has already proven to be a great training ground for a number of its young "stars", as GB4K alumni have gone on to success at the Disney Channel, and in feature films. There's lots of material in the archive, and he creates a number of new episodes each week, from sports and entertainment news, movie premier "red carpet" interviews, how-to videos on dancing and skateboarding, history channel-esq features on subjects like Guitars and Merry-go-rounds, and environmental science and the latest in Green living practices and Green news. The site also includes music videos he directed and produced for Amber Lily and Jadagrace Berry. A great example of what Scott is able to accomplish as a one-man directing, production and post production crew, is the Jadagrace "Express Yourself" video, which in my opinion compares favorably with music videos costing 10-20x as much.
Despite having a substantial library of video content, frequent updates, and a clear cut audience, problems with the website had put GB4K into a holding pattern.
Continue reading "Profile of the GB4k.com launch -- Joomla reborn" »
Get files from subversion without creating a sandbox using svn export Mon, Feb 22. 2010
One of the first things people learn about using subversion is how to do a "checkout" using svn co. The svn checkout command pulls files from the subversion repository into your "sandbox" and in so doing creates what subversion calls a "working copy". A working copy includes a .svn directory in every subdirectory of the working copy, which is chock full of directories and files that svn uses to determine what you're doing in your sandbox.
A "working copy" is designed to be just that -- a copy of the source tree built with the assumption that you will be making changes and committing them back to subversion. But what do you do if you want the files, but you don't need or want a sandbox?
A "working copy" is designed to be just that -- a copy of the source tree built with the assumption that you will be making changes and committing them back to subversion. But what do you do if you want the files, but you don't need or want a sandbox?
Continue reading "Get files from subversion without creating a sandbox using svn export" »
Finding "Next Monday" using MySQL Dates Tue, Dec 1. 2009
Several people who read my article on Exploring Mysql CURDATE and NOW. The same but different posed questions regarding how to return a valid MySQL date equivalent to "Next Monday" given any particular day, as determined by MySQL's CURDATE(). This is a little bit tricky, but can be done entirely in MySQL syntax, making it usable with Calendar applications built on top of MySQL queries, without the need to use serverside date functions. This builds upon concepts discussed in my prior article, so if you have trouble understanding the implications of using CURDATE or DATE_ADD, you should probably take a minute and read that article.
Continue reading "Finding "Next Monday" using MySQL Dates" »
Centos Virtual LAMP server -- Part II Tue, Aug 4. 2009
*Part 1 of this series is here*
Unix people are probably familiar with the father of the DNS system -- the /etc/hosts file. The hosts file has a simple format:
ipaddress hostname
In the days prior to DNS, people would update a master hosts file and copy it around to all the servers in the enterprise. Surprisingly Windows versions also support this file, as a way of overriding DNS, so we can use this to our advantage, by adding an entry for our development server. In this example, I'm going to use dev.gizmola.com, which is not a real server.
One important reason to do this is that Apache and other web servers, use a feature of HTTP 1.1 that specifies a header field named "Host:". This mechanism facilitates the service of multiple domains from a single apache server, through the configuration of apache virtual host (or vhost) entires. The server uses the Host name in the HTTP header to determine how to route requests, so without host name resolution. you have to use non-standard ports and other mechanisms that are more trouble than they're worth. a
Customizing your LAMP server
Unix people are probably familiar with the father of the DNS system -- the /etc/hosts file. The hosts file has a simple format:
ipaddress hostname
In the days prior to DNS, people would update a master hosts file and copy it around to all the servers in the enterprise. Surprisingly Windows versions also support this file, as a way of overriding DNS, so we can use this to our advantage, by adding an entry for our development server. In this example, I'm going to use dev.gizmola.com, which is not a real server.
One important reason to do this is that Apache and other web servers, use a feature of HTTP 1.1 that specifies a header field named "Host:". This mechanism facilitates the service of multiple domains from a single apache server, through the configuration of apache virtual host (or vhost) entires. The server uses the Host name in the HTTP header to determine how to route requests, so without host name resolution. you have to use non-standard ports and other mechanisms that are more trouble than they're worth. a
Intel's T6500 -- No VT for you! Sony: You got Vaio VT? We turn it off. Thu, Jul 30. 2009
At the time I'm writing this, you can easily find websites still listing the specifications for Intel's T6500 chip as including Intel VT. The T6500 is prevalent in the consumer Notebook space particularly because it was built to work with an 800mhz front side bus, allowing it to go in cheaper motherboards. You'll find the T6500 in a lot of midrange and budget 64bit notebook computers, from nearly all the major notebook manufacturers. Whether or not you care about VT depends on your interest in 64bit Virtualization software from Parallels to VMWare to Sun Virtualbox to Xen to VirtualPC.
VT is a marketing name for the hardware assisted virtualization workaround, originally named Vanderpool, that adds the Virtual Machine Extensions (VMX) instructions needed by VM's like Xen and Sun VirtualBox to provide 64bit OS virtualization. AMD has a similar set of extensions it added, marketed as AMD-V, although they built in the memory segmentation support that alleviates the problem with 64bit memory virtualization as far back as the D revisions of their AMD64 chips. One such website includes this boilerplate--
If you were to have visited Intel's own site prior to July 20th of 2009, you would have found information indicating that the chip had VT support. This is a fairly mind boggling omission when you consider that the chip was manufactured, delivered to customers, and has been sold to customers for well over a month before Intel corrected its own site! On July 21st, Intel updated its website, and VT support is now removed from the specs. An Intel representative agreed that the information on the site was incorrect, once challenged by a consumer with a T6500 based machine, who had used Intel's own tools to enumerate the features on the chip.
VT is a marketing name for the hardware assisted virtualization workaround, originally named Vanderpool, that adds the Virtual Machine Extensions (VMX) instructions needed by VM's like Xen and Sun VirtualBox to provide 64bit OS virtualization. AMD has a similar set of extensions it added, marketed as AMD-V, although they built in the memory segmentation support that alleviates the problem with 64bit memory virtualization as far back as the D revisions of their AMD64 chips. One such website includes this boilerplate--
T6500 contain Advanced Technologies about Intel Virtualization Technology that increasing manageability, security, and flexibility in IT environments, virtualization technologies like hardware-assisted Intel Virtualization Technology (Intel® VT)
If you were to have visited Intel's own site prior to July 20th of 2009, you would have found information indicating that the chip had VT support. This is a fairly mind boggling omission when you consider that the chip was manufactured, delivered to customers, and has been sold to customers for well over a month before Intel corrected its own site! On July 21st, Intel updated its website, and VT support is now removed from the specs. An Intel representative agreed that the information on the site was incorrect, once challenged by a consumer with a T6500 based machine, who had used Intel's own tools to enumerate the features on the chip.
I am sorry, I was mistaken. Thanks for bringing this to my attention.
The T6500 does not support VT. I used ark.intel.com as my reference, but as you pointed out, the information turned out to be incorrect. The processor feature information for the T6500 contained within ark.intel.com has been corrected. VT is actually not a feature of the T6500.
The processor identification tool is correctly reporting that VT is not a supported feature of the Intel® Core™2 Duo Processor T6500.
John S.
Intel Customer Support
Continue reading "Intel's T6500 -- No VT for you! Sony: You got Vaio VT? We turn it off." »
« previous page
(Page 2 of 17, totaling 98 entries)
next page »



