polling

To poll or not to poll (in a web services context)

≯℡__Kan透↙ 提交于 2020-01-23 00:07:05
问题 We can use polling to find out about updates from some source, for example, clients connected to a webserver. WCF provides a nifty feature in the way of Duplex contracts, in which, I can maintain a connection to a client, and make invocations on that connection at will. Some peeps in the office were discussing the merits of both solutions, and I wanted to get feedback on when each strategy is best used. 回答1: I would use an event-based mechanism instead of polling. In WCF, you can do this

how to send data from website server to android app

二次信任 提交于 2020-01-15 12:33:28
问题 I had a requirement in a project to configure a theme for android application using a .NET website. The options that i have is to implement a polling service from android app to server which polls frequently to see if any change is required. Can any one point any better way or method to send data from a website to android app rather than the app polling the website server frequently 回答1: A better but more complex way to do it is to use Google Cloud Messaging (aka Push Notifications). This way

how to send data from website server to android app

假如想象 提交于 2020-01-15 12:32:39
问题 I had a requirement in a project to configure a theme for android application using a .NET website. The options that i have is to implement a polling service from android app to server which polls frequently to see if any change is required. Can any one point any better way or method to send data from a website to android app rather than the app polling the website server frequently 回答1: A better but more complex way to do it is to use Google Cloud Messaging (aka Push Notifications). This way

Folder listener without using FilesystemWatcher

蓝咒 提交于 2020-01-03 05:12:32
问题 I need to create a listener in C# that will watch a shared folder (UNC path) and copy the files with a specific extension (*.json) to a target folder when they arrive. The files can be delayed for about half a minute. The folder is never empty. Problems: The files will arrive in a new sub folder, FileSystemWatcher can't be used since it can't listen to sub folders in a shared folder. The files needs to be copied and left in the folder, so we need to assure that the same file isn't copied more

Polling I/O (MIPS)

≯℡__Kan透↙ 提交于 2020-01-02 17:15:07
问题 I am attempting to write a program in MIPS that uses polling to read a character from the keyboard and then displays it using the builtin Keyboard and Display MMIO Simulator. Unfortunately, I am having trouble grasping the concept behind the registers used and the control bits, but have been trying to figure it out from examples online. Here is what I have written so far: .data .text .globl main main: .eqv RCR 0xffff0000 # Receiver Control Register (Ready Bit) .eqv RDR 0xffff0004 # Receiver

Java: Detecting modification to a file (file polling?)

爱⌒轻易说出口 提交于 2020-01-01 14:39:34
问题 What is the most efficient way to detect modification to a file in Java? I've read about file polling however, the polling approach has a number of drawbacks that become apparent as the number of watched files increases. I rather not use polling but a number of solutions online appear to point to file polling as the recommended method. I was hoping for perhaps an OS-related file system update callback solution instead -- is this possible in both linux and windows? Given that I currently only

how to do polling in backbone.js?

試著忘記壹切 提交于 2020-01-01 07:03:34
问题 Hi i am working on a paly2.0 framework application(with java) using backbone.js. In my application i need to get the table data from the database regularly ( for the use case of displaying the upcoming events list and if the crossed the old event should be removed from the list ).I am getting the data to display ,but the issue is to hit the Database regularly.For that i tried use backbone.js polling concept as per these links Polling a Collection with Backbone.js , http://kilon.org/blog/2012

Android: Polling a server with Retrofit

痞子三分冷 提交于 2019-12-31 16:35:29
问题 I'm building a 2 Player game on Android. The game works turnwise, so player 1 waits until player 2 made his input and vice versa. I have a webserver where I run an API with the Slim Framework. On the clients I use Retrofit. So on the clients I would like to poll my webserver (I know it's not the best approach) every X seconds to check whether there was an input from player 2 or not, if yes change UI (the gameboard). Dealing with Retrofit I came across RxJava. My problem is to figure out

At what point are WebSockets less efficient than Polling?

半世苍凉 提交于 2019-12-30 08:10:12
问题 While I understand that the answer to the above question is somewhat determined by your application's architecture, I'm interested mostly in very simple scenarios. Essentially, if my app is pinging every 5 seconds for changes, or every minute, around when will the data being sent to maintain the open Web Sockets connection end up being more than the amount you would waste by simple polling? Basically, I'm interested in if there's a way of quantifying how much inefficiency you incur by using

Vaadin 8 : reload grid with data from server every 1min

谁说我不能喝 提交于 2019-12-30 06:56:16
问题 I am trying to have a auto refresh feature for the grid which basically, updates the grid with latest data from the server every 'n' seconds. I was able to implement the PollListner whenever the user enables Auto-Refresh. UI ui= TestUI.getCurrent(); Boolean value = isRefreshChkBox.getValue(); PollListener listener = e -> { explorer.reloadUI(); }; if (value) { String refreshRateValue = refreshRateTxtField.getValue(); int refreshRate = Integer.valueOf(refreshRateValue); int millis = (int)