英文:
Launching Python scripts on Kotlin server for Android app?
问题
如何在Android客户端上使用Kotlin服务器端代码同时启动多个客户端的Python脚本?
我正在开发一个Android应用,客户端和服务器端都使用Kotlin编写。
然而,我想要使用一些Python的NLP库。这对于手机上任何客户端的文本输入是必需的,我需要将其发送到服务器进行NLP处理,并根据客户端的需求提供结果。
请注意,在任何给定时间可能会有成千上万个客户端,并且我的服务器应该处理所有请求。
我应该使用Ktor来处理多个客户端吗?
如何为每个客户端启动Python代码?
英文:
Tldr; how to launch python scripts for multiple clients at the same time using Kotlin server side code for Android clients.
I am developing an Android app using Kotlin for client side as well as server side code.
However, I want to use some libraries for NLP using Python. This is required for text input by any client on the phone, I need send that to the server for NLP processing and give result to the client accordingly.
Note that there can thousands of clients at a given time and my server should handle all the requests.
Should I use Ktor for handling multiple clients?
How to launch python code for each client?
答案1
得分: 1
找到了解决方案 - https://chaquo.com/chaquopy/
对我来说非常有效。
英文:
Spent a long time to figure this out, but found a solution - https://chaquo.com/chaquopy/
Works for me like a charm.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论