Archive | Perl

The Practical Extraction and Reporting Language is one of the most popular Open Source languages and the original ‘P’ of LAMP.

Please stay on the line, as calls are answered in the order in which they are received

Astute fans may have noticed the site seems to be having a little trouble. Yup. The site became non-responsive the morning of 20-Nov-2014, and the usual actions had little effect. There were few clues in the logs nor diagnostics easily pulled from the software. To get up and running quickly, I did the famous “WordPress 5 minute Install” and restored the essential configuration. I’ll be restoring the usual theme, fonts, plugins and assets (pictures, links, videos, etc.) from backups as time allows.

Thank you for your understanding.

This Thursday: Patrick Galbraith at MonadLUG

  • Who: Patrick Galbraith
  • What: Memcached and moxi
  • Date: Thursday, September 10, 2009
  • Time: 7:00PM
  • Where: SAU 1 Offices, 106 Hancock Rd., Peterborough

About the presentation:

Patrick will do a talk on memcached (http://memcached.org/), the moxi memcached proxy (https://code.google.com/p/moxi/) and about Northscale’s memcached AMIs for Amazon EC2 as well as using these with the memcached functions for MySQL (user-defined database functions) that he wrote. How you can use these for caching data to reduce the load on database servers.

About Patrick:

Patrick has been working with Linux since 1993. Some of his previous experiences have included working on Slashdot, Linux.com, Newsforge.com, launching Slashcode.com and Sourceforge Foundries, developing and maintaining DBD::mysql, mysqlslap development and more than I could possibly list here.

He is the author of “Developing Web Applications with Apache, MySQL, memcached, and Perl” published by Wylie and Sons.

Adding Fail2Ban to the web site

I swapped out web servers two weekends ago, when the old machine started showing some unacceptable behavior. Part of that swap involved switching from a CentOS-based Linux distribution to an Ubuntu-based distribution. There were some great learning moments involved in that. I also wanted to swap out a few programs that hadn’t worked as well as I had hoped.

One of the new packages I’m trying out is Fail2Ban, an Python-based application to review the logs and temporarily bans IP addresses based on the patterns of abuse. Similar applications like DenyHosts are well-rated, but DenyHosts specializes in ssh, which hadn’t been too much of a problem for me, and didn’t have a straight-forward configuration for ftp, which unfortunately I must offer. I had used a similar Perl-based application before, but it hadn’t supported a couple of a my applications, and appeared to introduce some instability in the system. Fail2Ban came with configurations for Apache 2 and vsftpd. In their wiki, there was a HOWTO for banning PHP-based file upload attacks, something which had begun to fill the logs with nonsense.

So, 48 hours in and things seem to be running well. The log files clearly show some applications being blocked, other applications seems to be running well, and performance and responsiveness of the site seems to be okay.

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!

EBM better than ABM!

I was listening the FLOSS weekly podcast of Perl monger extrodinaire Randal Schwartz interviewing Jan Lehnardt about CouchDB, a free-form, non-relational database. CouchDB is built by Damien Katz, one of the originators of Notes and a developer currently employed by IBM. The CouchDB project is hosted by the Apache Foundation. Jan mentioned that his projects include “Everything But Microsoft” meaning that his software was running on Linux and BSD, Debian and RedHat and Ubuntu and CentOS and the Unixes and OS X. I found that a much more inclusive and open way of looking at development than “Anything But Microsoft” that’s often portrayed as a irrational and zealous rejection of anything Microsoft. For those who like to put a positive spin on things, I think that EBM beats ABM by a long shot.

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!”

State of the Computer Book Market, Part 4 – The Languages – OReilly Radar

Over at O’Reilly, Mike Hendrickson posts State of the Computer Book Market, Part 4 – The Languages – OReilly Radar. Bear in mind in the world of lies, damned lies and statistics, these are statistics. Like measurements of job posting vs. languages, or web pages vs. languages, these aren’t an indication of what languages are in use out there, or what languages are suitable for use. This is just a measurement of what book titles sold the most, grouped roughly by language. If the best book on your favorite language is years old, it’s probably shown as small here. If a bunch of crappy books got published on the language-of-the-week, and the authors and publishers did a good job of getting a buzz going, it’s probably scoring high. Don’t use this to decide whether to use vi or emacs, tabs or spaces.

But it’s interesting data.

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.