Giter Site home page Giter Site logo

web-analyzer-project-3's Introduction

Web-Analyzer-Project-3

All three projects are themed around the topic of web server analysis. They are designed to culminate in a limited simulation and assessment of a web server if all project tasks are properly completed. In Project 1, we computed some statistics on the resources that are served. In Project 2, we incorporated client-requests to an extent. In this Project, we incorporate client-requests with priorities, and a light version of Discrete Event Simulations.

In ece150-proj3-provided.h, following is the data-type that pertains to the server's database.

struct uri { char *name; unsigned size, priority; uri *next; };

As the above datatype suggests, the server's database is a linked list of entries: a URI name, size and priority. The following types are used to represent client-requests. That is, client-requests are provided as a linked list as well, each entry of type request. The timestamp is the time at which the client-request arrives.

How the server works: A client-request arrives, and is instantaneously queued. Once queued, the client-request is ready to be processed by the server. Client-requests that are pending are processed based on the priority of the URI being requested. A higher number means a higher priority.

What you need to do: Implement the following function.

timestamp maxClientDelay(uri *, request *);

The first argument is a linked list that is the database at the server. The second is a linked list of client-requests, sorted by non-decreasing timestamp. The function returns the maximum delay, rounded to the nearest second, incurred by a client-request from the time it arrives till the time it is chosen to by processed by the server.

Implement a Discrete Event Simulation of the server to compute the result the above function returns. One of three events can happen at the server at any given moment in the simulation. (a) Time progresses. (b) Requests are queued. (c) A pending request is serviced.

web-analyzer-project-3's People

Contributors

jqdsouza avatar

Watchers

James Cloos avatar

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.