waiter-node
v0.0.2
Published
A simple library for estimating parameters in a multi-server queue
Downloads
4
Maintainers
Readme
Waiter
Waiter is a simple library for estimating wait times and required capacity in web and mobile marketplaces. Despite its focus, waiter aims to be useful for capacity planning wherever there's a queue coupled with a finite ability to process the queue.
Example Usage
//For a specified maximum wait time, output the required hourly supply
var waiter = require('waiter')
var uberPeakHours = [13, 18] //peak hours for the app are between 1pm and 6pm
var hourlyDemand = 100
var peakDemand = 300
var rideDurations = [5, 60]
var maxWaitTime = 5
var hourlySupply = waiter.hourlySupply(uberPeakHours, hourlyDemand, peakDemand, rideDurations, maxWaitTime)
Web Usage
A hosted version of waiter useful for getting quick estimates is available here.
Installation
$ npm install waiter
Quick Start
Compute wait times:
waiter.waitTime(normalHours, hourlyDemand, peakHours, peakDemand, serviceLengths, hourlySupply)
Compute hourly supply:
waiter.hourlySupply(normalHours, hourlyDemand, peakHours, peakDemand, serviceLengths, maxWaitTime)
Plots and Statistics:
waiter.waitTimeStats(normalHours, hourlyDemand, peakHours, peakDemand, serviceLengths, hourlySupply)
waiter.waitTimePlot(normalHours, hourlyDemand, peakHours, peakDemand, serviceLengths, hourlySupply)
waiter.hourlySupplyStats(normalHours, hourlyDemand, peakHours, peakDemand, serviceLengths, maxWaitTime)
waiter.hourlySupplyPlot(normalHours, hourlyDemand, peakHours, peakDemand, serviceLengths, maxWaitTime)
Features
- Wait time estimation
- Capacity planning
- Work in system (virtual waiting time)
Contributors
- Author: nicktesla