Giter VIP home page Giter VIP logo

spotify_udp_task1's Introduction

UDP based application

Basic CLI application.

This application shows communication between server and client over UDP protocol.

Scenario

The Spotify regional server warehouse provides music streaming services for the billions of clients 24/7. Spotify servers responding time are depend on clients load number. Because of this reason, the clients must wait for responding with regarding the next time schedule:

  • First interval: Between 12:00 โ€“ 17:00 the maximum wait time must be 2 seconds

  • Second Interval: After the 17:00 till the 23:59 the maximum wait time must be for 4 seconds

  • Third Interval: After the 23:59 till the 12:00 of the next day the waiting time must be 1 second

The exponential backoff of these intervals must be increased by the next factors:

  • For the first and third intervals: doubles each iteration

  • For the second interval: triples on each iteration

Installation

Clone this repository into your directory:

$ git clone https://github.com/NigarHajiyeva/spotify_udp_task1

Then install requirements for this project:

$ pip install -r requirements.txt

Usage

To use this app, 2 terminals(one for server, another for client) should be opened.Then, 2 following commands should be run in terminals:

Server

python3 spotify_udp_task1.py server

Client

python3 spotify_udp_task1.py client

In this application, host[127.0.0.1] and port number[1234] are used by default.You can write the port number and address of your local machine , using -host for interface and -port for port.

To stop server, press CTRL+C in server terminal

spotify_udp_task1's People

Contributors

nigarhajiyeva avatar

Watchers

 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.