Zum Inhalt springen

Writing (micro)services in Python

Foto von Mei Li
Hosted By
Mei Li . und 3 weitere
Writing (micro)services in Python

Details

We’re going to write microservices in Python. These are single, deployable and focused systems that do one thing well. They can be used to compose complex systems. It is an architectural pattern for building big systems also known as microservices or service-oriented architecture. A lot of major companies like Amazon and Netflix use this pattern. Microservices are an alternative to the more common monolith. However, they introduce a novel set of problems.

Ok. That's all very technical. Let's try with a metaphor.

Think of an elephant. It might be a little heavy, but it can move with grace. Once it twists its ankle though, it's out of business. If you want to replace that elephant or hire even more you'll need a lot of resources. Maybe there's more work for one elephant but no enough for two. Maybe you only require another elephant's trunk, but they only come as a whole. One is tempted to say that elephants don't scale that well.

A beehive on the other hand is quite different. There are a lot of bees. If one hurts its ankle it has literally no impact on the hive's performance. You can easily add bees or take away. Some can go to sleep while other work, depending on how much work there is. Bees scale quite well. However, they require very good orchestration. Otherwise, they'll run into each other.

The bees and the elephant are a metaphorical comparison of microservices and monoliths.

Most importantly, however, we’re going to write microservices in Python ourselves. At Delivery Hero, we’re developing a framework which allows you to write and connect services in Python with only very little boilerplate. Say hi to lymph. We’re going to write our services with it.

To participate, all you need to know is some Python. If you wish, you can install our only two software dependencies Rabbitmq and Zookeeper beforehand. You don’t have to, though. We’ll support you setting things up.

If you’re really eager, here’s some good reads and watches on the topic:

• Lymph documentation: http://lymph.readthedocs.org/en/latest/

• Martin Fowler’s reference: http://martinfowler.com/articles/microservices.html

• Free book preview from O’Reilly: http://nginx.com/blog/building-microservices-free-ebook-oreilly-nginx/

• Netflix’ Adrian Cockcroft on the topic: https://www.youtube.com/watch?v=pwpxq9-uw_0

http://microservices.io/

Talk and hands on session by Max Brauer

Photo of PyLadies Berlin group
PyLadies Berlin
Mehr Events anzeigen