flask-nameko icon indicating copy to clipboard operation
flask-nameko copied to clipboard

I wonder if I can have async rpc using flask-nameko

Open meysam81 opened this issue 5 years ago • 2 comments

Hey guys, I was wondering if there's a way to get non-blocking mechanism using flask-nameko and I couldn't find any resource online that issues my concern. Could you guide me please?

meysam81 avatar Mar 14 '19 13:03 meysam81

Hi! Seems you have the same question as I have. What about decorating a flask method like a nameko service:

@rpc
def flask_method(self, param):
   ...

So that when another nameko service can use it like:

flask = RpcProxy('flask')
flask.flask_method('param')

@meysam81 Do u mean this?

litnimax avatar Oct 08 '19 10:10 litnimax

Hi! Seems you have the same question as I have. What about decorating a flask method like a nameko service:

@rpc
def flask_method(self, param):
   ...

So that when another nameko service can use it like:

flask = RpcProxy('flask')
flask.flask_method('param')

@meysam81 Do u mean this?

That'd be still blocking I assume Async mechanism is a special one, which you probably already know, that can tell the processor to go and do other things while the response from a I/O bound task is arriving

meysam81 avatar Oct 09 '19 05:10 meysam81