polling

Polling Service - C#

ε祈祈猫儿з 提交于 2019-12-18 04:24:10
问题 Will anobody be able to help me? I am creating a windows service that connects to a sql database and checks a date in the table and compares it to todays date and updates a field in that database for eg if the date is equal to todays date then the field will be set to true. The problem I am having is that when i start the service it does not do that but when i do it in a normal form it works perfectly. My code is below: //System.Timers Timer timer = new Timer(); protected override void

How to reset timeout in Javascript/jQuery?

爷,独闯天下 提交于 2019-12-18 03:55:38
问题 I've got a field A in my webpage which, when edited by the user, invokes an API call (using jQuery), which updates field B. After the edit, the API should be called every 10 seconds to update the field B again. I currently do this using: setTimeout(thisFunction, 10000); The problem is that this timeout is set every time the user edits field A, which after editing field A a couple times causes the timeout to be set multiple times and the API to be called many many times. This makes the website

Scaling GCM Push. How often can you perform GCM Push?

强颜欢笑 提交于 2019-12-13 20:11:28
问题 Everybody tells me that polling server for new data is stupid if the server is yours and you should implement push with GCM instead. Well, I agree and have done so but, I was wondering, how often can or should you perform push? I have a simple app where people post stuff to the server and have a feed of everyone else's posts. The method on the server that does the saving to the database also triggers the GCM Push at the end, so Google sends out the push notifications to everybody and

How to stop javascript ajax requests in inactive Iframe?

半世苍凉 提交于 2019-12-13 15:44:11
问题 I have made Website, where various other pages are built-in as "apps" with i frames: <iframe id="frame1" src="./app1.php"> <iframe id="frame2" src="./app2.php"> In these apps, there is javascript code executed, among others very high-frequent HTTP-Requests. $('#app1button').click(function () { //Here i have to stop the HTTP-Requests which where fired from the JS of App2 hideAllApps(); showApp(app1); }); app1 is polling information from a server very high frequently: app1.php has Javascript in

Web Sockets vs Interval Polling

余生长醉 提交于 2019-12-13 14:52:58
问题 I'm currently looking for the best fitting solution to handle notifications. My current options are either using websockets or just do a polling (only 1 request every minute, no long polling, no permanent polling) I somehow have problems to find performance indicators for these methods. The result should be able to handle a lot of users in parallel without taking too much resources. Option A: Every 30 Seconds a request is sent to check if the users has a new notification Option B: Each users

jQuery - polling of a job queue

走远了吗. 提交于 2019-12-13 12:15:48
问题 I have a database table which contains a queue of jobs. A separate program processes these jobs. I want to provide a webpage for users to watch the progress of the queue. The Server side scripting to query the table and return it in a JSON format is no problem. I've done some reading on jQuery and the PeriodicalUpdater plugin. I'm wondering if it is at all possible to use this plugin to create a visual queue (a basic explanation would be a one column table, with a row per entry in the queue),

Robospice retry policy custom implementation

╄→尐↘猪︶ㄣ 提交于 2019-12-13 05:13:45
问题 I need to implement such behaviour. Something like polling remote web server for the some period of time, checking for the condition in response from the server, for example variable condition. To be more specific, consider an example. I need to poll server every 5 secodns during 5 minutes and than fail. There is great feature in Robospice library - RetryPolicy, nearly what I need. I has getRetryCount, getDelayBeforeRetry methods. Exactly what I need to implement my task. But I need to

polling recvfrom(), sendto()

时光怂恿深爱的人放手 提交于 2019-12-13 03:14:01
问题 I remake two detached threads to poll() cycle in server: for receiving and sending data. All work fine, until setting client's sending frequency to 16 ms (< ~200 ms). In this state one thread always wins the race and answers to only one client with ~1 us ping. What I need to do to send and receive data in poll() with two (or one) UDP sockets? Part of server's code: struct pollfd pollStruct[2]; // int timeout_sec = 1; pollStruct[0].fd = getReceiver()->getSocketDesc(); pollStruct[0].events =

How Polling mechanism can be realized with RMI?

冷暖自知 提交于 2019-12-13 02:55:00
问题 Following the design/architecture i created for multiuser/network turn-based game with RMI server callbacks, I have tried to create a distributed animation in which my model(Ball) is remote object and it updates the clients via callback mechanism from server. The current situation of code is : The model remote object, which is iterating client list and calling update method of them, public class BallImpl extends UnicastRemoteObject implements Ball,Runnable { private List<ICallback> clients =

Jenkins SCM polling is not working when hosted on AWS Linux 18.04.1

懵懂的女人 提交于 2019-12-13 01:19:05
问题 EDIT: I found out that, on UBUNTU 16.0.4 the SCM Service is working fine and I do not face the problem. However, I'm having this problem on Ubuntu 18.0.4. Any idea how can I check the SCM service logs? Problem: Jenkins is not able to Poll for changes in the git repo. However, if manually triggered, the recent changes are fetched and then the job is built. Jenkins Config: Jenkins master machine is in AWS cloud behind a load balancer. All slaves are in my local network which can connect to