Archive | MySQL

The open source database, often the default.

Notes from NH Ruby, 21-May-2009: Brian Turnbull on Monit, Tim, Nick and the other Nick Lightning Talks

The New Hampshire Ruby / Rails Group met on the 3rd Thursday of the month at RMC Research. (Third-Thursday is the new standard, but June’s meeting is likely to be on a different night; see below.) Ten people attended. Nick Plante started off the meeting, noting that David Berube had to back out due to emergency, but we’d fill in with ad-hoc Lightning talks.

Brian Turnbull talked about Monit [link updated – Ed.] (see his slides here), a small-memory and resource-consuming application for monitoring key performance metrics, and launch scripts and/or alerts when alarm levels are met. Brian talked about early days of managing Mongrel and the necessity to restart the services on failure. While that’s mostly been resolved with later versions (and new options like Passenger), this is still a handy utility for keeping services going, especially if you’re troubleshooting some balky applications. Brian included some clear examples in his slides. We talked about how this wasn’t a solution for remote monitoring (your network could be down, even if you’ve restarted Apache), there were solutions, like running Monit on a couple of machines “watching the watchers” and other solutions, but that Monit was a simple and relatively lightweight solution. Other tools, such as Nagios, are available for more complex problems and the need for customization. Excellent presentation!

Tim Golden, our host, announced he had finally gotten to “Hello World” (a long running joke within the group) and described some of the challenges of setting up a Ruby development environment in Windows. He used the Ruby one-click-installer, and installed many gems. He’s trying out NetBeans as his IDE, and sticking with SQLite as the development database.

Nick Quaranto spoke on his work with gemcutter, developing a new scheme for a gem repository with a simple and scriptable API and a more scaleable and responsive repository architecture. This could grow to be a worthy replacement to RubyForge.

Nick Plante showed off the cool stuff he’s developed at RDoc.info – a web site that displays Ruby documentation generated with Yard . Noting that GitHub hosts your web pages and repositories if you name your repo as yourname.github.com and provide an index.html, he and fellow troublemaker Jeff Rafter came up with the righteous hack of creating the user and repo of http://docs.github.com and hosting the documentation for the thousands of projects hosted at github, fashioning their Yard template to closely duplicate the GitHub interface. For all practical purposes, they added a new feature to GitHub. The GitHub owners were… disturbed. But we hope they’ll come around, as this is a pretty elegant solution.

Nick Quaranto took the podium again to show off the use of Metric-Fu at ThoughtBot for their public projects. Metric-Fu is a rake task that automates other metrics tools (like Flog and Flay) to generate a number of interesting statistics that will point out excessive churn or suspicious smells in a project. Nick showed off the Sinatra front end to the package. This could be another very interesting set of pages on any repository offering software, although Nick noted that it would be resource-intensive, as the test runs and coverage processing can be pretty extensive.

Nick Plante announced a possibility of getting a special speaker in June, although the meeting would need to be on an alternate night. All present agreed that shouldn’t be a problem. Stay tuned for the announcement.

An excellent meeting, well worth the cost of admission. And that’s not even counting the free pizza! Thanks to Nick Plante for organizing the meeting, to Brian, Tim and the two Nicks for their presentations, RMC Research for the great facilities, and all for attending and participating!

If it’s the third Thursday…

If it’s the third Thursday of the month, this must be Portsmouth, New Hampshire. Today’s the day for the (recently rescheduled) New Hampshire Ruby / Rails Group to meet. Tonight’s meeting will feature two presentations: David Berube (co-author, Practical Rails Plugins, former leader of GNHLUG and CentraLUG) talking about high-performance web sites using Ruby on Rails and MySQL, and also Brian Turnbull (contributor to Rails Rumble and Portsmouth Coworking founder) talking about Monit, the monitoring system. The full meeting announcement is here. Hope to see you there!

Notes from MonadLUG, 9-Oct-2008: Patrick Galbraith, MySQL Replication

Twelve attendees made it to the monthly meeting of the Monadnock Region Linux User Group, MonadLUG, at the SAU #1 offices in Peterborough. Our host, Ken, did a great job of finding us an alternate conference room within the building when another group bumped us from our usual spot.

Charlie Farinella called the meeting to order at 7 PM and we had a round of announcements and introductions. There were several new members as well as a few who hadn’t been seen in a while. Charlie announce that Philip Sbrogna had stepped forward to help Charlie run the meetings. Welcome aboard, Philip, and good wishes!

Our main presentation was from Patrick Galbraith. Patrick maintains a web site at http://patg.net , blogs at http://capttofu.livejournal.com/, is currently employed as a Principal Engineer at Lycos, Inc., and has some great stories to tell from past employment with Grazr, MySQL, VA/Linux, OSDN, Slashdot and others. He’s involved with a number of Open Source projects, including as maintainer of DBD::mysqld and libmemcached and others.

Patrick started with slides from a presentation he recently gave at the O’Reilly MySQL 2008 Conference, to establish some basic definitions and terms. He discussed the various models of replication and the pros and cons of each, comparing replication to clustering. He highlighted the files and scripts which needed to be invoked for replication, and the means of running multiple instances of MySQL on a single machine.

Patrick then switched to a terminal window and we began reviewing the configurations of the MySQL instances on his machine. Using a sample database, he established a master-master-slave configuration. Due to the fact that his machine is in constant use as part of his job (and a book he is writing!), the databases were in an inconsistent state. This, imo, is the best part of the meeting, seeing a practitioner use his tools to troubleshoot a system, diagnose the state, and use sometimes obscure commands to return it to a consistent state. Patrick ran a non-stop commentary while debugging his three instances and pointing out metrics of interest and the significance of various debugging commands. When completed, he inserted records into each master and showed how they appeared correctly in each slave and showed off the binary logs used to make the transactions. Excellent illustrations of replication!

There were lots of related discussions and side conversations, too. An intriguing thread involved “blackhole” data storage engines, where the data actually never is written to disk, but the engine exists purely for posting log entries, which can then be replicated. Wow.

Patrick also took a few minutes to tell us about Sphinx, an independent project thats created an extremely fast and powerful full-text search data engine that’s compatible with MySQL. Very impressive. Patrick also mentioned (and customer Philip endorsed) his wireless ISP business, but I missed the name.

Thanks to Patrick for a great presentation, to Charlie and Philip for running the meeting, to Ken and the SAU#1 for the facilities and last minute Mac video cables and to all members for attending and participating!

Catching up…

It’s been busy, busy month, and blogging was one of many things put off. Now, it’s time to start catching up.

I had an awesome month of June. Working on my main client project, we released yet another update on 12 June. After that, I took two weeks “off” — at least away from billing — to do some professional upkeep.

I spent a few days studying and then took the two MySQL 5.0 Developer certification exams on Tuesday the 17th. I went to the Blended Solutions facility in the Mall of New Hampshire, adjoining the PSNH building on Elm Street in Manchester, NH, and took the two exams, back-to-back. The first exam was the simpler of the two. Reviewing all the questions a couple times, I was still done in under an hour. The second exam, though, was a bear! The material was the more advanced stuff, some of the questions were trickier, some of the topics were material I had only book knowledge on. I marked a bunch of questions for review, went back and filled in all the answers, reviewed and debated and over-thought a bunch of questions and then, with three minutes left, decided any answers I changed in a panic were more likely wrong than right, and stopped. I passed both exams with acceptable scores, but nothing I’d brag about. “What do they call the man who graduates at the bottom of his class in med school?” “Doctor.” So, I’m pleased to have the opportunity to establish my level of knowledge, flag a couple of areas I need to learn more about, earn a logo I can display as part of my marketing and gain a listing as a MySQL Enterprise Ready Partner.

Wednesday the 18th of June was the first day of the Red Hat Summit in Boston. I attended all three days, commuting from Contoocook to the Anderson Rail Center in Wilmington and taking public transportation from there. While it made for a lot of hours on the road, the savings over staying in town were significant (total parking and rail for the week: $84 for 6 days), and sleeping at home in my own bed very much appreciated. The Red Hat Summit was a fascinating event. I wasn’t that familiar with the corporate structure or the market focus of Red Hat and I got much better insights into who they are and what they do. Here’s a slew of links on what went on, Red Hat announcements, and links to presentations.

Parallel to the Red Hat Summit was the Fedora Users and Developers Conference, FUDCon10 for short, that shared the Hynes Auditorium facilities on Thursday and Friday, and met at the Photonics Center at Boston University on Saturday. Even though many Fedora participants are Red Hat employees, the tone and structures of the groups are dissimilar. I missed a lot of the last-minute organizational notes the FUDCon’ners put together to organize their HackFest, so I tended to attend the Red Hat sessions instead. In the future, I’m more likely to put more effort into the HackFest side of things. Saturday was a BarCamp, a one-day self-organized conference. As I noted at last year’s conference, the means of pitching sessions, voting, scheduling and running the show are put together on the fly, and the results are startlingly good. Having pretty much had my brain filled of tech at the Red Hat Summit, I chose instead to focus more on process sessions, and learned about bug triaging, web site usability issues, and Fedora structure. A great use of a day, and a great chance to attach faces to the name and shake a few hands.

Sunday was a day of rest for me, and a day of washing laundry for Laura. Thank you!

Monday found me back on the Commuter Rail, this time attending An Event Apart just across the street from the Prudential Center where the Summit had been. Two long days of sessions were focused on the web, primarily design and usability, very different aspects from the two previous conferences. Like the Red Hat Summit, this conference was a little outside my comfort zone, in this case, designers rather than developers. Jeffrey Zeldman puts on an incredible show; facilities were superb, speakers knowledgeable, swag cool. Eric Meyer is the authority in the field of CSS, and it was his sessions I got the most practical tools from, but all of the sessions were well-presented, informative and thought-provoking. Jared Spool of User Interface Engineering had a very funny and very insightful session on analyzing clickstreams for success that will have me restructuring some of my client’s web sites. All of the speakers had great observations on the state of the art and future directions. Great stuff! Several other people took great notes I can share with you.

Arriving back to work on Wednesday, there was no time to decompress; a day of meetings lead to a couple frantic days of shipping yet another release and picking up another couple of projects. Thirty billable hours later, my super-contractor did a high-five tag-team tag and was off on his own adventures, while I took over sheparding a release out the door on Friday with some new features, new team members, new procedures and new prototcols. Whew!

It’s been an exhausting three weeks, but an exhilarating time, too. Hope to blog more details as I catch up on all the other projects.

Developers, developers, developers song gets covered again

We all know the answer is “Developers, developers, developers, developers,” but who’s asking the question these days? It seems like Sun has taken up the song, according to Timothy M. O’Brien’s posting over at O’Reilly, “Surprising Contender: NetBeans as a Ruby+MySQL IDE.” Great news for all of us looking for new tools; NetBeans is shaping up to be a pretty sharp IDE.

I saw a blog post recently and neglected to bookmark it that posited the thesis that rich IDEs were bad when learning a language. A simple text editor and console can be all the interface you might need when when starting off and as your skills increased, the need for code completion, cross-referencing, inline debugging, source code control, refactoring and macros all became more valuable. Witness the training videos on http://www.rubyonrails.org where developers use a browser, a console window and the Textmate editor to build sample applications. The simplicity is appealing.

Continuous Learning Curve: Javascript

I’ve avoided spending too much time delving into Javascript. My four-year switch from Windows-uber-alles (including VFP, VSS, SQL Server, Ingres, Oracle, HTML, OLE, ODBC, SCC, COM, XML, MCSE, MCSD, XSLT, DCOM, RSS, MS Office, Exchange, MAPI Bad, SMTP Good, MVP and more acronyms!) to Linux-Apache-MySQL-Postgres-PHP-Python-Ruby, not to mention XHTML, CSS, bash, Smarty, Django, TWiki, dojo, et al had kept me busy enough. But a new client assignment needs a highly-interactive web site and dropping in great big globs of someone else’s Javascript is not going to solve all the problems; at a minimum, I’ve got to be able to read it, debug it and tune it for the client’s particular needs.

Did you know that a limited version of Safari, the O’Reilly online library, is included with a membership to the Association of Computing Machinery? I’ve been an ACM member for years and been meaning to get around to trying this out. My Javascript studies seemed the perfect occasion. I’m reading Shelley Power’s Learning Javascript online and getting quite a bit out of it. I love when you settle down with a book and start going “Oh, is that what that meant?” or “Now I get it!”

MerriLUG Notes, 17-April-2008: Dan Walsh & SELinux

Eleven people attended the April meeting of MerriLUG, the Merrimack Valley chapter of the Greater New Hampshire Linux User Group. Heather called the meeting to order at 7:30 PM, noted the that attendees were pretty much The Usual Suspects, and dispensed with the long-winded announcements for new members. http://www.gnhlug.org will tell you all you want to know.

Dan Walsh was the main presenter tonight. Dan had a very special visit from the Demo Gods, just before he was to start. His hard drive decided that his boot partition wasn’t. Never heard of ext3. Ouch. Ever the good showman, he borrowed my laptop, downloaded his presentations from the web, and put on a great show.

Dan mentioned that he’d lost his previous laptop during his recent tour in Europe when it was stolen and that maintaining your home directory encrypted was a Good Idea.

Dan reviewed the history of SELinux and the iterations we saw in Fedora 3 though 8 and RHEL 3 through 5 and what to expect in 9. He talked about the evolution of the policies, the different feature sets available, how the SELinux architecture can meet the stringent requirements of DoD level organizations (with bullet points like: “RHEL5: MSP Policy: EAL4+, LSPP, RBAC” – who wouldn’t be impressed?) to the Significant Others at home who really just want a machine to use the browser on.

Dan showed off the new kiosk policy, xguest, which was essentially a minimal-permissions user (no setuid, no executables in the home directory, no installation abilities, etc.) extended to run FireFox. Perfect when someone wants to borrow your machine for a second! In the default settings (installable in F8 or 9 with sudo yum install xguest), it creates a fairly ‘safe’ user that can’t do a lot of harm and whose directories are temporary RAM-based and vanish when the user logs out. (You can modify it to keep a persistent home to store cookies and bookmarks.) Ideal for a library or public kiosk situations. Yes, the evil minded boys in the room could come up with some work-around exploits, but this is a promising start!

Thanks to Dan for a great presentation under trying circumstances, to Heather and Jim for managing and promoting the meetings, to Martha’s Exchange for providing the facilities, and to all who attended and participated.

UPDATE: Dan’s posted an article to Red Hat Magazine, “Confining the user with SELinux” that covers a lot of material in the presentation, with more detail than my notes and links for further study.

Notes from MonadLUG, 10-April-2008: Guy Pardoe and Joomla

Sixteen people were present for the April Meeting of MonadLUG, the Monadnock Area Linux User Group meeting, held as usual on the second Thursday of the month at the School Administrative Unit #1 main office off Hancock Road in Peterborough.

As is usual with most LUG meetings, we spent the standard ten minutes wrestling with monitor settings for the cool new projector. We couldn’t do better than 640 x 480 so Guy was a trooper and persevered through the presentation at teeny resolution. Ouch. We’ll have to do some research to figure out how to get this new projector system to rock and roll.

Guy reminisced about his last presentation, (February last year) where he had talked about the new version of Joomla, which was due Real Soon Now and how he had promised to be back when it was released. In April of 2008, he was back to report that 1.5 is released, and the wait was worthwhile. In fact, version 1.5.2 is out now.

There was a discussion of the many new content management systems – Drupal is another one that’s received a lot of attention. Guy had also heard another one – ModX (http://modxcms.com/) that he hears all the cool kids are playing with.

Guy talked about how the web grew up in a table driven layout just to get positioning right, and that as css came along, that was prefered. Joomla templates are nearly always 100% CSS and valid HTML with few or no tables, and how there’s a lot of advantages from better accessibility, easier localization, better search engine optimization and fewer cavities.

As part of his presentation, Guy downloaded the .zip from the web site www.joomla.org, un-zipped the package, copied to an install directory, ran the installation (a pre-flight check, verified versions, etc.) and he was up and running (Joomla reminded to remove installation). Members noted that Guy showed them things about file management using the GNOME file manager that no one had bothered to try, since they would have all done it from a shell. Guy didn’t apologize for being a Windows refugee. There’s more than one way…

Guy talked about the first presentation of Joomla we saw, from Barrie North on 7 September 2006 at DLSLUG. Barrie has recently published a book, which Guy had with him and praised.

Guy gave us tour of the interface, both the public presentation and the administrative interface. Built-in default templates are pretty slick. The setup wizard was quite graceful. And addons and replacement templates seem to be available in huge quantities (Ted: downloading code off the internet and installing it to run on your computers without inspecting and understanding the code is a Bad Idea. Use only trustworthy sites and review what you get.)

Finally, Guy showed off a site he is developing for a client at Bristol Elder Care and talked about what was involved in getting the site up and running.

Thanks to Guy for a great presentation, to Charlie for organizing the meeting, to Ken and the SAU for the great facilities.

YA Javascript library: Ext

Sometimes I think the community of Javascript libraries is like a high school popularity contest, with crowds swarming one cool thing before dropping it and moving on to the next. In a project last year, we started with a little hand-coded JS to spice up the site a little bit, then started dipping into the bigger UI libraries of Dojo, script.aculo.us, Prototype and more as the clients expectations went through the roof. I still have deep misgivings on making a web site work like a rich client application using HTML, CSS Javascript and/or AJAX. It’s still a web page, not an RIA, and concerns over web-scale scalability, responsiveness, variation in the client machine (six different browsers, JS on or off, Flash on/off, various readers for accessibility to the visually impaired, rendering on small devices, etc.) make rolling-your-own a fool’s mission.

We’d stabilized on a set of tools long enough for me to start to dig deep into its capabilities, when along comes a suggestion we look at Yet Another JS library, Ext. It is impressive at first glance, no doubt, and the demos have the requisite whiz, bang, oooh and aaah. But concerns over maturity, licensing, suitability to task, cost of retooling existing pages make it a questionable switch. At some time you have to commit, people. Live with what you’ve got or face the costs of serious rewrite. The tenets of RAD, XP and “Agile” as promoted by Scott Adams in DIlbert, not true practitioners, have given folks in charge the impression that they can just chase after the next shiny thing and follow the fashions without concern to the engineering implications of launching a world-class web site. Ah, well, my consultant friends tell me. This is why we get the big bucks.

Now I hear tell jQuery is where its at…

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.