Sproutcore 与 Python Scipy

发布于 2024-12-06 02:06:09 字数 263 浏览 7 评论 0原文

我有一个用 Python Scipy 制作的计算后端,前端和管理部分将用 Sproutcore 制作。我需要什么才能让 sproutcore 运行 python 引擎。

我想我需要一个位于 sproutcore 和 scipy 之间的 python 框架。该框架的唯一作用是促进沟通。

其他选择是在服务器上使用 sproutcore 以及它调用 python scipy 脚本的方法(如果可能的话)

关于正确方法的任何建议? 关于这样一个简单的胶水框架的任何建议。

I have a computational backend made in Python Scipy and the frontend and admin section will be made in Sproutcore. What do i need to make the sproutcore run the python engine.

I think i need a python framework that sits between sproutcore and scipy. This framework's only job will be to facilitate communication.

Other option is to use sproutcore on the server as well and a way for it to call the python scipy scripts, if that is even possible

Any advice on the correct approach?
Any recommendation on such a simple glue framework.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一袭水袖舞倾城 2024-12-13 02:06:09

您可以使用任何您喜欢的框架!我碰巧喜欢 Flask 上的 SimpleApi 之类的东西(你可以使用 nginx 运行它) 、apache2 或任何符合 wsgi 的服务器)。这基本上将 TCP/IP 侦听器置于您喜欢的任何 Python 代码之上。

我猜你想公开的本质上就是run(some_well_control_and_obviously_not_from_the_user_code)

您可能会遇到一些问题:

  • 将生成的图像放在哪里,以便前端可以获取它们。这会因过期、文件大小等而变得棘手。Beaker 可能有帮助吗?
  • 作业排队...某些计算需要一段时间。现在怎么办?让用户等待? AJAX 重新加载?将其铲到 Celery 或 Zero-MQ 上?

让我知道这是怎么发生的。这绝对是需要的,我也考虑过自己启动一个类似的项目。

You can use any framework you like! I happen to like something like SimpleApi atop Flask (which you can run with nginx, apache2 or any wsgi-compliant server). This basically puts an TCP/IP listener on top of whatever python code you like.

I am guessing all you want to expose is essentially run(some_well_controlled_and_obviously_not_from_the_user_code).

Some problems you might encounter:

  • where to put generated images, such that the front end can get them. This gets hairy with expiration, file sizes, etc. Beaker might help here?
  • job queuing... some computations take a while. Now what? Make the user wait? AJAX-reload? Shovel that onto Celery or Zero-MQ?

Let me know how this comes along. This is definitely needed, and I have thought about starting a similar project myself.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文