douju2599 2015-07-04 18:23
浏览 30

PHP后端和JAVA前端之间的实时消息传递

My company has a desktop application which is made in JAVA and is communicating with PHP backend. Now, we have many clients, who are all given with a desktop app, and for each client there are many orders which are coming in. Currently, the desktop app is polling the PHP backend every 30 seconds to check if there is any new order or not, I want to optimize this process by either using a messaging protocol to relay the information as most of the polling requests go empty (900 out of 1000) or by improving polling mechanism. I studied about MQTT and XMPP but was unable to understand. Also, I was thinking of using sockets but then someone said that there can be a problem with the port and all. Is polling better or push, in this case? If polling is better then how can I improve it since it is directly querying DB (which is wrong, it should go through a cache layer) or if push is better then how I can implement it?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 如何在炒股软件中,爬到我想看的日k线
    • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
    • ¥15 seatunnel 怎么配置Elasticsearch
    • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
    • ¥15 (标签-MATLAB|关键词-多址)
    • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
    • ¥500 52810做蓝牙接受端
    • ¥15 基于PLC的三轴机械手程序
    • ¥15 多址通信方式的抗噪声性能和系统容量对比
    • ¥15 winform的chart曲线生成时有凸起