DBUpgrade: now you can have multiple schemas in the same DB!

DBUpgradeI was struggling with DBUpgrade in projects with multiple independent components. I had to maintain the schema in main project which was quite crazy considering that projects are independent and have different timelines that had to be in sync.

So I changed DBUpgrade to OO model and added namespacing so you can have multiple schema-versioning tables in the same database and update them independently from each other.

To identify subproject and have it’s version to be kept separately, you can supply 3rd parameter when you create DBUpgrade object.

$dbupgrade = new DBUpgrade($db, $versions, 'myproject');

If you omit this parameter (makes sense for main project) then it will revert to previous behavior and use db_version table for this schema’s versioning. This way, it’s backwards compatible and provides easy migration path.

I also renamed a bunch of files so you might want to update your code, but it should be very easy as I provided a boilerplate dbupgrade.php which you can just copy to your folder and move your migrations and DB connection info over.

If you noticed, I also bundled a simple upgrade client which is already included in a boilerplate so it works for full upgrade (will run all migrations to the latest version):

[user@example myproject]$ php dbupgrade.php
Upgrading from v.0 to v.2
Upgraded to v.1
Upgraded to v.2

and single version downgrade (only downgrades to previous version):

[user@example myproject]$ php dbupgrade.php down
Downgrading from v.2 to v.1
Downgraded to v.1

in command line mode.

Full upgrade can also be executed through the web by opening very same dbupgrade.php in the browser:

http://www.example.com/dbupgrade.php

I also moved the project to Github hosting to encourage more openness and community so you can now fork it easily!

Github also supports Subversion read-only endpoints so if you’re using SVN externals to bundle DBUpgrade with your project, you can simply update your trunk URL to:

http://svn.github.com/sergeychernyshev/DBUpgrade.git

Feel free to use it as Git submodule or SVN External within your project and hope you’ll find it much easier to maintain deployment roll-outs now.

ShowSlow 0.10.2 – minor install packages fixed

ShowSlow 0.10 had some minor issues with install packages – fixed now in v0.10.2.

If you had troubles installing 0.10, go ahead and download the latest package:

Installation instructions can be found in the wiki:
http://www.showslow.org/Installation_and_configuration

Kudos go to Johan Bleuzen for filing a bug about the install problems.
Please use issue tracker if you see some issues or missing functionality (patches are welcome too):
http://code.google.com/p/showslow/issues/list

And, as always, you’re very welcome to write an email with questions or suggestions to our mailing list:
http://groups.google.com/group/showslow

ShowSlow 0.10 More metrics and a bit prettier details page

New ShowSlow version 0.10 – all measurements are now surfaced in the breakdown sections on details page.

A few particularly interesting ones, like Page Speed’s Transfer Size and Page Size and dynaTrace’s Total time on network / JavaScript and rendering, for example.

Also some visual prettying up is done with CSS3 gradients for bars (falling back to plain ones for less fortunate browsers) and some better looks for URLs that were just added for monitoring (if you have it enabled on your instance as ShowSlow.com has).

This is a start of the overhaul of details page which is going towards the version 1.0 with the goal of picking your metrics to be displayed on the graph. Stil long way to go though ;)

Follow the upgrade instructions if you already have an instance running.

Or you can download code package and install it.

Web Performance Automation. Joshua Bixby at NY Web Performance

New York Web Performance Group LogoOn October 13th, we have a special speaker: Joshua Bixby (@JoshuaBixby), President of Strangeloop Networks and author of Web Performance Today blog will talk about Web Performance Automation.

Abstract:
Depending on who you talk to, performance automation can range from the holy grail of performance tuning to a set of programming hacks that will bring down your website. In reality, it is neither of these things.

Joshua will talk about:

  • Different approaches to automation
  • Pros and cons of each
  • What kinds of performance best practices can or should be automated
  • What best practices are better left to hands-on developers
  • How “automatic” is performance automation, actually?
  • A survey of the automation market today

More info and RSVP here:
http://www.meetup.com/Web-Performance-NY/calendar/14568561/

Agenda:
6:00 – Arrive to the event, meet other members
6:15 – Introduction to Web Performance
6:30 – Web Performance Automation, Joshua Bixby
8:00 – Q&A
8:30 – Open Discussion, Networking

Time Inc. Watercooler is again hosting our speaker session and Strangeloop Networks is sponsoring pizza and sodas!

Host contact: Alla Gringaus, Web Technology Fellow
Questions: 646 391 9671

Location:
Rockefeller Center
Time & Life Bldg
1271 Ave of the Americas (entrance 50th St and 6th Ave)
2nd Floor, room #1
New York, NY 10020

Nearest Transit:
50th St – 8th Ave (C, E)
50th St – Ave of the Americas (F, V, B, D)
49th St – 7th Ave (N, R, W)

Get directions on Google Maps: http://bit.ly/c5rTgs
Street View for the Entrance: http://bit.ly/bpxpOW

You’ll need to bring a photo ID for security downstairs.

See you there on October 13th at 6:00PM!