1

In the project I'm working on I have two Windows 7 processes interacting with each other:

  • process A - a 3rd party, closed-source service that loads files from the hard drive
  • process B - an in-house process that creates those files and writes them to the hard drive

Current setup works as expected, however it breaks one of the business requirements - we are not allowed to create temporary files while processing the data.

On Linux I could create a "pipe file" TMP_FILE with mkfifo and use it as a buffer between those processes instead of writing to filesystem. When it comes to Windows - I'm totally lost.

Question:

On Windows 7, how can I meet the requirement of not creating temporary files on disk, when a process I cannot modify can only read from files?

Additional information:

  • process A receives XML messages with filenames of files to process
  • process B is only a prototype and can be modified in any way necessary
  • the original data is send over SCP from Linux server and received by process B, the protocol can be changed if that helps
4
  • 2
    Is the requirement "no files on disk" or "no files at all"? If no files on disk then perhaps some ram disk software?
    – Mokubai
    Sep 13, 2017 at 12:18
  • @Mokubai Ram disk is a consideration, but we are also looking for alternatives that are less taxing from administrative perspective. Sep 13, 2017 at 12:20
  • 1
    I know Windows has Named pipes which sounds a lot like what you are after.
    – Mokubai
    Sep 13, 2017 at 12:24
  • @Mokubai♦ Yes, that looks much more like something I was looking for, thanks. Weird I haven't found it when searching for "mkfifo for linux". Sep 13, 2017 at 12:29

1 Answer 1

1

The Windows equivalent of what you are asking for appears to be called a Named Pipe

Named pipes cannot be mounted within a normal filesystem, unlike in Unix. Also unlike their Unix counterparts, named pipes are volatile (removed after the last reference to them is closed). Every pipe is placed in the root directory of the named pipe filesystem (NPFS), mounted under the special path \\.\pipe\ (that is, a pipe named "foo" would have a full path name of \\.\pipe\foo). Anonymous pipes used in pipelining are actually named pipes with a random name.

The documentation for named pipes can be found at MSDN

How to actually implement this would be out of scope for SuperUser, but there are examples on Stack Overflow


Alternatively per my comment above if you want the speed of RAM but for whatever reason want a "real filesystem" there is also the option of a using a Ramdisk. Depending on the quantity and size of files there is the Dataram Ramdisk or its branded spinoff the AMD Radeon Ramdisk. I believe that they are limited to 2GB in the free versions.

Wikipedia has a reasonably comprehensive list of Ramdisk software

3
  • I need to test if the process will work with pipes, but from the looks of it I'm almost certain it will. I'll accept your answer as soon as I figure it out. Thanks once again. Sep 13, 2017 at 12:33
  • We will be using RAM disk anyway, because we discovered the 3rd party we are working with generates tons of temp files. Nevertheless, your answer was quite helpful on educational level :) Sep 15, 2017 at 9:14
  • I've added Ramdisk as a potential solution in my answer.
    – Mokubai
    Sep 15, 2017 at 9:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .