Ruminate » Clive Thompson, Technology, and Compressed Language


[CC Licensed image by everythingnewisdangerous] 

As my disillusionment with the profession of education (and technology in education) deepens, my interest in very particular, sometimes tangentially related topics, is growing quickly. One of the topics bubbling to the top is the way our language is changing through our engagement with technology.

I think both of the most obvious “sides” in this discussion are correct. Language changes for many reasons, including the insinuation of communication technologies and their features, and that evolution isn’t coherently characterized as a net “loss” except through some particular personalized view. But that’s the rub… language is one of those cultural resources that is both shared and intensely personal at the same time. So the loss is incurred by these changes can be, at a personal level, very real for any one of us as individuals, as well as for any group that is defined with enough clarity to identify shared language characteristics.

Naturally, writers of various kinds make up many of the groups that feel the effects of evolutionary change most keenly and, by nature of their (pre)occupations, perhaps have an outsized voice when it comes to writing (and griping) about them. So Clive Thompson’s recent review of three books that—in whole or in part—speak to the area of technology and language was a pleasant surprise, providing a balanced view of the topic and three books I now need to read.

It may come as a shock to anyone who reads my writing here, but when it comes to “creative writing” I generally prefer brevity to expansiveness. I prefer poems that are under a page, right down to Haiku, as broken as the traditional American view of them is, and American Sentences. I love prose poetry and flash fiction. The speed with which technology lets us communicate (making it easier to and less time-consuming to communicate multiply rather than collectively) combined with technologically based limiting factors (from the UIs in composition spaces to literal limitations and their derivations as seen in SMS text messaging and Twitter) has facilitated a compression of language that I find equal parts maddening and fascinating.

It helps that Thompson writes with a clear prose and is very clever… many will know him ideas like his analogy between Twitter as a part of our social sense analogous to our physical sense of proprioception. For example, in the review Thompson makes this point about Twitter:

“…Twitter is training millions in the compressive skill of newspaper-headline writing—ironically enough, at precisely the moment when actual newspaper-headline writing seems at the point of vanishing. And consider the odd literary function of the link: a tool that lets you compose a status update that’s suggestive and intriguing but incomprehensible unless you follow the link itself, at which point the sentence’s meaning is revealed.”

There’s a lot to think about in this area… not just in terms of compression, brevity, and references/referents, but also how these can be (and are being) considered collectively– whether deliberately or haphazardly, and whether as part of authorial intention or audience invention.

Share/Bookmark

WPMu Ed » A Useful Plugin: ShowID for Post/Page/Category/Tag/Comment plugin

I find myself in every recent version of WP (and WPMu) searching for the ID numbers for various pages, posts, categories, and/or tags on a number of occasions. I’m not sure when this feature got dropped from the core, but I do remember it was at one time part of the edit post/edit page metadata. As of the latest versions the only way to find ID numbers is to actually edit the page (or post, tag, category, comment, etc.) and look for the ID value in the URL field (pictured below). Not very intuitive, in fact, ridiculous.

ShowID for Post/Page/Category/Tag/Comment plugin actually shows the ID value right from the edit section of any of these elements. Something like the following:

I am going to activate this plugin sitewide for UMW Blogs, because a number of the plugins/widgets we have actually ask for page/posts IDs to exclude pages/posts etc. from a widget, or include categories in a page. And explaining how to find this information without this plugin is just that much more difficult. I really don’t understand why this isn’t a core feature of WP given core widgets (such as the pages widgets) and a wide variety of plugins depend on ID values.

iterating toward openness » Taking OER Within CC to the Next Level

Our good friend Cathy Casserly, former Director of the Open Educational Resources Initiative of the Hewlett Foundation, as just been elected to the Creative Commons Board of Directors. While there were already people on the CC board who cared about OER, the addition of Cathy means that the Board now has one of the most articulate OER champions around in their ranks. This is great news! Congrats to Cathy, CC, and anyone who cares about OER!

Coverage at:

iterating toward openness » More on the OER Transition

I’m happy to point to this comment by Vic Vuchic from the Hewlett Foundation on a previous post I wrote about what seems to be happening with OER. It’s a great perspective (that he is uniquely qualified to provide) that warmed my heart a bit. Some highlights:

Hewlett made over $16 million in grants last year that were 100% OER focused… In 2009 alone, foundations such as Gates, Lumina, MacArthur and many others pumped over $10 million of investments into OER focused projects. VCs made a couple of forays into OER… And a number of governments made their first investments in OER. In all 2009 was a record year both in the amount and diversity of OER funding, which is amazing considering most other things in the world collapse financially.

So from Vic’s point of view, the field of OER is in transition, and definitely for the better! This is a great perspective that I’m happy to hear.

Vic also writes, “Just to put a a stop to the rumors, Hewlett is not shutting down OER, and it is very much a part of what the education program is doing moving forward.” I re-read my previous post and I don’t think I implied anywhere that Hewlett was shutting down its OER program – just that funding seems to have slowed down. Vic indicates that Hewlett’s and other foundations’s endowments are down 40%, so that makes sense.

Vic’s perspective of what’s happening as the field transitions is good news for everyone who cares about OER.

WPMu Ed » Momentum for WP as LMS building

EDUPUNKIN you LMS Image by Tom Woodward
Image credit: bionicteaching’s “Edupunking your CMS”

Maybe it’s just cause I live in a particular bubble on the internet, but over the past six months or a year there has been what seems to me like some serious momentum towards thinking through WordPress (and/or WPMu) as a serious alternative to Learning Management Systems. And posts like this interview with Kyle Jones as well as Joe Ugoretz’s tour-de-force two part series on how he is putting the idea of WordPress as a LMS into action are pretty badass. This is some amazing stuff, and I really think Kyle Jones nails what the appeal of WP as an LMS is for many with this quote from his interview at wpmu.org:

But [offering faculty and students a hands-on approach to designing their learning] is what makes using WordPress MU wonderful as a LMS: We’ve modified and tweaked it at the students’ request, making their learning space what they need it to be – not what some company says it should be.

And, on top of that, Kyle captures the engine that is driving this emerging cooperation amongst and between a distributed group of faculty, students, and technologist all over the world:

We learn from each other, we steal from each other, in the end we try to give back to those who have helped us.

That really sums up what this vision of openness is as we work through our issues, tinker with the tools, think through the implications, and share back what we’ve learned. I might be crazy, but I still have faith that through this kind of process we can take back the means of imagining our own spaces for teaching and learning from the expedients of institutional efficiency, cause it’s exactly the imagination of these spaces that is a necessary and integral part of the teaching and learning process as Joe Ugoretz’s posts make all too clear. I may be biased, but I can;t help but think what we are seeing in the educational community working with WordPress, is just one part of a larger momentum of people using a variety of tools to escape the prison house of learning that is the LMS. And that brings me to a bigger point, I really don’t think we are simply using WordPress to ape the LMS, but rather to re-imagine the ideas that under gird this design: give students ownership of their work, control over the design, and the ability to seamlessly integrate a wide variety of other tools they already use to network online. More than that, the bigger push is to put students in a pace they own and share back what they choose, an expectation that they take ownership of their work and identities online.

Paternity leave is over, and the bava is back!!!

Ruminate » Just Say Nein to “Closedness”

… we’ll always have informal learning networks…

Share/Bookmark

Ruminate » Responding to a Few Education Predictions: @Braddo


[CC licensed image by KraetzschePhotography] 

Brad Ovenell-Carter (aka @Braddo) was kind enough to bring his 2010 Prediction for K-12 Education to my attention. While they’re labeled "K-12" they are also relevant, in different ways, to higher education, and each stimulated some thinking on my part.

Prediction #1: "School administrators will enter the conversation."

This is precisely apt for higher education: administrators are having a conversation… but it’s not the conversation they need to be involved in. The current conversation administrators are taking part in is instead happening mostly in parallel with that of the practitioners and innovators within the space(s) they administer. Of course I worry about the effect administrative realities have on innovative activities– Christensen’s work on disruptive innovation is frighteningly relevant– but at some point what is learned and practiced on the edge needs to make its way into the fabric of the institution. Or maybe it doesn’t have to, but I’d like it to since I plan to remain working within one of those institutions.

Bringing ReadWriteWeb.com’s Top 5 Web Trends: 2009 into play (Structured Data, Real-Time Web, Personalization, Mobile Web / Augmented Reality, Internet of Things) as part of this prediction interests me. How many educators would list ReadWriteWeb’s five as the most important web trends of 2009 w/r/t their work? If we’re talking about a top 5 in terms of importance to education, then I propose:

  • real-time web – setting aside subtleties and arguments about these roles, this is more important for educators and their professional communities than their students’ educational world(s)

  • "cloud computing" – I use the term haphazardly to include both educational institutions increasing move toward enterprise-level cloud computing services as well as the march of end-user applications and activities from specific desktop to Internet applications such as Google Office

  • distributed, synchronous conferences – perhaps organizers for events in other areas can afford to attempt to corner their audience into over-priced and under-valued face-to-face offerings, but education isn’t one of them

  • personalization – this will be important, but mostly in its effects on privacy and identity…it will be two or three years before we seem integration of scattered, siloed information to a point that the grander ideas of personalized learning is possible (if it happens at all)

  • tablets, netbooks and iPhones (oh my) – most of the activity in this area will continue to focus on simplistic content provision and access to "materials," but I suspect the Apple tablet will result in a tectonic shift in the fundamental landscape just as the iPod and iPhone have. Netbooks will be the next Trapper Keeper.

If I’m not limited to explicit technologies, then I add:

  • open education/openness – this is fundamental to the visions of many innovative educators, sometimes without those same educators knowing it. The traditional models of content-centric OER creation and provision will continue to die-off and become less relevant. But there’s significant danger here if we aren’t successful in refocusing and reshaping the energy of open teaching and learning as a fundamental way of working.

  • new literacies and information fluency – yes, there’s more information and means of expression, but digital literacy just doesn’t cut it. I may be early on predicting serious, practical movement in this area, but it will be a top-flight concern nonetheless.

  • intellectual property and copyright – alternative licensing will continue to grow in importance, but media convergence and mobile growth is going to act as a serious counterbalance. I expect significant legislation and wrangling in this area… and net neutrality!

Prediction #2: "Everyone will wake up to the idea that students are not digital natives."

I’ll quibble with the absolute nature of this prediction. I’ve shifted a bit on my position regarding use of the phrase "digital natives" but not at all on the reality that the label (as typically used) refers to characteristics accurately representing an important– if small– set of learners that I encounter in every class I teach.

Who are myriad prognosticators thinking about when they roll out their predictions about personalized, individual education, if not those who are outside the fat belly of the bell curve? “Digital natives" are, to me, similar to what other gifted groups are: a small set of students with outstanding skills and experience that are not being served by middle-of-the-road educational experiences.

We can dispense with the phrase, but those students exist, just as do many other "outliers" in any community of learners, and I, for one, am really tired of the immense leveling effect that comes as a byproduct of terminology crusades.

Prediction #3: "We’ll put philosophy back on the table."

I sure hope so! The "participation and presentation" circle of my information fluency Venn diagram is predicated on the idea that we are recognizing and teaching the practical ethics and evolving morality and mores of the webby, netty world.

With no experience in K-12 education beyond experiences with my own children, I can’t speak to the needs there, but in higher education this means taking into account creeping relativism (and I am, by most standards, a relativist– or more specifically an ironist) and at least being aware of the constant conflation of ideology and philosophy.

The recent "openness debates" provides a stark illustration of the difficulty of 1) engaging the philosophical in an edtech world heavily biased towards traditionally pragmatic concerns, and 2) finding productive means of doing so.

 

[1/27/10 - edited for grammar]

Share/Bookmark

WPMu Ed » Deleting old MySQL tables across blogs and databases in WPMu

OK, so this will probably be the final installment of my “pimp your WPMu databases” series :) Part one was moving from WPMuDEV’s Multi-DB package to SharDB; part two dealt with optimizing tables across a number of databases in MySQL, and the final installation will share some SQL code, once again thanks to Gowtham, for deleting specific tables across various blogs and databases.

Ok, so here is the setup, when we started UMW Blogs we used the spam filter Spam Karma 2. It was a personal favorite of mine, and while a lot more work than Akismet, it did a pretty good job of shutting out spam. Spam karma 2 has since died, and we moved to Akismet well over a year ago now. However, for at least the first 500 or 600 blogs (maybe more) we had Spam karma 2 installed, which inserted two tables into each blog kinda like this:
wp_21_sk2_logs
wp_21_sk2_spams

Where 21 was the blog ID, so across numerous blogs and databases there are a number of blogs with two fields like those above (just a different blog ID number, say wp_581_sk2_logs) filled with spam. It would make sense to drop these tables out as part of an optimization of our databases, but the only question I had was how?

Well I went to Gowtham, the oracle, once again (I hope this well of riches doesn’t go dry for overuse :) ) and he sent me the following script for deleting all tables with _sk2_ in the name. Now I imagine very few folks have this specific issue with Spam Karma 2, so the details of this script may seem irrelevant. But if you think about it, if there is a plugin that inserts tables on numerous blogs spread across various databases, and an uninstall of that plugin doesn’t delete the tables, then such a script would be quite useful to you. Just change the list of databases from my specific setup to yours and instead of the following bit of code:
$sql_q = "SHOW TABLES LIKE '%_sk2_%'";

Put a unique series of characters between the ‘%_uniquecharacters_%’ to delete a series of tables across blogs and databases.

How freaking cool is this? I tested the script on UMW Blogs, and it worked beautifully, UMW Blogs databases just lost another half a gig of spam fat, and I’m am happy to say it’s never been healthier. No heart disease in the future of this WPMu install—though we can never rule out plugin cancer :)

Here is a text version of the script.

And here it is sans the opening and closing PHP calls:

# PHP script to find all tables, whose name contains
# the string '_sk2', in a given set of MySQL databases
# and delete them. This is a 2-step process.
# Run this script as
#
# php mysql_skarma.php > mysql_skarma.sql
#
# Then, run the following command in a terminal
#
# mysql -u USERNAME -p < mysql_skarma.sql
#
# and enter PASSWORD when prompted.
#
# First written: Gowtham, Mon, 25 Jan 2010 08:01:48 -0500
# Last modified: Gowtham, Mon, 25 Jan 2010 09:20:22 -0500

# Connect to the database
# It is expected that you will be able to connect
# to all your databases [listed below] with this
# set of credentials
$host = 'localhost';
$dbuser = 'username';
$dbpasswd = 'password';

# The act of connecting to the MySQL server
$connect = mysql_connect($host, $dbuser, $dbpasswd) or
die('MySQL Connection Error: ' .
mysql_errno() . ': ' .
mysql_error());

# List of databases
$databases = array(
"umwblogs_wpmu_0",
"umwblogs_wpmu_1",
"umwblogs_wpmu_2",
"umwblogs_wpmu_3",
"umwblogs_wpmu_4",
"umwblogs_wpmu_5",
"umwblogs_wpmu_6",
"umwblogs_wpmu_7",
"umwblogs_wpmu_8",
"umwblogs_wpmu_9",
"umwblogs_wpmu_a",
"umwblogs_wpmu_b",
"umwblogs_wpmu_c",
"umwblogs_wpmu_d",
"umwblogs_wpmu_e",
"umwblogs_wpmu_f",
"umwblogs_wpmu_global",
"umwblogs_wpmu_vip1"
);

# FOREACH_LOOP_DATABASES BEGINS
# Loop through the array, 'databases'
# Each array element will be stored in the variable 'database'
foreach ($databases as $database) {

# Connect to the database using details specified
# above - it expects that there is one username-password
# combination that can connect to all your databases
mysql_select_db($database, $connect) or
die('Database Connection Error: ' .
mysql_errno() . ': ' .
mysql_error());

# Select all tables from 'database' that have '_sk2_'
# in their name
$sql_q = "SHOW TABLES LIKE '%_sk2_%'";
$result = mysql_query($sql_q) or
die('Invalid Query: ' .
mysql_errno() . ': ' .
mysql_error());

# WHILE_LOOP BEGINS
# Loop through the list of tables from 'database'
while ($table_details = mysql_fetch_row($result)) {
$table_name = $table_details[0];

# SQL query to DROP the table
# This will be written out to a flat text [SQL] file
# to be imported into MySQL. This is necessary because
# tables with an underscore in their names cannot be
# directly deleted from PHP [to my limited knowledge]
print "DROP TABLE `$database`.`$table_name`; ";
}
# WHILE_LOOP ENDS

}
# FOREACH_LOOP_DATABASES ENDS

# Close the connection
mysql_close($connect);

WPMu Ed » Changing the Oil on a Multi-Database WPMu Install

And to build on my last post about Moving from Multi-DB to SharDB on WPMu, here is a rundown on some of the work done to further optimize the multiple-databases for our WPMu at UMW Blogs.

First off, we have a plugin install called WordPress MU Sitewide Tag Pages that basically republishes every public post from around UMW Blogs into one blog, the tags blog, which is located at http://tags.umwblogs.org. This plugin has a ton of uses for us, not least of which is sitewide tags and categories, as well as feeds off those sitewide tags and categories for syndication and republishing into course sites. Another function of this blog could be a searchable archive of all the public work done. So, needless to say, this blog is important enough that we have let it run now for almost two years without pruning. And when I checked the wp_posts table of this blog in the database there was what seemed to be 99,066 posts.

And that one table was weighing in at a hefty 425 MBs, which mean it was out-of-control, and I imagine some of our recent performance and down time issues might be related, so I decided to cull this table. So after backing it up, I tweeted looking for advice on how I might delete all posts from the tags blog before a certain day, say August 15, 2009—the week before the Fall semester started this year.

And in no time at all, Michigan’s finest, Gowtham (and sgowtham on Twitter) sent me the following bit of code:

DELETE FROM wp_posts WHERE post_date < "2009-08-15";

Along with the note, “please be sure to replace the right table name in place of wp_posts though.” Which would like like this for the tags blog with the ID 1291:

DELETE FROM wp_1291_posts WHERE post_date < "2009-08-15";

So I just copy that bit of SQL code into the PHPMyAdmin editor that lets you run SQL queries for a specific database like so…

And within a minute 66,000 posts were removed, and the table was now 142 MBs.

Now, let’s stop here for a second. How sick is that? Within minutes I got a solution to my issue and deleted 66,000 posts and potentially saved UMW Blogs a couple of more crashes this coming week, from a friend on twitter who just knew what to do. How much richer am I because of this relationship? How much richer is all of UMW? It’s kinda wild to think about that. And more than that, it doesn’t stop there….

When I removed those 66,000 posts the size of the table was still showing 425 MBs, but there was now a value in overhead column of the table that had a value of 140 MBs. I had o idea how to get rd of this, so asked again in Twitter, and D’Arcy Norman tweeted me back this:

He was right, optimizing the table brought the 425 Mbs down to a slender 140 MBs, and the overhead value was flushed clean. So this got me thinking, hmmmm, what if I could run a script and optimize every table in every database? I mean this site has been running non-stop for almost three years, and has been a work horse. How about giving UMW Blogs an “oil change”—to use Gowtham’s analogy which works beautifully. So, when I tweeted about that optimization question, Gowtham once again sent me a message, and after I gave him the naming conventions of my 18 databases on UWM Blogs, wham, I had a PHP script to optimize every table in UMW Blogs.

People, are you getting the point here? Gowtham is an Engineering Physics grad, a hell of a photographer too, but he knows his shit. And he was willing to share that will me in all of about a few minutes the first time. But for the optimization script, he actually wrote it up and sent it to me via email. I don;t know how long that took him, but it would have taken me hours and hours of research and learning to figure out I could do it. And hours more to beg someone who knew at UMW to write it for me (if that person existed). Well, this process was a matter of minutes.

And, Gowtham not only sent me the SQL Optimization script, but was more than cool with me sharing it, so here is the code to the script as a txt file.

And here it is copied below sans opening and closing PHP calls.

# PHP script to optimize each table in a given set
# of MySQL databases and improve the overall performance.
# First written: Gowtham, Mon Feb 27 09:33:01 EST 2006
# Last modified: Gowtham, Sun, 24 Jan 2010 13:01:58 -0500

# Connect to the database
# It is expected that you will be able to connect
# to all your databases [listed below] with this
# set of credentials
$host = 'localhost';
$dbuser = 'USERNAME';
$dbpasswd = 'PASSWORD';

# The act of connecting to the MySQL server
$connect = mysql_connect($host, $dbuser, $dbpasswd) or
die('MySQL Connection Error: ' .
mysql_errno() . ': ' .
mysql_error());

# List of databases
$databases = array(
"umwblogs_wpmu_0",
"umwblogs_wpmu_1",
"umwblogs_wpmu_2",
"umwblogs_wpmu_3",
"umwblogs_wpmu_4",
"umwblogs_wpmu_5",
"umwblogs_wpmu_6",
"umwblogs_wpmu_7",
"umwblogs_wpmu_8",
"umwblogs_wpmu_9",
"umwblogs_wpmu_a",
"umwblogs_wpmu_b",
"umwblogs_wpmu_c",
"umwblogs_wpmu_d",
"umwblogs_wpmu_e",
"umwblogs_wpmu_f",
"umwblogs_wpmu_global",
"umwblogs_wpmu_vip1"
);

# FOREACH_LOOP_DATABASES BEGINS
# Loop through the array, 'databases'
# Each array element will be stored in the variable 'database'
foreach ($databases as $database) {

# Connect to the database using details specified
# above - it expects that there is one username-password
# combination that can connect to all your databases
mysql_select_db($database, $connect) or
die('Database Connection Error: ' .
mysql_errno() . ': ' .
mysql_error());

# Select all tables from 'database'
$sql_q = "SHOW TABLES FROM $database";
$result = mysql_query($sql_q) or
die('Invalid Query: ' .
mysql_errno() . ': ' .
mysql_error());

# WHILE_LOOP_OPTIMIZE BEGINS
# Loop through the list of tables from 'database'
while ($table_details = mysql_fetch_row($result)) {
$table_name = $table_details[0];

# Print a message to the screen - helps in debugging
echo "$database :: $table_name ";

# SQL query to optimize the table
$sql_o = "OPTIMIZE TABLE `$database`.`$table_name`";
$optimize = mysql_query($sql_o) or
die('Invalid Query: ' .
mysql_errno() . ': ' .
mysql_error());
}
# WHILE_LOOP_OPTIMIZE ENDS

}
# FOREACH_LOOP_DATABASES BEGINS

# Close the connection
mysql_close($connect);

I put in the drop database sign-in information, uploaded it to UMW Blogs via FTP, and went to the script at http://umwblogs.org/mysql_optimize.php, and a few minutes later all of the tables in all 18 of the databases were optimized.

Is this not awesome, UMW Blogs has gotten the oil change it has been in desparate need of—and I don’t recommend waiting every 4,000 users and blogs, every 2,000 may be wiser. So, thanks to Gowtham, UMW Blogs is purring like a cat, and I really hope it stays that way.

And just to show you I have no shame, something else I saw when the databases were optimizing is that random blogs still have the Spam Karma tables in them, I would think about 500 or 600 blog tables filled with old spam. The tables are labeled wp_blogid#_sk2_logs and wp_blogid#_sk2_spams. For example: wp_21_sk2_logs and wp_21_sk2_spams. So riddle be this Batman of Gowtham, how would you find and drop all tables with _sk2_ in them across 18 databases?

I love the internet, and I can’t thank you enough Gowtham for your selfless support, people like you make this space both fun and wonder-filled.

WPMu Ed » Moving from Multi-DB to SharDB on WPMu

In the early morning hours yesterday we moved UMW Blogs from multi-db (which is a multi-database setup provided through WPMuDev Premium at a cost) to the ever so free SharDB multi-db setup, and I’m happy to say it worked. We’ve had some “unscheduled downtime” recently at UMW Blogs, and between the ever-growing traffic and a syndication/tags blog that’s all too full with 99,000 posts—it was high time to start cleaning database house. This post will take you through the switch from multi-db to SharDB, which is surprisingly simple. And the following post will be about optimizing a multiple database setup that depends heavily on syndication like UMW Blogs does.

Multi-DB –> SharDB
So, our first step was to move to Ron Rennick’s (of wpmututotials and @wpmuguru fame) SharDB setup because UMW is no longer a subscriber of WPMuDEV Premium, and given upgrades to multi-db are no longer available to us—-we were eager to be rid of it. What’s more, I’m hoping this move to SharDB (accompanied by the database optimization and tags blog clean up) will bring UMW Blogs back to a snappiness we haven’t known for a couple of months now. So here’s to hoping….

When I downloaded SharDB I expected a lot more work than there actually was. The move is rather simple, and save a hiccup or two on my end, it went smooth as silk. The first thing to do is configure the db-settings.php file. UMW Blogs is running on 16 databases (well actually 18, but that is besides the point) on one dedicated server, we don’t have several servers or multiple data centers so I think our setup was rather simple. And while we probably should consider getting another server or two some time soon, as Joss Winn suggested, for right now we’re easy.

[What follows is pretty ugly :) ]

The UMW Blogs db-settings.php configs look like this:
// If you have multiple datacenters you can come up with your own datacenter
// detection logic (php_uname?). This helps ensure the web servers try to
// connect to the nearest database servers first, then distant ones.
define( 'DATACENTER', '' );

function add_slave($read, $host, $lhost = '', $user = DB_USER, $password = DB_PASSWORD) {
global $slaves;
$slaves[] = compact('read', 'host', 'lhost', 'name', 'user', 'password');
}

/* Add your configuration here */

//Use this configuration for a hexidecimal based hash

//Ex. you have 256 databases that follow the naming convention acct_wpmuXX
//where XX is the hexidecimal hash for the blog DB

// how many characters of hexidecimal hash
$shardb_hash_length = 1;
// what is the prefix of your blog database shards (everything before the hexidecimal hash)
$shardb_prefix = 'umwblogs_wpmu_';
// set a string to be used as an internal identifier for the dataset
$shardb_dataset = 'umwblogs';
// do you want to put your primary blog (blog_id 1) in its own 'home' database?
//$enable_home_db = true;
// how many, if any, VIP databases do you have?
$num_vipdbs = 1;
// add this to set the write master read priority (default 1)
//$shardb_master_read = 99;
// add this if all of your databases are on a local server
$shardb_local_db = true;
// use this function to add a read slave host
//add_slave($read_priority, $hostname, $local_hostname, $user, $password);

// instructions for adding vip blogs at the bottom of this confg filei

/* That's all, stop editing! Happy blogging. */

I wasn’t entirely certain about all the details in the config file, so before I did the upgrade I posted a few questions on the WPMu Forums here, and Ron himself bailed me (thanks Ron!). Once I had the db-settings file squared away I uploaded it to the main directory of UMW Blogs. After that, I added two lines to the wp-config.php file:

//SharDB Settings
define(‘WPMU’, ‘1′);
require_once(‘db-settings.php’);

And finally, I uploaded the dp.php file to the wp-content directory, and the shardb-admin.php file to the mu-plugins directory. (Keep in mind I had already deleted the db-config.php and db.php files that were running multi-db setup.)

Once I had everything up, I went to the homepage of UMW Blogs and got this error:

Connected to localhost:3306 but unable to select database ‘umwblogs_umwblogs’ while querying table ‘wp_domain_mapping’ (global_r)Connected to localhost:3306 but unable to select database ‘umwblogs_umwblogs’ while querying table ‘wp_site’ (global_r)Connected to localhost:3306 but unable to select database ‘umwblogs_umwblogs’ while querying table ‘wp_site’ (global_r)Connected to localhost:3306 but unable to select database ‘umwblogs_umwblogs’ while querying table ‘wp_site’ (global_r)Connected to localhost:3306 but unable to select database ‘umwblogs_umwblogs’ while querying table ‘wp_site’ (global_r)Connected to localhost:3306 but unable to select database ‘umwblogs_umwblogs’ while querying table ‘wp_site’ (global_r)No WPMU site defined on this host. If you are the owner of this site, please check Debugging WPMU for further assistance.

Turns out, multi-db does not require you to change the database name in the wp-config for the mutliple databases. so our database settings were still set to the original single database we started UMW Blogs on: umwblogs_umwblogs. Once I figure this out, I changed the db_name setting to point to our global database:
define('DB_NAME', 'umwblogs_wpmu_global');

Now this aneming convention is particualr to our setup, we have our tables named umwblogs_wpmu_global, umwblogs_wpmu_0, umwblogs_wpmu_1, umwblogs_wpmu_2, etc., up through 9, and then a through f. So our database names look like this:

umwblogs_wpmu_global
umwblogs_wpmu_0
umwblogs_wpmu_1
umwblogs_wpmu_2
umwblogs_wpmu_3
umwblogs_wpmu_4
umwblogs_wpmu_5
umwblogs_wpmu_6
umwblogs_wpmu_7
umwblogs_wpmu_8
umwblogs_wpmu_9
umwblogs_wpmu_a
umwblogs_wpmu_b
umwblogs_wpmu_c
umwblogs_wpmu_d
umwblogs_wpmu_e
umwblogs_wpmu_f
umwblogs_wpmu_vip1

Once I changed the db_name setting in wp-config, SharDB seemed to work fine on every other blog but the main blog: umwblogs.org. After a second of panic, I realized that SharDB was looking for the home blog (or Blog ID 1) in the database _wpmu_c, but I had it in the wpmu_vip1 database. Once I exported the tables from the wpmu_vip1 database into the wpmu_c database, everything worked perfectly. Put the question for me remains, why didn’t SharDB pick up the vip1 database? I had it noted in my db-settings file as follows:

// VIP DB's
if ($enable_home_db === true) {
add_vip_blog(1,'vip1'); // home blog
}

Additionally, when I was doing something in the backend, I came across this error:

Connected to localhost:3306 but unable to select database ‘umwblogs_wpmu_global’ while querying table ‘wp_sitemeta’ (global_w)

I can’t for the life of me remember where I was precisely now, but I’m sure I’ll find it again soon. I was wondering if this might have something to do with a number of global tables we added to the db-config.php file for getting BuddyPress to work with multi-db? Not sure here, kind of fishing for some help, but I know with multi-db we had issues adding global tables for BuddyPress to the global database (same goes for the domain mapping plugin table), and one way to ensure those tables were created in the global database was through the following list of code I stole from D’Arcy, and he breaks the whole thing down better than I ever could here. Now I imagine SharDB doesn;t have this issue, but just wanted to get a sense if anyone else playing with the move from MultiDb to SharDB had any ideas.

// Usage: add_global_table(TABLE_NAME)
// EX: add_global_table(’something’);
add_global_table(‘umwblogs_wpmu_global’);
// BuddyPress
add_global_table(‘bp_activity_sitewide’);
add_global_table(‘bp_activity_user_activity’);
add_global_table(‘bp_activity_user_activity_cached’);
add_global_table(‘bp_friends’);
add_global_table(‘bp_groups’);
add_global_table(‘bp_groups_groupmeta’);
add_global_table(‘bp_groups_members’);
add_global_table(‘bp_groups_wire’);
add_global_table(‘bp_messages_messages’);
add_global_table(‘bp_messages_notices’);
add_global_table(‘bp_messages_recipients’);
add_global_table(‘bp_messages_threads’);
add_global_table(‘bp_notifications’);
add_global_table(‘bp_user_blogs’);
add_global_table(‘bp_user_blogs_blogmeta’);
add_global_table(‘bp_user_blogs_comments’);
add_global_table(‘bp_user_blogs_posts’);
add_global_table(‘bp_xprofile_data’);
add_global_table(‘bp_xprofile_fields’);
add_global_table(‘bp_xprofile_groups’);
add_global_table(‘bp_xprofile_wire’);
add_global_table(‘wp_domain_mapping’);

Other than that SharDB is up and running on UMW Blogs, an given it may be one of the most unstable WPMu sites in the world give we have over 100 plugins and 130 themes, it has been solid as a rock thus far, so fine work Ron.. But to make sure we don’t push our luck too much, now it’s time for the database optimization drill, post forthcoming.