4Geeks logo
4Geeks logo
About us

Learning library

For all the self-taught geeks out there, here our content library with most of the learning materials we have produces throughout the years.

It makes sense to start learning by reading and watching videos about fundamentals and how things work.

Full-Stack Software Developer

Data Science and Machine Learning - 16 wks

Search from all Lessons

Social & live learning

The most efficient way to learn: Join a cohort with classmates just like you, live streams, impromptu coding sessions, live tutorials with real experts, and stay motivated.

โ† Back to Projects

Continue learning for free about:

Queue Managment API

Goal

4Geeks Coding Projects tutorials and exercises for people learning to code or improving their coding skills

Difficulty

intermediate

Repository

Click to open

Video

Not available

Live demo

Not available

Average duration

8 hrs

Technologies

alt text SMS Queue Management System

Lets create a Queue System: Queue system are heavily used in Goverment institutions, airports, banks and many other venues looking to organize the incoming traffic. Queue systems can also be used to load balancing for different applications like:

  • Stablishing priorities in web servers incoming requests.
  • Inmigration and visa applicantions that need to be prioritized.
  • Network packages.
  • etc.

๐ŸŒฑ How to start this project

Do not clone this repository.

The first step to start coding is cloning the python boilerplate on your local computer or opening it using gitpod.

a) If using Gitpod (recommended) you can clone the boilerplate by clicking here.

b) If working locally type the following command from your command line:

1https://github.com/4GeeksAcademy/flask-rest-hello`

๐Ÿ’ก Important: Remember to create a new repository, update the remote (git remote set-url origin <your new url>), and upload the code to your new repository using add, commit and push.

๐Ÿ“ Instructions

  • The API has to integrate with Twillio API to be able to send SMS to notify users when their turn has arrived.
  • Create an API that allows clients to manage a simple Queue, use the following data-structure to implement the queue:
1class Queue: 2 3 def __init__(self): 4 self._queue = [] 5 # depending on the _mode, the queue has to behave like a FIFO or LIFO 6 self._mode = 'FIFO' 7 8 def enqueue(self, item): 9 def dequeue(self): 10 def get_queue(self): 11 def size(self): 12 return len(self._queue)

Example worlflow

  1. The API receives a request tp add Bob into the queue (POST /new) with any particular priority (FIFO or LIFO).
  2. The API ads Bob and notifies him with an SMS confirmation, the SMS must say how many people are in front of him on the line.
  3. The system now waits until the enpoint GET /next gets executed to process the person on the queue.
  4. Every time a GET /next request is received, the next person on the queue gets processed until it is Bob's turn.
  5. When Bob is processed, the system sends him another SMS to let him know that his turn has arrived and deletes him from the list.

More details

  1. You have to create 3 endpoints for your API:
  • POST /new: Will recive information about a user and ad him into the queue.
  • GET /next: Will process one spot of the queue.
  • GET /all: Will return a list with everyone that is pending to be processed (the current queue) .

๐Ÿ“– Fundamentals

This exercise will make you practice the following fundamentals:

  1. Here you can find the information on how to send an sms with twillio, you will have to register and account (free) and also register a number (free)
  2. Building an RESTful API
  3. Complex Data Structures.
  4. Queue (FIFO vs FILO)
  5. SMS.

Goal

4Geeks Coding Projects tutorials and exercises for people learning to code or improving their coding skills

Difficulty

intermediate

Repository

Click to open

Video

Not available

Live demo

Not available

Average duration

8 hrs