RamDrive

J

jp2msft

We have several old applications that are provided by different governmental
and other organizations. Most are console style apps that direct output to a
filename.

We do not want to recreate these applications for 2 reasons: First, it would
take a long time to recreate these without original source code (done in who
knows what language). Second, we would no longer be able to tell our
customers that our data comes directly from these organizational applications.

What we do now is create a process that runs these applications, providing
all of the inputs, and an output file is generated which we then read in,
parse, and interpret.

What I would like to investigate is the possibility of including these
console applications as resources, generate a RamDrive on the fly, copy the
applications from my project resources to the RamDrive while it is running,
then execute the programs, have the output there for me in the RamDrive, and
I'll just read that in.

How would I create a RamDrive? Where would I get started with that?
 
N

Nicholas Paldino [.NET/C# MVP]

Have you determined that hard disk access is indeed a source of the
bottleneck in your app? Why not just run the apps and redirect them to a
file on the hard drive.

Or, even better, when you start the process from your code, redirect the
standard output stream to a custom TextWriter implementation which you would
then process as the output is written to your TextWriter implementation.
 
J

jp2msft

These applications are run hundreds of times a day. Reading and writing the
same file over and over is causing some fragmentation concerns.

Not all of these console apps return a stream of text as the output. Some
save the data in the directory the executable is located in as some form of
data file that has to be interpreted.

A RamDrive may not be the best way to answer this question, but it does have
me wondering if it is possible to create and use a RamDrive through VS's
managed code.
 
P

Peter Morris

These applications are run hundreds of times a day. Reading and writing
the
same file over and over is causing some fragmentation concerns.

Concerns or problems?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top