<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Musings of an Anonymous Geek &#187; Linux</title>
	<atom:link href="http://www.protocolostomy.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.protocolostomy.com</link>
	<description>Made with only the finest 1's and 0's</description>
	<lastBuildDate>Thu, 03 Nov 2011 04:08:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The Python User Group in Princeton (PUG-IP): 6 months in</title>
		<link>http://www.protocolostomy.com/2011/11/02/the-python-user-group-in-princeton-pug-ip-6-months-in/</link>
		<comments>http://www.protocolostomy.com/2011/11/02/the-python-user-group-in-princeton-pug-ip-6-months-in/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 04:08:40 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Big Ideas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=956</guid>
		<description><![CDATA[In May, 2011, I started putting out feelers on Twitter and elsewhere to see if there might be some interest in having a Python user group that was not in Philadelphia or New York City. A single tweet resulted in 5 positive responses, which I took as a success, given the time-sensitivity of Twitter, my [...]]]></description>
			<content:encoded><![CDATA[<p>In May, 2011, I started putting out feelers on Twitter and elsewhere to see if there might be some interest in having a Python user group that was not in Philadelphia or New York City. A single tweet resulted in 5 positive responses, which I took as a success, given the time-sensitivity of Twitter, my &#8220;reach&#8221; on Twitter (which I assume is far smaller than what might be the entire target audience for that tweet), etc.</p>
<p>Happy with the responses I received, I still wanted to take a baby step in getting the group started. Rather than set up a web site that I&#8217;d then have to maintain, a mailing list server, etc., I went to the cloud. I started a <a href="http://meetup.com/pug-ip">group on meetup.com</a>, and started looking for places to hold our first meeting.</p>
<h3>Meetup.com</h3>
<p>Meetup.com, I&#8217;m convinced, gives you an enormous value if you&#8217;re looking to start a user group Right Now, Today™. For $12/mo., you get a place where you can announce future meetups, hold discussions, collect RSVPs so you have a head count for food or space or whatever, and vendors can also easily jump in to provide sponsorship or &#8216;perks&#8217; in the form of discounts on services to user group members and the like. It&#8217;s a lot for a little, and it&#8217;s worked well enough. If we had to stick with it for another year, I&#8217;d have no real issue with that.</p>
<h3>Google Groups</h3>
<p>I set up a mailing list using Google Groups about 2-3 months ago now. I only waited so long because I thought meetup.com&#8217;s discussion forum might work for a while. After a few meetings, though, I noticed that there were always about five more people in attendance than had RSVP&#8217;d on meetup.com. Some people just aren&#8217;t going to be bothered with having yet another account on yet another web site I guess. If that&#8217;s the case, then I have two choices (maybe more, but these jumped to mind): force the issue by constantly trumpeting meetup.com&#8217;s service, or go where everyone already was. Most people have a Google account, and understand its services. Also, since the group is made up of technical people, they mostly like the passive nature of a mailing list as opposed to web forums.</p>
<p>If you&#8217;re setting up a group, I&#8217;d say that setting up a group on meetup.com and simultaneously setting up a Google group mailing list is the way to go if you want to get a fairly complete set of services for very little money and about an hour&#8217;s worth of time.</p>
<h3>Meeting Space</h3>
<p>Meeting space can come from a lot of different places, but I had a bit of trouble settling on a place at first. Princeton University is an awesome place and has a ton of fantastic places to meet with people, but if you&#8217;re not living on campus (almost no students are group members, btw), parking can be a bit troublesome, and Princeton University is famous for having little or no signage, and that includes building names, so finding where to go even if you did find parking can be problematic. So, so far, the University is out.</p>
<p>The only sponsor I had that was willing to provide space was my employer, but we&#8217;re nowhere near Princeton, and don&#8217;t really have the space. Getting a sponsor for space can be a bit difficult when your group doesn&#8217;t exist yet, in part because none of them have engaged with you or your group until the first meeting, when the attendees, who all work for potential sponsors, show up.</p>
<p>I started looking at the web site for the <a href="http://www.princeton.lib.nj.us/">Princeton Public Library</a>. I&#8217;ve been involved in the local Linux user group for several years, and they use free meeting space made available by the public library in Lawrenceville, which borders Princeton. I wondered if the Princeton Public Library did this as well, but they don&#8217;t, actually. In fact, meeting space at that location can get pretty expensive, since they charge for the space and A/V equipment like projectors and stuff separately (or they did when I started the group &#8211; I believe it&#8217;s still the case).</p>
<p>I believe I tweeted my disappointment about the cost of meeting at the Princeton Public Library, and did a callout on Twitter for space sponsors and other ideas about meeting space in or near Princeton. The Princeton Public Library got in touch through their @PrincetonPL Twitter account, and we were able to work out a really awesome deal where they became a sponsor, and agreed to host our group for 6 months, free of charge. Awesome!</p>
<p>Now, six months in, we either had to come to some other agreement with the library, or move on to a new space. After six months, it&#8217;s way easier to find space, or sponsors who might provide space, but I felt if we could find some way to continue the relationship with the library, it&#8217;d be best not to relocate the group. We wound up finding a deal that does good things for the group, the library, the local Python user community, and the evangelism of the Python language&#8230;.</p>
<h3>Knowledge for Space</h3>
<p>Our group got a few volunteers together to commit to providing a 5-week training course to the public, held at the Princeton Public Library. Adding public offerings like this adds value to the library, attracts potential new members (they&#8217;re a member-supported library, not a state/municipality-funded one), etc. In exchange for providing this service to the library, the library provides us with free meeting space, including the A/V equipment.</p>
<p>If you don&#8217;t happen to have a public library that offers courses, seminars, etc., to the general public, you might be able to cut a similar deal with a local community college, or even high school. If you know of a corporation locally that uses Python or some other technology the group can speak or train people in, you might be able to trade training for meeting space in their offices. Training is a valued perk to the employees of most corporations.</p>
<h3>How To Get Talks (or &#8220;How we stopped caring about getting talks&#8221;)</h3>
<p>Whether you&#8217;re running a publishing outfit, a training event, or user group, getting people to deliver content is a challenge. Some people don&#8217;t think they have any business talking to what they perceive as a roomful of geniuses about anything. Some just aren&#8217;t comfortable talking in front of audiences, but are otherwise convinced of their own genius. Our group is trying to attack this issue in various ways, and so far it seems to be working well enough, though more ideas are welcome!</p>
<p>Basically, the group isn&#8217;t necessarily locked into traditions like &#8220;Thou shalt provide a speaker, who shalt bequeath upon our many wisdom of the ages&#8221;. Once you&#8217;ve decided as a group that having cookie-cutter meetings isn&#8217;t necessary, you start to think of all sorts of things you could all be doing together.</p>
<p>Below are some ideas, some in the works, some in planning, that I hope help other would-be group starters to get the ball rolling, and keep it in motion!</p>
<h3>Projects For the Group, By the Group</h3>
<p>Some members of PUG-IP are working together on building the pugip.org website, which is housed in a GitHub repository under the <a href="https://github.com/pugip">&#8216;pugip&#8217; GitHub organization</a>. This one project will inevitably result in all kinds of home-grown presentations &amp; events within the group. As new ideas come up and new features are implemented, people will give lightning talks about their implementation, or we&#8217;ll do a group peer review of the code, or we&#8217;ll have speakers give talks about third-party technologies we might use (so, we might have two speakers each give a 30-minute talk about two different NoSQL solutions, for example. We&#8217;ve already had a great overview of about 10 different Python micro-frameworks), etc.</p>
<p>We may also decide to break up into pairs, and then sprint together on a set of features, or a particularly large feature, or something like that.</p>
<p>As of now, we&#8217;ve made enough decisions as a group to get the ball rolling. If there&#8217;s any interest I can blog about the setup that allows the group to easily share, review, and test code, provide live demos of their work, etc. The tl;dr version is we use GitHub and free heroku accounts, but new ideas come into play all the time. Just today I was wondering if we could, as a group, make use of the cloud9 IDE (http://cloud9ide.com).</p>
<p>The website is a great idea, but other group projects are likely to come up.</p>
<h3>Community Outreach</h3>
<p>PUG-IPs first official community outreach project will be the training we provide through the Princeton Public library. A few of us will collaborate on delivering the training, but the rest of the group will be involved in providing feedback on various aspects of the material, etc., so it&#8217;s a &#8216;whole group&#8217; project, really. On top of increasing interactivity among the group members, outreach is also a great way to grow and diversify the group, and perhaps gain sponsorships as well!</p>
<p>There&#8217;s another area group called <a href="http://lugip.org">LUG-IP</a> (a Linux user group) that also does some community outreach through a hardware SIG (special interest group), certification training sessions, and participating in local computing events and conferences. I&#8217;d like to see PUG-IP do this, too, maybe in collaboration with the LUG (they&#8217;re a good and passionate group of technologists).</p>
<p>Community outreach can also mean teaming up with various other technology groups, and one event I&#8217;m really looking forward to is a RedSnake meeting to be held next February. A RedSnake meeting is a combined meeting between <a href="http://www.meetup.com/phillypug/">PhillyPUG</a> (the Philadelphia Python User Group) and <a href="http://phillyrb.org/">Philly.rb</a> (the Philadelphia Ruby Group). As a member of PhillyPUG I participated in last year&#8217;s RedSnake meeting, and it was a fantastic success. Probably 70+ people in attendance (<a href="http://twitpic.com/3xv2fi">here&#8217;s a pic</a> at the end &#8211; some had already left by the time someone snapped this), and perhaps 10 or so lightning talks given by members of both organizations. We tried to do a &#8216;matching&#8217; talk agenda at the meeting, so if someone on the Ruby side did a testing talk, we followed that with a Python testing talk, etc. It was a ton of fun, and the audience was amazing.</p>
<h3>Socials</h3>
<p>Socials don&#8217;t have to be dedicated events, per se. For example, PUG-IP has a sort of mini-social after every single meetup. We&#8217;re lucky to have our meetings located about a block away from a brewpub, so after each meeting, perhaps half of us make it over for a couple of beers and some great conversations. After a few of these socials, I started noticing that more talk proposals started to spring up.</p>
<p>Of course, socials can also be dedicated events. Maybe some day PUG-IP will&#8230;. I dunno&#8230; go bowling? Or maybe we&#8217;ll go as a group to see the next big geeky movie that comes out. Maybe we&#8217;ll have some kind of all-inclusive, bring-the-kids BBQ next summer. Who knows?</p>
<p>As a sort of sideshow event to the main LUG meetings, LUG-IP has a regularly-scheduled <a href="http://lugip.org/node/326">&#8216;coffee klatch&#8217;</a>. Some of the members meet up one Sunday per month at (if memory serves) 8-11AM at a local Panera for coffee, pastries, and geekery. It&#8217;s completely informal, but it&#8217;s a good time.</p>
<h3>Why Not Having Talks Will Help You Get Talks</h3>
<p>I have a theory that is perhaps half-proven through my experiences with technology user groups: increasing engagement among and between the members of the group in a way that doesn&#8217;t shine a huge floodlight on a single individual (like a talk would) eventually breaks down whatever fears or resistance there is to proposing and giving a talk. Sometimes it&#8217;s just a comfort level thing, and working on projects, or having a beer, or sprinting on code, etc. &#8212; together &#8212; turns a &#8220;talking in front of strangers&#8221; experience into more of a &#8220;sharing with my buddies&#8221; one.</p>
<p>I hope that&#8217;s true, anyway. It seems to be. <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Thanks For Reading</h3>
<p>I hope someone finds this useful. It&#8217;s early on in the life of PUG-IP, but I thought it would be valuable to get these ideas out into the ether early and often before they slip from my brain. Good luck with your groups!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/11/02/the-python-user-group-in-princeton-pug-ip-6-months-in/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>pyrabbit Makes Testing and Managing RabbitMQ Easy</title>
		<link>http://www.protocolostomy.com/2011/10/23/pyrabbit-makes-testing-and-managing-rabbitmq-easy/</link>
		<comments>http://www.protocolostomy.com/2011/10/23/pyrabbit-makes-testing-and-managing-rabbitmq-easy/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 18:05:02 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=949</guid>
		<description><![CDATA[I have a lot of hobby projects, and as a result getting any one of them to a state where I wouldn&#8217;t be completely embarrassed to share it takes forever. I started working on pyrabbit around May or June of this year, and I&#8217;m happy to say that, while it&#8217;ll never be totally &#8216;done&#8217; (it [...]]]></description>
			<content:encoded><![CDATA[<p>I have a lot of hobby projects, and as a result getting any one of them to a state where I wouldn&#8217;t be completely embarrassed to share it takes forever. I started working on pyrabbit around May or June of this year, and I&#8217;m happy to say that, while it&#8217;ll never be totally &#8216;done&#8217; (it is software, after all), it&#8217;s now in a state where I&#8217;m not embarrassed to say I wrote it.</p>
<h3>What is it?</h3>
<p>It&#8217;s a Python module to help make managing and testing RabbitMQ servers easy. RabbitMQ has, for some time, made available a RESTful interface for programmatically performing all of the operations you would otherwise perform using their browser-based management interface.</p>
<p>So, pyrabbit lets you write code to manipulate resources like vhosts &amp; exchanges, publish and get messages, set permissions, and get information on the running state of the broker instance. Note that it&#8217;s *not* suitable for writing AMQP consumer or producer applications; for that you want an *AMQP* module like <a href="http://github.com/pika/pika">pika</a>.</p>
<p>PyRabbit is tested with Python versions 2.6-3.2. The testing is automated using <a href="http://pypi.python.org/pypi/tox/1.1">tox</a>. In fact, PyRabbit was a project I started in part because I wanted to play with tox.</p>
<p>Here&#8217;s the example, ripped from the <a href="http://pyrabbit.readthedocs.org">documentation</a> (which is ripped right from my own terminal session):</p>
<pre>&gt;&gt;&gt; from pyrabbit.api import Client
&gt;&gt;&gt; cl = Client('localhost:55672', 'guest', 'guest')
&gt;&gt;&gt; cl.is_alive()
True
&gt;&gt;&gt; cl.create_vhost('example_vhost')
True
&gt;&gt;&gt; [i['name'] for i in cl.get_all_vhosts()]
[u'/', u'diabolica', u'example_vhost', u'testvhost']
&gt;&gt;&gt; cl.get_vhost_names()
[u'/', u'diabolica', u'example_vhost', u'testvhost']
&gt;&gt;&gt; cl.set_vhost_permissions('example_vhost', 'guest', '.*', '.*', '.*')
True
&gt;&gt;&gt; cl.create_exchange('example_vhost', 'example_exchange', 'direct')
True
&gt;&gt;&gt; cl.get_exchange('example_vhost', 'example_exchange')
{u'name': u'example_exchange', u'durable': True, u'vhost': u'example_vhost', u'internal': False, u'arguments': {}, u'type': u'direct', u'auto_delete': False}
&gt;&gt;&gt; cl.create_queue('example_queue', 'example_vhost')
True
&gt;&gt;&gt; cl.create_binding('example_vhost', 'example_exchange', 'example_queue', 'my.rtkey')
True
&gt;&gt;&gt; cl.publish('example_vhost', 'example_exchange', 'my.rtkey', 'example message payload')
True
&gt;&gt;&gt; cl.get_messages('example_vhost', 'example_queue')
[{u'payload': u'example message payload', u'exchange': u'example_exchange', u'routing_key': u'my.rtkey', u'payload_bytes': 23, u'message_count': 2, u'payload_encoding': u'string', u'redelivered': False, u'properties': []}]
&gt;&gt;&gt; cl.delete_vhost('example_vhost')
True
&gt;&gt;&gt; [i['name'] for i in cl.get_all_vhosts()]
[u'/', u'diabolica', u'testvhost']</pre>
<p>Hopefully you&#8217;ll agree that this is simple enough to use in a Python interpreter to get information and do things with RabbitMQ &#8216;on the fly&#8217;.</p>
<h3>How Can I Get It?</h3>
<p>Well, there&#8217;s already a package on PyPI called &#8216;pyrabbit&#8217;, and it&#8217;s not mine. It&#8217;s some planning-stage project that has no actual software associated with it. I&#8217;m not sure when the project was created, but the PyPI page has a broken home page link, and what looks like a broken RST-formatted doc section. I&#8217;ve already pinged someone to see if it&#8217;s possible to take over the name, because I can&#8217;t think of a cool name to change it to.</p>
<p>Until that issue is cleared up, you can get downloadable packages or clone/fork the code at the <a href="http://github.com/bkjones/pyrabbit">pyrabbit github page</a> (see the &#8216;Tags&#8217; section for downloads), and the <a href="http://pyrabbit.readthedocs.org">documentation</a> is hosted on the (awesome) ReadTheDocs.org site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/10/23/pyrabbit-makes-testing-and-managing-rabbitmq-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slides, an App, a Meetup, and More On the Way</title>
		<link>http://www.protocolostomy.com/2011/06/02/slides-an-app-a-meetup-and-more-on-the-way/</link>
		<comments>http://www.protocolostomy.com/2011/06/02/slides-an-app-a-meetup-and-more-on-the-way/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 03:27:44 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Big Ideas]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Me stuff]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=922</guid>
		<description><![CDATA[I&#8217;ve been busy. Seriously. Here&#8217;s a short dump of what I&#8217;ve been up to with links and stuff. Hopefully it&#8217;ll do until I can get back to my regular blogging routine. PICC &#8217;11 Slides Posted I gave a Python talk at PICC &#8217;11. If you were there, then you have a suboptimal version of the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been busy. Seriously. Here&#8217;s a short dump of what I&#8217;ve been up to with links and stuff. Hopefully it&#8217;ll do until I can get back to my regular blogging routine.</p>
<h2>PICC &#8217;11 Slides Posted</h2>
<p>I gave a Python talk at PICC &#8217;11. If you were there, then you have a suboptimal version of the slides, both because I caught a few bugs, and also because they&#8217;re in a flattened, lifeless PDF file, which sort of mangles anything even slightly fancy. I&#8217;m not sure how much value you&#8217;ll get out of these because my presentation slides tend to present code that I then explain, and you won&#8217;t have the explanation, but people are asking, <a href="http://public.iwork.com/document/?d=PythonPICC11.key&amp;a=p55961227">so here they are in all their glory</a>. Enjoy!</p>
<h2>I Made a Webapp Designed To Fail</h2>
<p>No really, I did. <a href="http://webstatuscodes.appspot.com" target="_blank">WebStatusCodes</a> is the product of necessity. I&#8217;m writing a Python module that provides an easy way for people to talk to a web API. I test my code, and for some of the tests I want to make sure my code reacts properly to certain HTTP errors (or in some cases, to *any* HTTP status code that&#8217;s not 200). In unit tests this isn&#8217;t hard, but when you&#8217;re starting to test the network layers and beyond, you need something on the network to provide the errors. That&#8217;s what <a href="http://webstatuscodes.appspot.com" target="_blank">WebStatusCodes</a> does. It&#8217;s also a simple-but-handy reference for HTTP status codes, though it is incomplete (418 I&#8217;m a teapot is not supported). Still, worth checking out.</p>
<p>Interesting to note, this is my first AppEngine application, and I believe it took me 20 minutes to download the SDK, get something working, and get it deployed. It was like one of those &#8216;build a blog in -15 minutes&#8217; moments. Empowering the speed at which you can create things on AppEngine, though I&#8217;d be slow to consider it for anything much more complex.</p>
<h2>Systems and Devops People, Hack With Me!</h2>
<p>I like systems-land, and a while back I was stuck writing some reporting code, which I really don&#8217;t like, so I started a side project to see just how much cool stuff I could do using the /proc filesystem and nothing but pure Python. I didn&#8217;t get too far because the reporting project ended and I jumped back into all kinds of other goodness, but there&#8217;s a <a href="http://github.com/bkjones/pyproc" target="_blank">github project called pyproc</a> that&#8217;s just a single file with a few functions in it right now, and I&#8217;d like to see it grow, so fork it and send me pull requests. If you know Linux systems pretty well but are relatively new to Python, I&#8217;ll lend you a hand where I can, though time will be a little limited until the book is done (see further down).</p>
<p>The other projects I&#8217;m working on are sort of in pursuit of larger fish in the Devops waters, too, so be sure to check out the other projects I mention later in this post, and <a href="https://github.com/bkjones/" target="_blank">follow me on github</a>.</p>
<h2>Python Meetup Group in Princeton NJ</h2>
<p>I started a <a href="http://meetup.com/pug-ip" target="_blank">Meetup group for Pythonistas that probably work in NYC or PA, but live in NJ</a>. I work in PA, and before this group existed, the closest group was in Philly, an hour from home. I put my feelers out on Twitter, found some interest, put up a quick Meetup site, and we had 13 people at the first meetup (more than had RSVP&#8217;d). It&#8217;s a great group of folks, but more is always better, so check it out if you&#8217;re in the area. We hold meetings at the beautiful <a href="http://www.princeton.lib.nj.us/" target="_blank">Princeton Public Library </a>(who <a href="http://twitter.com/pugip" target="_blank">found us</a> <a href="http://twitter.com/princetonpl" target="_blank">on twitter</a> and now sponsors the group!), which is just a block or so from Triumph, the local microbrewery. I&#8217;m hoping to have a post-meeting impromptu happy hour there at some point.</p>
<h2>Python Cookbook Progress</h2>
<p>The Python Cookbook continues its march toward production. Lots of work has been done, lots of lessons have been learned, lots of teeth have been gnashed. The book is gonna rock, though. I had the great pleasure of porting all of the existing recipes that are likely to be kept over to Python 3. Great fun. It&#8217;s really amazing to see just how it happens that a 20-line recipe is completely obviated by the addition of a single, simple language feature. It&#8217;s happened in almost every chapter I&#8217;ve looked at so far.</p>
<p>If you have a recipe, or stumble upon a good example of some language feature, module, or other useful tidbit, whether it runs in Python 3 or not, let me know (see &#8216;Contact Me&#8217;). The book is 100% Python 3, but I&#8217;ve gotten fairly adept at porting things over by now <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Send me your links, your code, or whatever. If we use the recipe, the author will be credited in the book, of course.</p>
<h2>PyRabbit is Coming</h2>
<p>In the next few days I&#8217;ll be releasing a Python module on github that will let you easily work with RabbitMQ servers using that product&#8217;s HTTP management API. It&#8217;s not nearly complete, which is why I&#8217;m releasing it. It does some cool stuff already, but I need another helper or two to add new features and help do some research into how RabbitMQ broker configuration affects JSON responses from the API.<a href="https://github.com/bkjones" target="_blank"> Follow me on github</a> if you want to be the first to know when I get it released. You probably also want to <a href="https://github.com/myyearbook" target="_blank">follow myYearbook on github</a> since that&#8217;s where I work, and I might release it through the myYearbook github organization (where we also release lots of other cool open source stuff).</p>
<h2>Python Asynchronous AMQP Consumer Module</h2>
<p>I&#8217;m also about 1/3 of the way through a project that lets you write AMQP consumers using the same basic model as you&#8217;d write a Tornado application: write your handler, import the server, link the two (like, one line of code), and call consume(). In fact, it uses the Tornado IOLoop, as well as <a href="https://github.com/pika/pika" target="_blank">Pika</a>, which is an asynchronous AMQP module in Python (maintained by none other than <a href="https://github.com/gmr" target="_blank">my boss</a> and myYearbook CTO,  <a href="http://twitter.com/#!/crad" target="_blank">@crad</a>), which also happens to support the Tornado IOLoop directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/06/02/slides-an-app-a-meetup-and-more-on-the-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8216;Grokking Python&#8217; Going to PICC Conference!</title>
		<link>http://www.protocolostomy.com/2011/04/07/grokking-python-going-to-picc-conference/</link>
		<comments>http://www.protocolostomy.com/2011/04/07/grokking-python-going-to-picc-conference/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 01:45:43 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=915</guid>
		<description><![CDATA[In conjunction with my involvement as co-author of the upcoming Python Cookbook, 3rd Ed. (not yet released), a tutorial at this year&#8217;s PyCon in Atlanta, an internal (and ongoing) lunchtime seminar series entitled &#8216;Snakes On a Plate&#8217;, and other recent Python-related projects, I&#8217;ve also been refining and revising what I can now call a completely [...]]]></description>
			<content:encoded><![CDATA[<p>In conjunction with my involvement as co-author of the <a href="http://www.protocolostomy.com/2010/12/16/good-things-come-in-threes-python-cookbook-third-edition/">upcoming Python Cookbook, 3rd Ed.</a> (not yet released), a <a href="http://us.pycon.org/2011/schedule/presentations/274/">tutorial at this year&#8217;s PyCon</a> in Atlanta, an internal (and ongoing) lunchtime seminar series entitled &#8216;Snakes On a Plate&#8217;, and other <a href="http://www.protocolostomy.com/2011/02/25/lessons-learned-porting-dateutil-to-python-3/">recent Python-related projects</a>, I&#8217;ve also been refining and revising what I can now call a completely awesome 3-hour introduction to the Python programming language.</p>
<p>If you&#8217;re a sysadmin, operations engineer, devops engineer, or just want to get your hands dirty with Python, I can&#8217;t think of a better more cost-effective way to do it than to attend the <a href="http://www.picconf.org/training-program#f2">&#8216;Grokking Python&#8217; tutorial</a> at this year&#8217;s <a href="http://picconf.org">PICC conference</a>, which is being held in New Brunswick, NJ, April 29-30.</p>
<p>While I do plan for the tutorial to run through the basics, I also assume attendees have programmed in some other language before. In addition, I firmly believe that, properly presented, most would find that Python is a very simple language to get to know and understand. That being the case, the most basic elements of the language (control statements, loops, etc) will be covered in the first hour (and the materials will be available for later reference).</p>
<p>Once we&#8217;re through that, it&#8217;s head first into what admin/ops engineers do for a living. Python was developed by a systems programmer for systems programming. As such, support for a huge swath of admin tasks (and far, far beyond) is baked into the language, and enormous tomes have been written covering third party tools and modules to do anything else you can possibly imagine.</p>
<p>We&#8217;re going to look at some of the more ho-hum parts of scripting, like accepting input from users, command line options and arguments, and file handling, but before it&#8217;s over we&#8217;re going to have a look at the basics of email, networking, multiprocessing, threading, coroutines, SSH, and more.</p>
<p>We&#8217;re also going to cover use of the Python interactive shell, which will not only help speed your mastery of the language and its standard library, but also holds promise as a sysadmin tool in its own right.</p>
<p>The blowing of minds is a goal of the tutorial. Bring a laptop, and bring some bandages <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2011/04/07/grokking-python-going-to-picc-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brain Fried Over NoSQL</title>
		<link>http://www.protocolostomy.com/2010/06/26/brain-fried-over-nosql/</link>
		<comments>http://www.protocolostomy.com/2010/06/26/brain-fried-over-nosql/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 03:16:02 +0000</pubDate>
		<dc:creator>bkjones</dc:creator>
				<category><![CDATA[Big Ideas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.protocolostomy.com/?p=799</guid>
		<description><![CDATA[So, I&#8217;m working on a pet project. It&#8217;s in stealth mode. Just kidding &#8212; I don&#8217;t believe in stealth mode It&#8217;s a twitter analytics dashboard that actually does useful things with the mountains of data available from the various Twitter APIs. I&#8217;m writing it in Python using Tornado. Here&#8217;s the first mockup I ever did [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m working on a pet project. It&#8217;s in stealth mode. Just kidding &#8212; I don&#8217;t believe in stealth mode <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>It&#8217;s a twitter analytics dashboard that actually does useful things with the mountains of data available from the various Twitter APIs. I&#8217;m writing it in Python using Tornado. Here&#8217;s the first mockup I ever did for it, just like 2 nights ago:</p>
<p><a href="http://www.protocolostomy.com/wp-content/uploads/2010/06/tweetdash-mockup.png"><img class="alignleft size-medium wp-image-800" title="mockup" src="http://www.protocolostomy.com/wp-content/uploads/2010/06/tweetdash-mockup-300x214.png" alt="" width="413" height="294" /></a> It&#8217;s already a lot of fun. I&#8217;ve worked with Tornado before and like it a lot. I have most of the base infrastructure questions answered, because this is a pet project and they&#8217;re mostly easy and in some sense &#8220;don&#8217;t matter&#8221;. But that&#8217;s what has me stuck.</p>
<h3>It Doesn&#8217;t Matter</h3>
<p>It&#8217;s true. Past a certain point, belaboring choices of what tools to use where is pointless and is probably premature optimization. I&#8217;ve been working with startups for the past few years, and I&#8217;m painfully aware of what happens when a company takes too long to react to their popularity. I want to architect around that at the start, but I&#8217;m resisting. It&#8217;s a pet project.</p>
<p>But if it doesn&#8217;t matter, that means I can choose tools that are going to be fun to dig into and learn about. I&#8217;ve been so busy writing code to help avoid or buffer impact to the database that I haven&#8217;t played a whole lot with the NoSQL choices out there, and there are tons of them. And they all have a different world view and a unique approach to providing solutions to what I see as somewhat different problems.</p>
<h3>Why NoSQL?</h3>
<p>Why not? I&#8217;ve been working with relational database systems since 1998. I worked on large data reporting projects, a couple of huge data warehousing projects, financial transaction systems, I worked for Sybase as a consulting DBA and project manager for a while, I was into MySQL and PostgreSQL by 2000, used them in production environments starting around 2001-02&#8230; I understand them fairly well. I also understand BDB and other &#8220;flat-file&#8221; databases and object stores. SQLite has become unavoidable in the past few years as well. It&#8217;s not like I don&#8217;t understand the compromises I&#8217;m making going to a NoSQL system.</p>
<p>There&#8217;s a good bit of talk from the RDBMS camp (seriously, why do they need their own camp?) about why NoSQL is bad. Lots of people who know me  would put me in the RDBMS camp, and I&#8217;m telling you not to cry yourself to sleep out of guilt over a desire to get to know these systems. They&#8217;re interesting, and they solve some huge issues surrounding scalability with greater ease than an RDBMS.</p>
<p>Like what? Well, cost for one. If I could afford Oracle I&#8217;d sooner use that than go NoSQL in all likelihood. I can&#8217;t afford it. Not even close. Oracle might as well charge me a small planet for their product. It&#8217;s great stuff, but out of reach. And what about sharding? Sharding a relational database sucks, and to try to hide the fact that it sucks requires you to pile on all kinds of other crap like query proxies, pools, and replication engines, all in an effort to make this beast do something it wasn&#8217;t meant to do: scale beyond a single box. All this stuff also attempts to mask the reality that you&#8217;ve also thrown your hands in the air with respect to at least 2 letters that make up the ACID acronym. What&#8217;s an RDBMS buying you at that point? Complexity.</p>
<p>And there&#8217;s another cost, by the way: no startup I know has the kind of enormous hardware that an enterprise has. They have access to commodity hardware. Pizza boxes. Don&#8217;t even get me started on storage. I&#8217;ve yet to see SSD or flash storage at a startup. I currently work at MyYearbook.com, and there are some pretty hefty database servers there, but it can hardly be called a startup anymore. Hell, they&#8217;re even profitable! <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h3>Where Do I Start?</h3>
<p>One nice thing about relationland is I know the landscape pretty well. Going to NoSQL is like dropping me in a country I&#8217;ve never heard of where I don&#8217;t really speak the language. I have some familiarity with key-value stores from dealing with BDB and Memcache, and I&#8217;ve played with MongoDB a bit (using pymongo), but that&#8217;s just the tip of the iceberg.</p>
<p>I heard my boss mention Tokyo Tyrant a few times, so I looked into it. It seems to be one of the more obscure solutions out there from the standpoint of adoption, community, documentation, etc., but it does appear to be very capable on a technical level. However, my application is going to be number-heavy, and I&#8217;m not going to need to own all of the data required to provide the service. I can probably get away with just incrementing counters in Memcache for some of this work. For persistence I need something that will let me do aggregation *FAST* without having to create aggregation tables, ideally. Using a key/value store for counters really just seems like a no-brainer.</p>
<p>That said, I think what I&#8217;ve decided to do, since it doesn&#8217;t matter, is punt on this decision in favor of getting a working application up quickly.</p>
<h3>MySQL</h3>
<p>Yup. I&#8217;m going to pick one or two features of the application to implement as a &#8216;first cut&#8217;, and back them with a MySQL database. I know it well, Tornado has a built-in interface for it, and it&#8217;s not going to be a permanent part of the infrastructure (otherwise I&#8217;d choose PostgreSQL in all likelihood).</p>
<p>To be honest, I don&#8217;t think the challenge in bringing this application to life are really related to the data model or the engine/interface used to access it (though if I&#8217;m lucky that&#8217;ll be a major part of <em>keeping</em> it alive). No, the real problem I&#8217;m faced with is completely unrelated to these considerations&#8230;</p>
<h3>Twitter&#8217;s API Service</h3>
<p>Not the API itself, per se, but the service providing access to it, and the way it&#8217;s administered, is going to be a huge challenge. It&#8217;s not just the Twitter website that&#8217;s inconsistent, the API service goes right along. Not only that, but the type of data I really need to make this application useful isn&#8217;t immediately available from the API as far as I can tell.</p>
<p>Twitter maintains rate limits on the API. You can only make so many calls over so short a period of time. That alone makes providing an application like this to a lot of people a bit of a challenge. Compounding the issue is that, when there are failwhales washing up on the shores, those limits can be dynamically decreased. Ugh.</p>
<p>I guess it&#8217;s not a project for the faint of heart, but it&#8217;ll drive home some golden rules that are easy to neglect in other projects, like planning for failure (of both my application, and Twitter). Also, it&#8217;ll be a lot of fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.protocolostomy.com/2010/06/26/brain-fried-over-nosql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

