2. The user submits an order, the service side how to immediately inform the businessman (is the client, just login) with the merchant's role?
By air bubbles (similar to 126 E-mail notification box)
3. The solution can be given,
4. If there is a ready-made (paid) business class, controls, solution, third-party code, provide a name can also,
thank you
CodePudding user response:
HTTP is one-way, cannot undertake server "push" operations, to the server push message, such as page must use the websocket way to establish a two-way connection with server first, if you pay attention to the user interaction experience (for example like QQ chat are immediately sent to the other party, rather than "a second card to send to"), and there are a large number of high concurrent data, in this way is better,For less emphasis on server performance of the system, or "local tyrants" itself has a large number of idle server cluster, or visits to remote web site, can be used on the page every 10 seconds of polling, but note that you need to design a set of unified message polling mechanism, which is integrated many kinds of news in a message polling is collected and distributed, don't have multiple on page regularly polling,
CodePudding user response:
"How the user submits an order, the service side immediately inform merchants"Actually this kind of notice, is to give each other a "hi!" Went, inform the other party that is to say, "to get the latest news," rather than the message content were all pushed to each other, so the message mechanism itself is "push-pull combination", is not simply push message, the content of the push if only one of the most simple reminder (for example, the two Chinese characters),
This sort of thing actually is also simple, take a few days development test page enough, or don't find anything "third party" to gather together, to make a first, grasp the core technology,
CodePudding user response:
Suppose you have 10000 stores online, you can imagine, if the polling mode, even polling a 10 seconds, then at least an average of 1000 per second query to the server task, and time delay for 10 seconds (equivalent to caton) user experience is not good,And hypothesis is push messages, so really need to remind the merchants to receive alerts, and your server (delay) who warns, who will come to check the task, so may, on average, only a few dozen per second query task, and instant messaging user experience is usually good,
So don't abuse the seemingly simple polling, the best is still a little time, write a server push its function, the use javascript or typescript to write, not more than 50 code,
CodePudding user response:
Online search listener, should be a lot of codeCodePudding user response:
Using a subscription model, listenersCodePudding user response: