I need to setup an application that watches for files being created in a folder (locally or on a network drive) and I was wondering if anyone has any thoughts on whether the FileSystemWatcher or polling on a timer would be the best option. I have used both methods in the past, but not extensively. Have you run into any issues (performanc...
I have heard a few developers recently say that they are simply polling stuff (db, files etc) to determine when something has changed and then run a task, such as an import.
I'm really against this idea and feel that utilising available technology such as Remoting, WCF etc would be far better than polling.
However, I'd like to identify...
I'm writing an application that monitors a directory for new input files by polling the directory every few seconds. New files may often be several megabytes, and so take some time to fully arrive in the input directory (eg: on copy from a remote share).
Is there a simple way to detect whether a file is currently in the process of being...
If there is a REST resource that I want to monitor for changes or modifications from other clients, what is the best (and most RESTful) way of doing so?
One idea I've had for doing so is by providing specific resources that will keep the connection open rather than returning immediately if the resource does not (yet) exist. For example,...
Say you were designing a C++ windowing library. It may or may not provide a callback API, but needs to provide a polling API to facilitate a functional style of programming.
What would the polling API look like?
Some options
SDL style
struct Event {
enum { MousePress, KeyPress } type;
union {
struct { Point pos; Mouse...
Hi,
I need to poll a web service, in this case twitter's API, and I'm wondering what the conventional wisdom is on this topic. I'm not sure whether this is important, but I've always found feedback useful in the past.
A couple scenarios I've come up with:
The querying process starts every X seconds, eg a cron job runs a python script...
I have included the code below. The program is supposed to accept telnet connections on port 8888 and then send and messages from each telnet client using poll and send and recv but It doesn't quite work 100%. It seems certain connections can always send messages to anyone and the program works fine but there is always at least one clien...
I'm attempting to create my first "real" C# application - a small pet project to help schedule peer reviews at work.
Due to the insane amount of process/bureaucracy involved in implementing anything new - as well as the fact that I'm doing this away from managements eyes, on my own time, for the time being - I'm going to be writing this...
I'm using select() on a Linux/ARM platform to see if a udp socket has received a packet. I'd like to know how much time was remaining in the select call if it returns before the timeout (having detected a packet).
Something along the lines of:
int wait_fd(int fd, int msec)
{
struct timeval tv;
fd_set rws;
tv.tv_sec = msec...
We have an application that uses Lucene.NET within a windows service to reindex our app for search. Our admin section can trigger a full reindex in Lucene, and currently the only way to review its progress is through a log file written to disc.
This is clunky. We'd like to poll the service to determine the reindexing progress.
Does a...
Hi
I would like some advice on how to implement the following:
I would like to make my users aware of the progress of a task that is running on my server via AJAX. My server runs a PHP script that downloads a file via shell command using the popen function. It periodically echos/prints what is happening. I would like to capture this ou...
I want to process a particular mailbox when it receives mail, I know I could have cron check every n minutes for any mail, but wondering if there's a way to "listen" for mail rather than continually polling.
...
I want to read data from network stream in csharp.
I have a list of clients that I poll regularly but when I start reading data from one client, I have to read the whole xml message and then continue to the next client. If there is some delay in receiving data I should not go to the next client. I should wait for some time and get the d...
Polling servers seems to be a theme that comes up for certain types of enterprise applications, particularly social networking web applications.
From what I have read, people on the Unix side use memcache that can give you a few thousand requests per second.
What options do Windows developers have since we don't have a memcache alterna...
I have an ASP.Net application that needs needs to have some work performed by another machine. To do this I am leaving a message on queue visible to both machines. When the work is done a message is left on second queue.
I need the ASP.Net application to check the second queue periodically to see if any of the tasks are complete.
Where...
I have a website where I need to poll a webpage in every minute or so. The page on the server will perform different task. I am trying to use Windows Scheduled Tasks, but that cannot be set to run in every minute. I know that there is cron jobs for this on Linux, but that is not available on Windows.
Any ideas how to do this on Window...
i have an application that records a date/time when the space bar is pressed
unfortunately, the window doesn't always have focus, for various reasons. eg virus checker popup, itunes update, windows update, etc
so what i though would be a cool idea is to use a joystick button, then regardless of which window has focus, i can always detec...
I'm trying to write a small utility that maps stdin/stdout to a serial port (a command line terminal emulator of sorts) using the Win32 APIs. I have the following code, which I think ought to work, but it doesn't appear to be receiving notifications properly from the serial port:
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hC...
we are trying to develop a flash based jabber client. How can we minimise the issue of polling to the server when a new page is loaded without implementing an iframe?
...
I have an application that works as follows: Linux machines generate 28 different types of letter to customers. The letters must be sent in .docx (Microsoft Word format). A secretary maintains MS Word templates, which are automatically used as necessary. Changing from using MS Word is not an option.
To coordinate all this, document jobs...