Re: Ram Drive Question Dec. 17, 2009
- From: Andrew McLaren <me@xxxxxxxxxxxxx>
- Date: Fri, 18 Dec 2009 14:04:38 +1100
E.D.G. wrote:
Data need to be shared between multiple computer programs that are running at the same time. They can be easily stored on the computer's hard drive and then accessed by the various programs. But one of the goals here is to send CD based demonstration versions of the programs to governments and researchers around the world. And when the programs run it would be nice if they could share the necessary data without storing any files on the person's computer.
Software initiated "Pipes" are too slow for the large amounts of data involved. And some of the programs are unable to read the Windows Clipboard. So data cannot be shared in that manner.
Hi EDG,
I have more questions than answers. Are you developing these programs yourself? That is, can you control how the programs communicate with each other? If so, then the right Windows IPC mechanism to use would probably be either Shared Memory, or an in-memory database; rather than a RAM disk.
A disk (whether RAM or physical) is only useful when the applications are reading and writing via File I/O. File I/O can be useful in some situations but it's nearly always a bad choice when performance is important. Likewise, a RAM disk is rarely a good idea on Windows; because Windows' regular memory management and system cache can make better use of that memory, improving overall performance. Usually a RAM disk is only useful when an application insists on doing File I/O but needs to share data at high speed - a bit like saying "I want a car which is both incredibly fast, and is also incredibly fuel-efficient" :-). They're contradictory goals.
When you mention pipes, do you mean Win32 Pipes? These do not need to be slow, if they are running on the same machine, or between well-connected machines (eg same LAN). Pipes are usually slow over a WAN connection. If running on the same machine, a Pipe can run at near-memory speeds - they shouldn't be any slower than File I/O to a RAMDisk.
Shared memory:
http://msdn.microsoft.com/en-us/library/aa366551%28VS.85%29.aspx
Pipes:
http://msdn.microsoft.com/en-us/library/aa365780(VS.85).aspx
If you have a bunch of programs which you have no control over (eg you didn't write them yourself) then, you may be kind of stuck.
Regards
Andrew
--
amclar at optusnet dot com dot au
.
- Follow-Ups:
- Re: Ram Drive Question Dec. 17, 2009
- From: E.D.G.
- Re: Ram Drive Question Dec. 17, 2009
- References:
- Ram Drive Question Dec. 17, 2009
- From: E.D.G.
- Ram Drive Question Dec. 17, 2009
- Prev by Date: Re: Can't get to System Restore
- Next by Date: Re: Windows XP Activation?
- Previous by thread: Ram Drive Question Dec. 17, 2009
- Next by thread: Re: Ram Drive Question Dec. 17, 2009
- Index(es):
Relevant Pages
|