At Allegro, we always try to pick the right tool for the job. As a result, despite focusing on JVM for implementing our services, we do use Python extensively for infrastructure automation and management.
We also like to share our knowledge with others in the community. That’s why we supported the latest PyWaw (Warsaw Python User Group) meeting and had our engineers as speakers sharing their experience.
Our first engineer, Kamil Chmielewski, talked about his toolbox which allows him to quickly build developer tools in Python. He presented useful tools and libraries for developing, documenting and distributing Python programs. Things like defining command line interfaces, handling configuration files in different formats, generating documentation, versioning based on git tags and distributing a self-contained executable are all solved problems if you know which tools to pick. Kamil also emphasised the importance of having continuous integration and continuous delivery in place which, whether you lead an open-source project that invites contributors or want to attract developers to your team from within your company, helps invite contributors to your project.
Then we had our second engineer, Marcin Kliks, sharing his lessons learned from three years of developing open-source Python projects at Allegro - the most recognised one being Ralph for datacenter assets management. He gave a lot of tips on developing successful products, the most important one being to take your time before starting to code. The product needs to have a clear vision from one person, solve problems of one domain and have performance requirements discovered up front. Marcin argued for strong code ownership, limiting unnecessary dependencies on external libraries and avoiding excessive abstractions as they slow you down by making your code harder to understand, debug and customize.
The third speaker was Rodolfo Carvalho from Base talking about poor language support for concurrency in Python and ways to solve the problem. The old tools are threading and multiprocessing which are inconvenient to use. We also have asyncio since Python 3.4, but it is not stable yet. Rodolfo explained a better model for concurrency, CSP (Communicating Sequential Processes), showing examples in Go language. He ended with an advice to emulate such a model in Python using Greenlets and Queues from gevent library, or using asyncio if we don’t mind being early adopters.
After the meetup
Many attendees stayed in the bar where PyWaw took place for networking after the talks. It’s always a great opportunity to meet other developers and share experiences. Countless interesting topics were covered that night and we had quite a few Allegro engineers taking part in discussions.
It was a very successful meetup with inspiring talks and conversations. We keep supporting local developer communities and hope to meet you there next time!