Search Results

Search found 175 results on 7 pages for 'comet'.

Page 4/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Push alerts to notification tray app in Java

    - by Rich Anderson
    Hi - how do I push server alerts to tray apps in java without using xmpp or other heavy protocols? Do you recommend a way to accomplish this? I was planning to write an app which uses URLConnection on a server equipped with Comet but I doubt if that would work as the client requires a JS to be invoked and URLConnection is not a browser.. What is the best way to push instead of using a proprietary client-server approach?

    Read the article

  • nginx_http_push_module and databases

    - by rui7905
    i am a newbie of nginx , and i am using nginx as a comet server by nginx_http_push_module i have two question: 1,how can i save the messages which recieved by nginx_http_push_module into databases ? 2,how can i get listeners list of a channel ? thanks~

    Read the article

  • How to enable Jetty to support cometd/reverse ajax while let it listen to port 80?

    - by janetsmith
    Hi, I would like to use cometd / reverse ajax capability of Jetty 7. I tried to configure it so it listen to port 80, instead of 8080. However, according to http://jetty.mortbay.org/jetty5/faq/faq%5Fs%5F200-General%5Ft%5Fapache.html , Apache can be configured as a HTTP/1.1 proxy to pass selected request to the Jetty using the HTTP/1.1 protocol. This is simple to configure and use, but current versions of the apache mod_proxy do not support persistent connections. As far as I know, the reverse ajax in jetty is depending on continuation (I guess it is persistent connection). So how to let jetty support reverse ajax, while coexist with apache server? Thanks.

    Read the article

  • How to enable Jetty to support cometd/reverse ajax while let it listen to port 80?

    - by janetsmith
    I would like to use cometd / reverse ajax capability of Jetty 7. I tried to configure it so it listen to port 80, instead of 8080. However, according to http://jetty.mortbay.org/jetty5/faq/faq%5Fs%5F200-General%5Ft%5Fapache.html , Apache can be configured as a HTTP/1.1 proxy to pass selected request to the Jetty using the HTTP/1.1 protocol. This is simple to configure and use, but current versions of the apache mod_proxy do not support persistent connections. As far as I know, the reverse ajax in jetty is depending on continuation (I guess it is persistent connection). So how to let jetty support reverse ajax, while coexist with apache server? Thanks.

    Read the article

  • ruby rails loop causes server freeze

    - by Darkerstar
    Hi all: I am working on a Ruby on Rails project on Windows. I have Ruby 1.86 and Rails 2.35 installed. Everything is fine until I tried to implement a comet process. I have the following code written to respond to a long poll javascript request. But everytime this function is called, it will hang the whole rails server, no second request can get in, until the timeout. (I know there is juggernaut, but I like to implement one myself first :) Is this due to my server setup? The project will be deployed on a linux server with Ngix and Passenger setup, will it suffer the same problem? def comet_hook timeout(5) do while true do key = 'station_' + station_id.to_s + '_message_lastwrite' if Rails.cache.exist?(key) @cache_time = DateTime.parse(Rails.cache.read(key)) if @cache_time > hook_start @messages = @station.messages_posted_after(hook_start) hook_start = @cache_time break end end end ... end Also with Rails memory store cache, I keep getting "cannot modify frozen object" error, so the above script only worked for me when I switched to File cache. :(

    Read the article

  • Flex: HTTP request error #2032

    - by alexey
    In Flex 3 application I use HTTPService class to make requests to the server: var http:HTTPService = new HTTPService(); http.method = 'POST'; http.url = hostUrl; http.resultFormat = 'e4x'; http.addEventListener(ResultEvent.RESULT, ...); http.addEventListener(FaultEvent.FAULT, ...); http.send(params); The application has Comet-architecture. So it makes long running requests. While waiting a response for this request, other requests can be made concurrently. The application works in most cases. But sometimes some clients get HTTP request error executing long running request: faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: 'http://example.com/ws' I think it depends on user's browser. Any ideas?

    Read the article

  • How does a WCF server inform a WCF client about changes? (Better solution then simple polling, e.g.

    - by Ian Ringrose
    see also "WCF push to client through firewall" I need to have a WCF client that connect to a WCF server, then when some of the data changes on the server the clients need to update its display. As there is likely to be a firewall between the clients and the server. All communications must be over HTTP The server can not make an (physical) outgoing call to the client. As I am writing both the client and the server I do not need to limit the solution to only using soap etc. I am looking for built in surport for "long polling" / "Comet" etc Thanks for the most informative answer from Drew Marsh on how to implement long polling in WCF. However I thought the main “selling point” of WCF was that you could do this sort of thing just by configuring the channels to be used in the config file. E.g I want a channel that logically two way but physically incoming only.

    Read the article

  • Best approach for a scalable PHP (AJAX based) chat system

    - by Simon
    Hi, I'm building a chat system for a company and I'm wondering as to what the best way to build the system would be? The current setup we have is a Nginx HTTP Server with PHP and Memcacheq (as a message queue that appends the chat messages to the user's own queue). We then poll the Nginx server (through a Comet style request) and query the message queue for updates. Is it a good idea to use a message queue such as Memcacheq to handle a chat system that has both user-to-user and site-wide chat or is it best to just stick to MySQL? Thanks!

    Read the article

  • Calling a jQuery plugin inside itself

    - by Real Tuty
    I am trying to create a comet like thing. I have a plugin that collects data from a php page. The problem is that i dont know how to call the plugin inside itself. If it were a function i could go like this: function j () {setTimeout(j(), 1000);}, but i am using a jQuery plugin. Here is my plugin code: (function($) { $.fn.watch = function(ops) { var $this_ = this, setngs = $.extend({ 'type' : 'JSON', 'query' : 'GET', 'url' : '', 'data' : '', 'wait' : 1000 }, ops); if (setngs.type === '') { return false; } else if (setngs.query === '') { return false; } else if (setngs.url === '') { return false; } else if (setngs.wait === '') { return false; } else if (setngs.wait === 0) { setngs.wait = 1000; } var xhr = $.ajax({ type : setngs.query, dataType : setngs.type, url : setngs.url, success : function(data) { var i = 0; for (i = 0; i < data.length; i++) { var html = $this_.html(), str = '<li class="post" id="post-' + data[i].id + '"><div class="inner"><div class="user">' + data[i].user + '</div><div class="body">' + data[i].body + '</div></div></li>'; $this_.html(str + html); } setTimeout($this_, 1000); } }); }; })(jQuery); where it says setTimeout($this_, 1000); this is where im having trouble. I don't know what to call the plugin as. $this_ is what I thought might work but I am wrong. That is what i need to replace. Thanks for your help.

    Read the article

  • Perl CGI that sends a temporary loading page to client then later sends the actual results page

    - by Kurt W. Leucht
    I've wasted at least a half day of my company's time searching the Internet for an answer and I'm getting wrapped around the axle here. I can't figure out the difference between all the different technology choices (long polling, ajax streaming, comet, XMPP, etc.) and I can't get a simple hello world example working on my PC. I am running Apache 2.2 and ActivePerl 5.10.0. JavaScript is completely acceptable for this solution. All I want to do is write a simple Perl CGI script that when accessed, it immediately returns some HTML that tells the user to wait or maybe sends an animated GIF. Then without any user intervention (no mouse clicks or anything) I want the CGI script to at some time later replace the wait message or the animated GIF with the actual HTML results from their query. I know this is simple stuff and websites do it all the time, but I can't find a single working example that I can cut and paste onto my machine that will work. Here is my simple Hello World example that I've compiled from various Internet sources, but it doesn't seem to work. When I refresh this CGI URL in my web browser it prints nothing for 5 seconds, then it prints the PLEASE BE PATIENT web page, but not the results web page. What am I doing wrong? #!C:\Perl\bin\perl.exe use CGI; use CGI::Carp qw/fatalsToBrowser warningsToBrowser/; sub Create_HTML { my $html = <<EOHTML; <html> <head> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="expires" content="-1" /> <script type="text/javascript" > var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @end @*/ if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } </script> <title>Ajax Streaming Connection Demo</title> </head> <body> Some header text. <p> <div id="response">PLEASE BE PATIENT</div> <p> Some footer text. </body> </html> EOHTML return $html; } my $cgi = new CGI; print $cgi->header; print Create_HTML(); sleep(5); print "<script type=\"text/javascript\">\n"; print "\$('response').innerHTML = 'Here are your results!';\n"; print "</script>\n";

    Read the article

  • long polling vs streaming for about 1 update/second

    - by jcee14
    is streaming a viable option? will there be a performance difference on the server end depending on which i choose? is one better than the other for this case? I am working on a GWT application with Tomcat running on the server end. To understand my needs, imagine updating the stock prices of several stocks concurrently.

    Read the article

  • Simple "Long Polling" example code?

    - by dbr
    I can find lots of information on how Long Polling works (For example, this, and this), but no simple examples of how to implement this in code. All I can find is cometd, which relies on the Dojo JS framework, and a fairly complex server system.. Basically, how would I use Apache to serve the requests, and how would I write a simple script (say, in PHP) which would "long-poll" the server for new messages? The example doesn't have to be scaleable, secure or complete, it just needs to work!

    Read the article

  • when long polling, Why are my other requests taking so long?

    - by Pascal
    The client makes 2 concurrent requests. (1 which takes 60 seconds - long polling) and another which is NOT long polling - supposed to return right away. It does return right away when I'm not doing long polling. But as soon as I start doing long polling with the other thread, the other one takes forever to execute. Firebug shows that the request is waiting for 10-50 seconds. On the server, I profiled ALL requests from the moment the php script starts to the time it goes back to the client, and it shows that each one only took 300ms or less. This problem started about the same time I started doing long polling (with the other XHR requests). I'm using jquery for both requests. The server shows that it is under very light load. CPU and memory less then 2%. 8 processes running out of a pool of 15. (it doesn't seem to deviate much from that number 8, even when I run more ajax requests). I guess each process can run multiple ajax threads concurrently. I made sure to EXIT from all processes as soon as their done executing. I don't see how the process pool has run out, if there are still 7 unused processes listed under prstat -J. Also, the problem happens somewhat intermittently. Firefox should be able to handle 2 concurrent ajax requests. i dont get what the problem is.

    Read the article

  • HTTP method GET is not supported by this URL

    - by Alvin
    Hi, I'm calling servlets which has implemented CometProcessor interface, and whenever I try to call the servlets with get request, I'm getting the above error. May I know the reason? public class ChatServlets extends HttpServlet implements CometProcessor { public void event(CometEvent event) throws IOException, ServletException { HttpServletRequest request = event.getHttpServletRequest(); HttpServletResponse response = event.getHttpServletResponse(); if (event.getEventType() == CometEvent.EventType.BEGIN) { response.getWriter().println("Welcome "); } else if (event.getEventType() == CometEvent.EventType.READ) { response.getWriter().println("Bye"); } } }

    Read the article

  • How to create Server-side Progress indicator in Javascript

    - by Eli
    Hey Guys, I want to create a section in my site, where a user has a few simple update buttons. Each of these update buttons will be going to the server, and will do a long crunching behind the scene. While the server crunches data, I want the user to have a some kind of progress indicator, like progress bar or textual percentage. I'm using jQuery as my javascript library, and CodeIgniter (PHP) as the server-side framework, if it's important... What I was thinking about is using PHP's flush() function to report progress status to jQuery, but I'm not sure that jQuery's ajax functions are reading the output before it's complete... So any advice/explanation would be useful and helpful! Thanks :)

    Read the article

  • Should I use PHP or PHP + J2EE?

    - by Sean Xiong
    I'm going to start a new project with instant message support. I find that there is no good long polling solution in PHP, but there is some good ones in J2EE. I'm wondering if I can integrate PHP and J2EE to get the function? Or should I just use J2EE instead of PHP? Thanks.

    Read the article

  • What's a simple way to web-ify my command-line daemon?

    - by dreeves
    Suppose I have a simple daemon type script that I run on my webserver. I run it in a terminal, with gnu screen, so I can keep an eye on it. That works fine (incidentally, I use this trick). But now suppose I'd like to make a web page where I can keep an eye on my script's output. What's the easiest way to do that? Notes: This is mainly for myself and a couple co-hackers so if websockets is the answer and it only works on Chrome or something, that's acceptable. This question is asking something similar: http://stackoverflow.com/questions/1964494/how-to-make-all-connected-browsers. But I'm hoping for a simpler, quick-and-dirty solution, and especially a general way to quickly do this for any script I might want to keep an eye on from a browswer.

    Read the article

  • How to use atmosphere-spade-server in combination with atmosphere-pubsub.war

    - by Alfred
    I would like to play with atmosphere-spade-server.jar + pubsub.war. First of I have maven installed, but to be honest Maven is kind of new to me. Could please someone please explain me how to use it correctly. What I have tried Download atmosphere-spade-server + pubsub.war from there site. java -jar atmosphere-spade-server-0.6.0-20100329.142039-1.jar -a atmosphere-pubsub.war curl http://localhost:8080/atmosphere-pubsub/myAtmosphereTopic <html><body><h1>Resource Not> Found</h1></body></html> I would just have a guided tour of how to use Atmosphere.

    Read the article

  • How to use atmosphere pubsub.

    - by Alfred
    First of I have maven installed. I have to admit I am not really familiar with Maven. but I can't get pubsub.war + atmosphere running. Could please someone please explain me. What I have tried Download atmosphere-spade-server + pubsub.war from there site. java -jar atmosphere-spade-server-0.6.0-20100329.142039-1.jar -a atmosphere-pubsub.war curl http://localhost:8080/atmosphere-pubsub/myAtmosphereTopic <html><body><h1>Resource Not> Found</h1></body></html> I would just have a guided tour of how to use atmosphere

    Read the article

  • Long polling with NSURLConnection

    - by pix0r
    I'm working on an iPhone application which will use long-polling to send event notifications from the server to the client over HTTP. After opening a connection on the server I'm sending small bits of JSON that represent events, as they occur. I am finding that -[NSURLConnectionDelegate connection:didReceiveData] is not being called until after I close the connection, regardless of the cache settings I use when creating the NSURLRequest. I've verified that the server end is working as expected - the first JSON event will be sent immediately, and subsequent events will be sent over the wire as they occur. Is there a way to use NSURLConnection to receive these events as they occur, or will I need to instead drop down to the CFSocket API? I'm starting to work on integrating CocoaAsyncSocket, but would prefer to continue using NSURLConnection if possible as it fits much better with the rest of my REST/JSON-based web service structure.

    Read the article

  • Is there an open source cross-platform push server?

    - by Ian
    I'm currently in need of a (preferably open-source) free push server, that supports both linux and windows. I need something similar to the Ajax Push Engine, but that project unfortunatelly does not work on windows (I could use a virtual machine, but that's not what I'm looking for). I need to be able to push information to/from a python daemon, from a php script, to/from javascript and to a Blackberry application (built with java). Is there any tool that could help me with that? I've also looked into the Orbited project but frankly it lacks a lot of documentation and it's been very complicated to understand it. I'm not sure if it could work for me since it isn't actually a push server, but rather a proxy for it's built in MorbidQ server (or am I wrong?). Would a technology like Advanced Message Queing Protocol work for a project like this? Something like RabbitMQ or ActiveMQ? Thank you very much for the help.

    Read the article

  • How do I view how many concurrent long polling requests there are on my server?

    - by Pascal
    My host is Joyent. My host says I have 15 process limit and prstat -J shows those processes but that doesn't tell me how many long polling requests are currently being served. I could record it myself but that would add alot of performance overhead. I need to know when the server is at its long polling limits. I know this limit occurs far before the memory or CPU is used up. From experimentation, I've already verified that the number of long polls open is NOT equivalant to the number of processes running, probably because each process has multiple threads, each serving a request. thanks.

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >