duanfeng3879
duanfeng3879
2012-09-19 16:11

Javascript-Python:向客户端浏览器提供动态生成的图像?

  • python
  • php
  • javascript

Scenario: User loads a page, image is being generated, show loading bar, notification event sent to browser.

I am using python code to generate the image. Would it be ideal to have a web server that launches the script or embed a webserver code into the python script? Once the image is finished rendering, the client should receive a message saying it's successful and display the image.

How can this be architected to support concurrent users as well? Would simply launching the python script for each new user that navigates to the web page suffice?

Would it be overkill to have real-time web application for this scenario? Trying to decide whether simple jQuery AJAX will suffice or Socket.io should be used to have a persistent connection between server and client.

Any libraries out there that fit my needs?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答