Producers and Consumers: November Meet

video locked
Enroll to watch

117 mins

This zoom meeting can never get interesting enough!!

Get to know the resources on where to apply for SD roles from this zoom meet intro part..

Some websites that were discussed:

 

Along with that why not hustle with a few more resolving doubts and general discussions?

How do we handle 5000 transactions(writes) per second on a relational database with a max latency of 50 milliseconds?

Moving ahead with the learning spree..

The first thing to note here is what type are consistency are looking at and what type of translation isolation level is needed?

Choosing the translation isolation level in a wise manner will help increase concurrency.

The requirements for the questions are below:

The user should get appropriate tasks to work on based on skill language.

Example: A user who only knows Hindi should be assigned Hindi tasks where these tasks should be served in order of priority and first come first serve basis. By default, users should get English tasks as well. The system management should also be able to view the life cycle of a job and we expect the people to be working in parallel. The system must be able to respond to the task within 15 milliseconds if the user is waiting for the job or not( If he is free).


Let's take a queue and enter the tasks.

This means that we have a priority queue which is implemented by a heap-based on which the tasks are served.

Let's say we have multiple queues.

The problem to address here is the priority and skill level of the worker and the language might be different. 

We will have a head-of-line blocking problem when we have the tasks blocking the assigning of work to the users based on priority when using only one queue.


We can have a list of queues for the languages task and the queue is following FIFO(as we know) if the task on the front doesn't get assigned to any worker we upload that task to a separate log queue.

We use the approach of using a sorted tree instead of a priority queue which makes the problem complexity O(log(n)).

This is very similar to the Operating System Resources problem.  

Now, what happens when we use a hash map(brute force algorithm)?

Depending on the language we have a worker. Then we see the skill level of the worker. 


To remove the problem where 2 workers pull the same task we shall assign locks.

Acknowledgements for the acceptance or assignments of the tasks need to be mentioned. Some sort of expiry algorithm would do. 


Question:

There are 2 services  A and B deployed using EKS. What is the best way to communicate with each service? Also, where do we need to keep the URL?

Go ahead and watch the video to know what is Gaurav’s take on this!!