crossbar

Logging WAMP worker Trace Back Error

别等时光非礼了梦想. 提交于 2020-01-03 05:37:08
问题 I have been trying to debug Remote Procedure Calls for WAMP (Web Application Messaging Protocol) based python components. For example: Front end (browser) session.call('math.add2', [2, 'two']); Back end (python) @wamp.register("math.add2") def add2(self, x, y): return x + y It gives a little bit of idea about the error. For a simple example like this, it doesn't really matter at all but for large applications with a lot of files and modules, Im not quite sure about the best way to pin point

How I can integrate crossbar client (python3,asyncio) with tkinter

有些话、适合烂在心里 提交于 2019-12-11 06:50:02
问题 I run crossbar client with the runner of crossbar which run in the asyncio event loop. I want to call RPC by the trigger in tkinter. Is there any solution to combine them together? 回答1: You can make an HTTP request to call your RPC. Everything described here Crossbar HTTP Bridge Caller. Quick summary what you need to do: Make configuration: The HTTP Caller is configured on a path of a Web transport - here is part of a Crossbar configuration: { "workers": [ { "type": "router", ... "transports"

How to get the reactor from ApplicationRunner in autobahnPython

杀马特。学长 韩版系。学妹 提交于 2019-12-11 05:18:20
问题 I have an autobahn client using the ApplicationRunner class from autobahn to connect to a WAMP router (crossbar). In the main section it attaches my ApplicationSession class "REScheduler" like this: if __name__ == '__main__': from autobahn.twisted.wamp import ApplicationRunner runner = ApplicationRunner(url=u"ws://localhost:8080/ws", realm=u"RE_acct") runner.run(REScheduler, start_reactor=True, auto_reconnect=True) Now I need the reactor that the application runner started for other purposes

Integrate Autobahn|Python with aiohttp

半世苍凉 提交于 2019-12-08 02:49:37
问题 I'm trying to integrate an aiohttp web server into a Crossbar+Autobahn system architecture. More in detail, when the aiohttp server receive a certain API call, it has to publish a message to a Crossbar router. I've seen this example on the official repos but i've no clue on how to integrate it on my application. Ideally, i would like to be able to do this # class SampleTaskController(object): async def handle_get_request(self, request: web.Request) -> web.Response: self.publisher.publish('com

Debugging Crossbar.io app in IntelliJ

旧城冷巷雨未停 提交于 2019-12-02 14:06:59
问题 I'm building an app using Crossbar.io in IntelliJ. Since you start the app using the crossbar start command in the shell I'm not clear on how to (ideally automatically) attach the Python debugger to the appropriate scripts. Anyone have any ideas? 回答1: Nice question. I was a little bit confused about how to debug as well because it seems like crossbar is sort of mixing up python 2 and 3 together. I wanted to install crossbar.io under a virtual environment with Python 3 because the examples