CFanatic

Go Back   CFanatic > Programming > Win32 Programming

Join CFanatic Forum Now

writing a spooler topic posted under Win32 Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2006, 06:54 PM
Junior Member
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
ChristophKukulies is on a distinguished road
| More
writing a spooler

I'm seeking for the following solution:

Often it is desirable to queue requests from a client that registers (connects) with a server such that the request are served in a fifo manner, that is, requests should be executed in the same order as they come in.

(Platform should be a windows NT/XP system) I'm not sure whether a solution on a file exchange basis would be appropriate, e.g. a service that looks into a certain directory and processes the files depending on their timestamp. Oldest file first. The file may contain all the processing information. The action of the service should be then to connect to a database and insert the data from the file.

The other approach would be a server that waits for connections and processes them one after the other. In a polling loop that polls via select()
on socket FDs, can I assure that I serve on a first in first out basis? I'd think so. Probably not if the server would open a thread for each connect. Then it would depend on the duration of the single thread when the transaction actually terminates.

The polled method on the other hand has the disadvantage of possibly not being capable of coping with a high load of connection attempts.

Any clues if there are solutions to this problem readily available?

When databases are involved I could imagine that using a java server, servlets, rmi, jdbc or something in that vein would also be appropriate.

It's just the order in the time axis that is concerning me.

Discussion welcome.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing a program that reads input as a stream of characters until EOF new4c C Programming 3 05-31-2008 01:38 PM
Writing/reading 'records' to/from files. rpaul Introduce yourself 1 11-10-2007 12:10 PM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 03:41 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board