Skip to content

xzaviourr/TandemQueueSimulator

Repository files navigation

DISCRETE EVENT SIMULATOR FOR SYNCHRONOUS / ASYNCHRONOUS PRIORITY TANDEM QUEUE

Discrete Event Simulator for measuring characteristics of a custom web server modeled as a closed-loop tandem queuing system having N application server and D database instances in order to capture model behaviours.

System Design

plot

Installation

  • Clone the repository

    git clone https://github.com/xzaviourr/TandemQueueSimulator.git

  • Create virtual environment

    python3 -m venv venv

  • Install python dependencies

    pip install -r requirements.txt

Running the simulator

  • Run the code with the following command-line arguments:
    -app_servers: Number of application servers
    -db_servers: Number of database servers
    -app_server_service_time: Service time of application servers
    -db_server_service_time: Service time of database servers
    -app_to_db_server_probability: Probability of request going to database server from application server
    -simulation_time: Number of application servers
    -num_client: Number of application servers
    -think_time: Think time of client
    -priority_probability: Probability of request being a priority request
    -app_server_queue_length: Buffer queue length of the app server
    -db_server_queue_length: Buffer queue length of the db server
    -retry_delay: Retry time after request is dropped from the server
    -request_timeout: Request timeout duration
    -db_call_is_synchronous_str: Choose for synchronous or asynchronous

  • Command to run:
    python --app_servers <app_servers> --db_servers <db_servers> --app_server_service_time <app_server_service_time> --db_server_service_time <db_server_service_time> --app_to_db_server_probability <app_to_db_server_probability> --simulation_time <simulation_time> --num_client <num_client> --think_time <think_time> --priority_probability <priority_probability> --app_server_queue_length <buffer queue length> --db_server_queue_length <buffer queue lenght> --retry_delay <retry time after timeout> --request_timeout <request_timeout> --db_call_is_synchronous_str <async or sync>

  • For instance:
    python main.py --app_servers 2 --db_servers 2 --app_server_service_time 0.01 --db_server_service_time 0.1 --app_to_db_server_probability 0.3 --simulation_time 10 --num_client 10000 --think_time 5 --priority_probability 0.2 --app_server_queue_length 1000 --db_server_queue_lenght 1000 --retry_delay 0.1 --request_timeout 80 --db_call_is_synchronous_str 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published