Category: Uncategorized
-
Email alerts via Mandril API (Python)
I have a QNAP NAS (TS-212) which runs a variety of jobs for me, most notably all my backups to external USB drive(s) and other assorted tasks: I often find myself `tailing` logs to check they ran without issues – this works, but it’s tedious and error conditions (eg, a malfunctioning disk) may go unnoticed […]
-
From null to a hundred in six months (3)
Or how to achieve bi-weekly releases at SaaS scale Part III – People This is Part III of a series, see Other Parts in the Series Stupidity Laws One day many years ago, must have been around 2001, when I was still involved with my own venture, I happened across a short pamphlet tantalizingly named The […]
-
Python decorators (again)
Quite some time ago, I’d posted an entry about Python Class decorators; recently I happened to butt heads (again) against decorators, so I thought I’d have another go at documenting what goes where. As usual, I recommend this post as a very good summary, and I won’t repeat what is already there. In particular, I […]
-
ZooKeeper configuration
Starting / Stopping zookeeper and setting up a basic configuration is rather trivial, but there are a couple of gotcha’s that are worth documenting here. I have setup a few OS environment variables: ZOOCFGDIR=”/Users/marco/.zoo”ZOODATA=”/Users/marco/.zoo/data”ZOOKEEPER_HOME=”/Users/marco/Dev/zookeeper” In particular, the ZOOCFGDIR will direct ZooKeeper to look for a zoo.cfg file in that directory and use it for its configuration: […]
-
Tulip – Python async I/O with coroutines
Notes From Guido van Rossum talk at LinkedIn, Mountain View, 2014-01-23 Only available in Python 3.4 and later, compatible with Python 3.3 There are multiple ways of doing asynchronous I/O (files & network) OS threads UNIX “selects” Windows “ready callback” Use transports/protocols as the higher level abstraction Underneath it’s still an event loop see PEP-380 yield […]
-
A Zookeeper-based Monitoring Server
A Zookeeper-based Monitoring Server I have recently started developing a simple Monitoring server, using Zookeeper as the main distributed controller. Over the next few weeks I will be describing how the system hangs together and can be used to generate arbitrary alerts (with a plugin architecture) when a server fails. “babysitter“ comprises of: a Python […]
-
MongoDb Replica Set startup script
MongoDb Replica Set startup script I was doing some development in Python agains a MongoDb backend, and I needed a quick way to set up and initialize a Mongo DB replica set. This bash script is what I eventually came up with, still a bit rough around the edges (for example, it won’t let you […]
-
MongoVision + logmonger: goodness for MongoDb & Python logs
I’ve recently come across these two projects and, while each on its own is real goodness, when combined together they seem to be better than the sum of the parts. MongoVision is a web front-end and visualization tool for MongoDB running on Prudence: logmonger is a Python library that writes log entries to a MongoDb […]
-
Python Enums
Python Enums PEP-435, Python Enum, has been approved and will be implemented (apparently) in Python 3.4: this is quite a change and, at least in my opinion, a long overdue language feature. In future, one can avoid doing something ugly like this: (months.py) JANUARY = 1 FEBRUARY = 2 … DECEMBER = 12 then, in […]
-
Android Studio
Today, at Google I/O, Android Studio was announced by Google as the main supported development platform for Android – moving away from Eclipse, to IntelliJ. This is pretty big news and a major nail in Eclipse’s coffin – I have moved away from Eclipse around a year ago, after more than 10 years of unwavering […]