reverse-ajax

Reverse Ajax + JSP-Servlet

假装没事ソ 提交于 2020-01-10 20:11:44
问题 We are trying to create a reverse ajax in our project. I've checked on the net and didn't find something concrete. I was unable to run any of the tutorials provided successfully. My object is: to provide on-screen alerts (like a pop-up) when ever there is an even pushed from the server (it could be high cpu usage/ram, anything). 回答1: The HTTP protocol (fortunately, after all) doesn't support PUSH, so it stops there. Best what you can do is to let the client fire ajax poll requests at timed

Fetch data from Android to webserver

寵の児 提交于 2020-01-06 16:19:35
问题 I have a certain concept in mind, but I an unsure what my possibilities are. User enters a name (html form) on a webpage Webserver sends push notification to the Android device of the user Application looks for this name in the contactslist and finds the corresponding phone number Application instantly sends this information back to the webserver, where the user can use the returned phone number. The only step I am unsure about is #4. I presume I'd have to use a temporary MYSQL database and

Reverse Ajax implementation using php

自作多情 提交于 2019-12-17 19:49:38
问题 I am looking to implement reverse ajax in my application which is using PHP and jquery. I have googled a bit about it and found XAJA but that seems to be a paid application. Is there an open source application available for the same or has someone implemented it? Some pointers or hints would be very helpful. Thanks in advance. 回答1: I know of two types of reverse AJAX: 1- Polling 2- Pushing I think polling is rather easier to implement, you just have your javascript make a regular request to

How to implement event listening in PHP

坚强是说给别人听的谎言 提交于 2019-12-17 17:59:10
问题 here is my problem: I have a script (let's call it comet.php) whic is requsted by an AJAX client script and wait for a change to happen like this: while(no_changes){ usleep(100000); //check for changes } I don't like this too much, it's not very scalable and it's (imho) "bad practice" I would like to improve this behaviour with a semaphore(?) or anyway concurrent programming technique. Can you please give me some tips on how to handle this? (I know, it's not a short answer, but a starting

Javascript implementation of WS-I Reliable Secure Profile

感情迁移 提交于 2019-12-17 07:52:20
问题 I'm using the .NET 4 server side implementation of Reliable Secure Profile for HTTP/S push and want to know if there is a JavaScript client available. 回答1: No. There are several generic SOAP libraries to talk to web services but not one that is specifically geared towards WS-I or the RSP definition. It might make for a good open source project though. Please add info here if you start it up, others might like it :) 来源: https://stackoverflow.com/questions/5724558/javascript-implementation-of

JavaScript library for push/comet/reverse-ajax notifications?

爱⌒轻易说出口 提交于 2019-12-12 18:04:52
问题 I'm planning on building a website where you can play (turn-based) games with other people. I need to be able to communicate which moves have been made. I think push-notifications are best suited for this. I've read a little bit about node.js; is that the way to go? Or are there other libraries that will make it easy to do this sort of thing? 回答1: There are a number of solutions with a number of different technologies. Node.js and socket.io is just one popular solution. If you are a Ruby

Scaling Microsoft's ASP.NET Reverse AJAX “long poll” codeplex example

和自甴很熟 提交于 2019-12-08 03:56:46
问题 I'm investigating Microsoft's reverse-AJAX sample wherein they use a long timeout in the ScriptManager <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="2147483647"> And a ManualResetEvent to control the wait: private ManualResetEvent messageEvent = new ManualResetEvent(false); public Message DequeueMessage() { // Wait until a new message. messageEvent.WaitOne(); } public void EnqueueMessage(Message message) { lock (messageQueue) { messageQueue.Enqueue(message); //

Difference between reverse ajax and normal ajax

帅比萌擦擦* 提交于 2019-12-07 15:17:14
问题 Can anybody describe me the difference between reverse ajax and normal ajax . If possible explain what reverse ajax can do in web world , some real world examples too. I never used this reverse ajax ,is that apt for normal web application? 回答1: Normal ajax, you need to poll your server from your client periodically. For reverse ajax, the server pushes update to your client when it has. 回答2: Reverse Ajax: is essentially a concept: being able to send data from the server to the client. In a

Scaling Microsoft's ASP.NET Reverse AJAX “long poll” codeplex example

丶灬走出姿态 提交于 2019-12-06 15:40:33
I'm investigating Microsoft's reverse-AJAX sample wherein they use a long timeout in the ScriptManager <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="2147483647"> And a ManualResetEvent to control the wait: private ManualResetEvent messageEvent = new ManualResetEvent(false); public Message DequeueMessage() { // Wait until a new message. messageEvent.WaitOne(); } public void EnqueueMessage(Message message) { lock (messageQueue) { messageQueue.Enqueue(message); // Set a new message event. messageEvent.Set(); } } I've noticed that Setting AsyncPostBackTimeout to a low

Broadcasting to a subset of subscribers in Atmosphere

社会主义新天地 提交于 2019-12-06 09:32:09
问题 What I'm trying to do: Be able to have users subscribed to a number of different 'chat rooms' and use reverse AJAX / comet to send messages from a chat room to everyone logged into that room. (a bit more complicated but this is a similar use case). What I'm doing: Using Grails with JMS and Atmosphere. When a message is sent, I'm using JMS to send the message object which is received by a Grails service which is then broadcasted to the atmosphere URL (i.e. atmosphere/messages). Obviously JMS