使用Python代码中的SignalR服务器 [英] Using SignalR server from Python code
本文介绍了使用Python代码中的SignalR服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有什么选择将Python与SignalR集成?
What are my options for integrating Python with SignalR?
Python代码是大型第三方产品的一部分,而不是语言偏好。 SignalR服务器提供对现有.NET产品的订阅。
The Python code is a part of large 3rd party product, not a matter of language preference. SignalR server provides subscriptions to existing .NET products.
我们希望重用.NET SignalR服务器和Python。
We would like to reuse .NET SignalR server with Python.
推荐答案
我可以想到几种方法,它们都是理论上的(也可能是糟糕的想法):
I can think of a few ways and they are all theoretical (and probably bad ideas to begin with):
- IPC - 将python应用程序和信号器应用程序托管为不同的进程,并使用某种ipc机制(命名管道,tcp,其他东西)以某种方式来回管道信息。
- 使用IronPython(可能不是一个真正的选项)。
- 将SignalR的轻量级端口移植到python( https://github.com/davidfowl/SignalR.Lite )。可能不会以相同的方式工作,但也许你不需要所有的功能。
- IPC - host the python app and the signalr app as different processes and somehow pipe information back and forth using some kind of ipc mechanism (named pipes, tcp, something else).
- Use IronPython (which probably isn't really an option).
- Port a lightweight verison of SignalR to python (https://github.com/davidfowl/SignalR.Lite). Probably won't work the same way but maybe you don't need all the features.
或者你可以希望找到一个图书馆在python中做类似的事情。
Or you can hope to find a library in python that does something similar.
这篇关于使用Python代码中的SignalR服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文