https://github.com/yukunj/file-caching-proxy
https://github.com/yukunj/file-caching-proxy
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yukunj/file-caching-proxy
- Owner: YukunJ
- Created: 2023-02-08T00:20:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T21:43:01.000Z (over 2 years ago)
- Last Synced: 2025-02-01T08:12:41.087Z (8 months ago)
- Language: Java
- Size: 379 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
This provides the libraries and classes needed for Project 2.
The tools directory contains binary tools that perform I/O operations.
These will work on Linux x86 64-bit platforms (e.g., Andrew servers).
These are a subset ofthe tools used in Project 1.The lib directory has lib440lib.so. This is an interposition library
that will redirect file operations to RPC calls. It is used just like
mylib.so in Project 1:
LD_PRELOAD=lib/lib440lib.so tools/440read foo
(Use env if you are not running bash).
This will connect to a proxy port specified in proxyport15440
environment variable.Note: the protocol between the interposition library and the
provided code for the proxy uses a shared secret pin to restrict
who is allowed to connect. You must set the pin15440 environment
variable to a secret 9-digit number of your choice.The lib directory also has the RPCreceiver class and its support
interfaces. This class implements the stubs in Java compatiable with
lib440lib.so. Your proxy code should make use of RPCreceiver to
interface with the clients.The doc directory has autogenerated javadoc documentation on
RPCreceiver and related classes.The sample directory has a simple skeleton implementation of a proxy
class, that shows how to interface to RPCreceiver. To compile the sample,
make sure your CLASSPATH environment variable includes the absolute paths
to the lib and sample directories:
export CLASSPATH=$PWD/lib:$PWD/sample
(Use setenv if not using bash).
Then cd into the sample directory and run make. Now you can run the
skeleton proxy using:
pin15440=ZZZZZZZZZ proxyport15440=XXXX java Proxy
The pin15440 variable should be the same 9-digit number as above.
Running a tool with the LD_PRELOAD of lib440lib.so will connect to the
Proxy, though none of the operations are actually implemented. This
sample also shows how to compile a java program using a Makefile.