When we use the DynamoDB approach for the agent queue, we make two important assumptions: Because DynamoDB sorts a partition based on the sort key, the query returns the first available agent.įigure 2: Agent queue implementation using DynamoDB When a new call enters the queue, the matcher constructs the bitmask and asks for the first record matching the bitmask. These two attributes together ensure uniqueness of the item. The sort key is the agent availability timestamp. The partition key for the agent queue table is a bitmask with each bit in the mask representing some agent capability, such as Spanish language ability. In a composite primary key, the first attribute is the partition key, and the second attribute is the sort key. The agent queue table in this implementation uses a composite primary key as it gives additional flexibility when querying data, such as the ability to get results sorted by the sort key value for the same partition key. DynamoDB supports two different kinds of primary keys – A simple primary key, composed of one attribute known as the partition key A composite primary key composed of two attributes. Figure 2 that follows shows an approach that uses DynamoDB for the agent queue. However, SQS doesn’t offer filtering capabilities for the agent queue. We implement an agent queue that provides filtering capabilities so that a caller requesting a Spanish-speaking female agent is matched with an agent with a corresponding profile and who has been added the earliest (FIFO) to the queue.įigure 1: Agent’s language and gender attributes match the preferences from the caller’s profileĪn Amazon SQS FIFO queue is ideal for the call queue. For our use case, we apply a rule that the language and gender attributes of the support agent align with preferences in the caller’s profile, as shown in Figure 1 that follows. A call center queuing system must match customer support requests in the order they’re received to the best available agents based on rules such as the requestor’s preferred language and the type of request. We use a call center use case to demonstrate a message queue processing solution. First, DynamoDB is serverless second, DynamoDB has an on-demand pricing model, which offers simple pay-per-request pricing so users pay for actual usage instead of provisioning capacity in advance and third, DynamoDB is highly available in a single AWS region and has a Global tables option for multi-Region fault tolerance. We chose a DynamoDB based implementation for three reasons. DynamoDB is a fully managed, serverless database that supports key-value and document data models. In this post, we walk you through a use case and an Amazon DynamoDB transactions-based queueing implementation that demonstrates both message filtering and ordered message processing capabilities. However, this option can result in proliferation of topics, queues, and additional overhead to implement transactions across these different queues. This additional filtering capability can be implemented using a combination of Amazon Simple Notification Service (Amazon SNS) FIFO topics and Amazon SQS FIFO queues. For some applications, such as a call center application, you need message filtering along with FIFO ordering of messages. Amazon Simple Queue Service (Amazon SQS) is a fully managed message queueing service that offers two types of message queues: standard queues and first-in-first-out (FIFO) queues. If current page is present in set, do nothing.Message queues allow different parts of a system to communicate and process operations asynchronously. I) If set holds less pages than capacity.Ī) Insert page into the set one by one untilī) Simultaneously maintain the pages in the Let set be the current set of pages in memory. Implementation – Let capacity be the number of pages that memory can hold. Given memory capacity (as number of pages it can hold) and a string representing pages to be referred, write a function to find number of page faults. Software Engineering Interview QuestionsĮxample -2.Top 10 System Design Interview Questions and Answers.Top 20 Puzzles Commonly Asked During SDE Interviews.Commonly Asked Data Structure Interview Questions.Top 10 algorithms in Interview Questions.Top 20 Dynamic Programming Interview Questions.Top 20 Hashing Technique based Interview Questions.Top 50 Dynamic Programming (DP) Problems.Top 20 Greedy Algorithms Interview Questions.Top 100 DSA Interview Questions Topic-wise.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |