duanlan7239 2013-03-20 09:40
浏览 55
已采纳

用于c ++代码的Web前端

I have c++ code that can be compiled under Linux, windows or Mac OS. The code compares two images. I would like to have its front end running on a browser and make available to the www.

I am familiar with hosting and dns and that is not the issue. what I can't seem to figure out is:

  1. How do I invoke the script once the image is uploaded by users?

  2. The results from the code needs to be displayed back to the browser. How can a callback be set up for this?

Is there a php solution? Or python (with flask)?

  • 写回答

3条回答 默认 最新

  • dongpanbo4727 2013-03-20 09:43
    关注

    You can either call the C++ application from PHP with exec and then return to browser whatever result is there. This is quick and not good idea. Better approach is to have a service/daemon in C++ running and taking tasks from queue (like RabbitMQ for example). This is scalable solution but requires more effort to implement.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题