A flat file is created by a running process which dumps useful information about system statistics.
Now this data is to be archived for viewing later. So to minimize performance overheads , it was thought that a separate process will read this flat file and upload this Information into the database. This was thought as making database calls from within the same program writing to the flat file will be performance intensive. So the problem is that system response times captured in a flat file need to be stored in the database periodically. This is being continuously written to a flat file. There is a GUI which will read the database and present information. So as soon as the data is written to the flat file , it needs to be uploaded in the database without Much delay so that the system statistics are available for viewing . Making db_connect calls within the process writing to the flat file is not possible as it is time critical. Regards, Kiran ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Herring Sent: Wednesday, February 20, 2008 2:58 PM To: [email protected] Subject: Re: [c-prog] Design Issue with File Handling.... On Feb 20, 2008 8:33 AM, Kiran Divakaran <[EMAIL PROTECTED]<mailto:kiran_divakaran%40infosys.com>> wrote: > > Slight change in requirement . I have a file which gets appended periodically > by different processes off and on . > This file needs to be read off by another process which writes the read > information to a database. > The second process needs to read the flat file from where last left and > continue from there. > > Is pipe still a good option because the flat file will be appended by off and > on processes and > not a continuously running process. But the other process running will be > reading the flat file as and > when there is new data. tail? syslogd? Give us a concrete example of what you're trying to do from the beginning - I'm beginning to suspect that this question is a case of 'this is my solution, I can't implement it' when what we need is 'this is my problem, what is the right solution?' -- PJH http://shabbleland.myminicity.com/sec **************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS******** End of Disclaimer ********INFOSYS*** [Non-text portions of this message have been removed]
