The Blog: Python

Jan 9
0

2011 Open Source Projects

by David Czarnecki

Oh right, it’s 2012. Better late than never. In addition to the numerous contributions we make to existing open source projects, we also find the time to release libraries or projects that we extract from our applications. In 2011, those 22 projects were:

We hope you’ve found or will find these libraries useful in your own projects.

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jun 24
1

Of Penguins, Rabbits and Buses

by Aaron Westendorf

Here at Agora we make use of dedicated hardware and virtual machines running on our providers’ respective clouds. In recent months, we’ve moved our RabbitMQ hosts onto hardware because we found that we could far exceed the CPU capacity of our virtual machines and it was far cheaper to run a small cluster of hardware hosts than a giant cluster of VMs. We used an existing, underutilized host for our primary traffic while awaiting delivery and installation of a new pair servers. Expecting a simple plug-and-play swap, I set out to test the new hardware before we made the transition. What follows is a harrowing tale into the deepest depths of modern hardware architecture.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jun 21
4

Introducing Haigha

by Aaron Westendorf

We’re pleased to announce the official release of haigha, our Python AMQP client library.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Mar 7
2

Ensuring balanced reads with PyMongo

by Aaron Westendorf

Over the past year we’ve been evaluating and migrating many of our game services over to mongoDB. Its feature set gives us complete freedom to iterate with developers during game production, its performance is sufficient to power our infrastructure during peak load, our operations team appreciate its powerful administration tools, and 10gen has so far proven itself a reliable technology partner and steward of the Mongo roadmap. One of the very important features of PyMongo that we have made use of is the MasterSlaveConnection, but it’s not without its caveats, one of those being that it does not guarantee you are balancing your reads across a replica set.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Mar 2
3

Chai, the simple Python mock

by Aaron Westendorf

Categories

Here at Agora we take testing seriously, insisting that full test coverage always be part of a deliverable and adjusting our schedules accordingly. We are historically a Rails shop, but for a few years we have been developing an extensive Python code base and infrastructure to power our in-game offerings.

We’ve been using Mox as our mock testing solution since 2009, and though it has met all of our functional requirements, we’ve longed for the simplicity and power of Ruby’s Mocha framework. This past Friday we held our 3rd Hack-A-Thon, and Vitaly Babiy and I developed Chai, a mocking framework patterned after Mocha.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Nov 3
0

py-amqplib with Large messages

by Vitaly Babiy

Categories

At the core of our Hydra platform is AMQP, currently we are using the py-amqplib driver. It has worked well up to this point. We recently had a requirement to send large messages through AMQP, this is where the driver failed us. The following are couple benchmarks and fix to get around the issue.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Jun 28
2

Lifting the Tail: Inside Agora Skunk Works

by Aaron Westendorf
We’ve been hard at work for over a year developing the next generation of game integration technology here at Agora, and over the next few months we’ll be releasing some of the code that we’ve developed, discussing some of the challenges we face and how we’re using all the new technology to build the best gaming experience around.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Oct 1
0

Mocking HTTP request and response with Python and Mox

by David Czarnecki

I recently started integrating with some web services in Python and wanted to be able to test all the requests and responses with valid and invalid data. However, I need to be able to do this without actually hitting the web service when testing. And of course I don’t want to change my web service code to conditionally do things if running in a test environment. Enter mocking and Mox.

(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Mar 22
0

Suh-weet

by genexp

Categories

One of our engineers has been doing some work with RRDTool (Round Robin Database); and more specifically PYRRD.  He’s using it to combine real time usage stats with a prediction algorithm so that we can pre-emptively allocate resources to different parts of the system.  Its real spiffy.

His additions to the PYRRD library just got commited to the trunk build, and he’s credited in the readme.

http://code.google.com/p/pyrrd/source/browse/trunk/ChangeLog
http://code.google.com/p/pyrrd/source/browse/trunk/README

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article
Feb 23
7

Python Is Mocking Me: A Ruby Programmer’s Adventures With Python/Mox

by Tim Jones

Overview

Much of Agora’s work over the last few years has been done in Ruby. Recently though, we’re migrating major components to Python in order to enjoy the benefits of cross platform compatibility with Windows. The purpose of this post is to discuss testing in Python; specifically mocking.
(more…)

  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Tumblr
  • Twitter
Read Full Article