DEV Community

Discussion on: How Nameko makes microservice development less difficult.

Collapse
 
rhymes profile image
rhymes • Edited

Hi Michael, I didn't know about this tool.

I'm going to link it here for future reference:

nameko / nameko

Python framework for building microservices

Nameko

https://secure.travis-ci.org/nameko/nameko.svg?branch=master

[nah-meh-koh]

A microservices framework for Python that lets service developers concentrate on application logic and encourages testability.

A nameko service is just a class:

# helloworld.py

from nameko.rpc import rpc

class GreetingService:
    name = "greeting_service"

    @rpc
    def hello(self, name):
        return "Hello, {}!".format(name)

You can run it in a shell:

$ nameko run helloworld
starting services: greeting_service
...

And play with it from another:

$ nameko shell
>>> n.rpc.greeting_service.hello(name="ナメコ")
'Hello, ナメコ!'

Features

  • AMQP RPC and Events (pub-sub)
  • HTTP GET, POST & websockets
  • CLI for easy and rapid development
  • Utilities for unit and integration testing

Getting Started

Support

For help, comments or questions, please go to <discourse.nameko.io/>.

Contribute

  • Fork the repository
  • Raise an issue or make a feature request

License

Apache 2.0. See LICENSE for details.


Have you used it in production? By looking at the README it seems like it's very RPC oriented. It's an interesting choice the one of using AMQP as an interchange protocol.

The drawbacks seem to be its requirement of RabbitMQ as a companion server and that by being built on eventlet you have to use special compatible libraries to do I/O.

It's a peculiar and different choice, I guess it also predates asyncio which seems the direction Python is going for async concurrency nowadays.

The DI pattern on which is built is neat, I'm not sure I would use it though, I have the feeling that it's going to be cumbersome to integrate with Nameko from clients written in other languages (though if you're a 100% Python shop it might be the right choice!)

A suggestion, I think your post deserves the following tags:

#python

import antigravity


Collapse
 
rev0kz profile image
Michael Kwaku Aboagye

Thanks, bro. Yes. I'm 100% python backend developer. I use nameko for small projects. yet to do so in production...hopefully this year

You can try it. It is awesome because of its dependency injection mechanism.