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: … More ZooKeeper 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 … More Tulip – Python async I/O with coroutines

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 … More A Zookeeper-based Monitoring Server

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 … More MongoVision + logmonger: goodness for MongoDb & Python logs

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 … More Python Enums

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 … More Android Studio