Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: FIFO directory?

by knobunc (Pilgrim)
on Jun 18, 2001 at 18:46 UTC ( #89315=note: print w/ replies, xml ) Need Help??


in reply to FIFO directory?

The reason this is a FIFO is that you can have 'named pipes' in UNIX where the file is connected directly to a process that can read or write to it. Some people use this to make their finger information cycle dynamically each time they are fingered, or to do a 'back finger' to work out who fingered them. However, there are more modern finger daemons that can run scripts directly so that particular application is less common.

The reason that a directory like fifo would be useful is to allow access to a program through a file system like interface. This would allow some funky stuff to occur. So you could map a DB directly to some filesystem layout so that reads and writes would access the DB (I think Oracle has something like this). Or you could have a filesystem that automatically version controlled files that were stored in it (e.g. Clearcase). Or you could present a dynamic view of processes running & use the OS permissions structures to controll access (e.g. the proc filesystem). Or make a directory that was mapped to a different site using FTP or HTTP. Or to store the files encrypted on disk and automatically show the desrypted version once the program has been run with the appropriate arguments.

Unfortunately there is no easy way to do this. There are some things you can do under Linux to allow a program to act as a filesystem (userfs) but that is pretty hard core. And you would probably have to write a layer in C that would map the lower level stuff up into Perl.

Tye's idea of using nfs to do this is pretty cunning and is used by some encryption filesystems. NFS basically takes a filesytem request and shoves it over the network to a program (typically nfsd) running on some remote host. The standard nfsd maps this to a local file system operation. You might be able to find an nfsd that allows you to hook into it and override the operations. Then if you run it on the same host, you can mount some arbitrary directory against your hacked nfsd and present whatever virtual view of the world that you want.

Good luck.

-ben


Comment on Re: FIFO directory?
Re: Re: FIFO directory?
by lindex (Friar) on Jun 18, 2001 at 19:05 UTC
    you said ...
    The reason that a directory like fifo would be useful is to allow access to a program through a file system like interface. This would allow some funky stuff to occur. So you could map a DB directly to some filesystem layout so that reads and writes would access the DB ...
    You hit the nail on the head with that one, that's exactly what I am aiming at only you phrased in much more elequently than I. I am going to keep working on this, I will keep pm.org updated.
    Maybe at some point or another we will have a setup of Tie:: modules to provide access to a user maped filesystem :)

    Brought to you by that crazy but lovable guy... lindex

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89315]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2014-10-25 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (141 votes), past polls