Git Product home page Git Product logo

cs6210-project3's Introduction

cs6210-project3

Authors: Pranith Kumar, Dilan Manatunga

This project contains the code for an RPC based caching proxy server. The RPC mechanism is done through Apache Thrift library, while web calls are made using CURL.

Requirements:

  • Apache Thrift 0.9.3
  • CURL

Project Structure

  • hello_world/
    • Simple RPC client/server
  • simple_proxy/
    • Simple RPC proxy server
  • caching_proxy
    • Caching Proxy Server
  • web_cache/ -Implementation of Web page cache and cache replacement policy
  • tests/
    • Test workloads and test generation scripts

hello_world

The hello_world directory contains a simple implementation of the RPC client and server. The server listens at the inputted port for any get_time RPC methods and returns the current time. The client takes in a hostname and port and performs a get_time RPC method call.

Compile: Run make in hello_world directory.

make

To run the server:

./HelloWorldServer -p PORT

To run the client:

./HelloWorldClient --host HOST -p PORT

simple_proxy

The simple_proxy directory contains a simple implementation of an RPC proxy server. The server listens at the inputted port for any get_url RPC methods and returns the current webpage for the given url. The client takes in a hostname, port, and url and performs a get_url RPC method call with.

Compile: Run make in simple_proxy directory.

make

To run the server:

./SimpleProxyServer -p PORT

To run the client:

./SimpleProxyClient --host HOST -p PORT -u URL

caching_proxy

The caching_proxy directory contains the implementation for caching proxy server, as well as the test scripts used to test the server and evaluate different cache policies.

Compile: Run make in caching_proxy directory.

make

To run the server:

./CachingProxyServer -p PORT -r REPL_POLICY

REPL_POLICY can be one of the following (RAND, FIFO, LRU, MAXS)

The client currently set the server cache to 1024KB and fetches the inputted url. To run the client:

./CachingProxyClient --host HOST -p PORT -u URL

To run a test:

./CachingProxyTest --host HOST -p PORT -t TEST_FILE -r REPL_POLICY -c CACHE_SIZE -w WARMUP_PERIOD

REPL_POLICY can be one of the following (RAND, FIFO, LRU, MAXS). The test workloads can be found in the tests directory.

web_cache

The web_cache directory contains the implementation of the web page cache. The WebPageCache.h file specifies the interface for the web page cache, as well as the CacheReplPolicy interface.

Each policy is implement in the files ReplPolicy.h and ReplPolicy.cpp. There are currently implementations of a Random, First-In-First-Out, Least Recently Used, and Max Size replacement policies.

tests

The test directory contains the workloads used to evaluate replacement policies. The script (gen_test.y) and data (similarweb_list.csv) to generate the policies are also included.

To generate a test workload, run the following command:

./gen_test --webpage_list_file FILE --ouput_file FILE TYPE TEST_LENGTH

TYPE can one of the following: random, freq, size, revsize

cs6210-project3's People

Contributors

dmanatunga avatar pranith avatar

Watchers

 avatar

Forkers

aten2001

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.