Calling RPC from inside a Flask route without Crochet

#1

I’ve seen the https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/app/crochet examples and I get it.

But ideally I don’t want to run a WAMP Application within my Flask app. I just want to make RPC calls to a separate WAMP Component (outside of the Flask) via the crossbar.

This is my thought process:

  1. Can I call a registered WAMP RPC using curl?
  2. If yes, then I can create a similar request from within my Flask route

Any ideas whether no.1 above is possible? I’ve seen somewhere here that we can publish a topic via curl, so why not call an RPC?

Thank you beforehand,

Will

0 Likes

#2

I found the answer here:

https://github.com/crossbario/crossbarexamples/tree/master/rest/caller

I will make a blog post about using this from within my Flask-based BI platform.

Suggestion: Highlight this feature more on the Autobahn/Python. There are a lot of projects out there that can benefit from this.

0 Likes

#3

Hi Will,

yeah, you found it! And yes, you are right, we should draw more attention to that feature. The upcoming Crossbar.io 0.11 will come with better docs as well;)

Please keep us updated about your blog post!

Cheers,
/Tobias

···

Am Samstag, 29. August 2015 17:28:49 UTC+2 schrieb Will Gunadi:

I found the answer here:

https://github.com/crossbario/crossbarexamples/tree/master/rest/caller

I will make a blog post about using this from within my Flask-based BI platform.

Suggestion: Highlight this feature more on the Autobahn/Python. There are a lot of projects out there that can benefit from this.

0 Likes