<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rabea Abdelwahab</title>
    <description>The latest articles on DEV Community by Rabea Abdelwahab (@rabea).</description>
    <link>https://dev.to/rabea</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1041250%2F1e4c7dbd-17cf-4f5b-893e-aeb844313e11.png</url>
      <title>DEV Community: Rabea Abdelwahab</title>
      <link>https://dev.to/rabea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rabea"/>
    <language>en</language>
    <item>
      <title>Transforming Business Operations with LLMs: A Path to a Production Ecosystem</title>
      <dc:creator>Rabea Abdelwahab</dc:creator>
      <pubDate>Tue, 11 Jun 2024 14:06:01 +0000</pubDate>
      <link>https://dev.to/rabea/transforming-business-operations-with-llms-a-path-to-a-production-ecosystem-20gp</link>
      <guid>https://dev.to/rabea/transforming-business-operations-with-llms-a-path-to-a-production-ecosystem-20gp</guid>
      <description>&lt;p&gt;All of us techies, have experimented with Large language models (LLMs) like GPT at some shape or form, and the promise is it will help businesses work smarter and more efficiently. While there's been plenty of experimentation, we're now at an exciting point where these AI applications and tools, could really become integrated into companies' core operations in a scalable, reliable way.&lt;/p&gt;

&lt;p&gt;But to make that happen, easier said than done, we can't just drop an LLM in the middle of our systems, as some companies sell that dream. There is a need for an ecosystem, that assures the longevity and scalable growth of AI into your enterprise. Like others, I have been experimenting and finding the best places where LLMs and LLM applications can have impact, and this is part of a series talking about the components of what I think the near future AI platform would look like.&lt;/p&gt;

&lt;p&gt;What is the next step for an AI Platform&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HITL - Human in The Loop Subsystem&lt;/li&gt;
&lt;li&gt;Feedback Subsystem&lt;/li&gt;
&lt;li&gt;Evaluation Subsystem&lt;/li&gt;
&lt;li&gt;Decision Executor Subsystem&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  HITL - Human In The Loop as a subsystem
&lt;/h2&gt;

&lt;p&gt;LLMs can't always make perfect decisions, especially when first deployed, a lot of fine tuning, prompt engineering and context testing is needed. Humans in the loop, are essential, to review and approve/reject decisions the LLMs are unsure about. &lt;/p&gt;

&lt;p&gt;Over time, as the system proves itself, more decisions can be fully automated. But that initial human oversight builds trust into your AI platform.&lt;/p&gt;

&lt;p&gt;For any LLM app to function effectively within a business context, it requires this subsystem, that can handle decision-making with varying levels of confidence.&lt;/p&gt;

&lt;p&gt;Low-confidence decisions should be routed to this subsystem, where a human can evaluate and approve or decline the decisions. This ensures that while LLM applications learn and improve, human oversight maintains decision accuracy and reliability.&lt;/p&gt;

&lt;p&gt;Even high-confidence decisions, may initially require human auditing, until the business is confident in the LLM app's performance. This process builds trust and allows for the gradual transition of decision-making responsibilities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F75gto8uf5eoevh549i14.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F75gto8uf5eoevh549i14.png" alt="Low confidence going for an audit" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg95e0xz92ateasit0pb4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg95e0xz92ateasit0pb4.png" alt="Low and High confidence going for an audit" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;Even high-confidence decisions, may initially require human auditing, until the business is confident in the LLM app's performance. This process builds trust and allows for the gradual transition of decision-making responsibilities.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Feedback as a Subsystem
&lt;/h2&gt;

&lt;p&gt;False positives, i.e. The LLM incorrectly flags a legitimate transaction as fraud.&lt;br&gt;
False negatives, i.e. The LLM fails to flag a fraudulent transaction.&lt;/p&gt;

&lt;p&gt;Humans involved in the decision-making process, or advanced LLMs auditing a process, must provide actionable feedback, whether through simple upvotes or downvotes, textual feedback, or discrepancies between human and LLM decisions.&lt;/p&gt;

&lt;p&gt;This feedback helps identify whether issues stem from input quality, inference problems, or contextual misunderstandings, allowing for targeted improvements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7lk8ja4e2936syq389x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7lk8ja4e2936syq389x.png" alt="Feedback collected through one subsystem" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluation as a Subsystem
&lt;/h2&gt;

&lt;p&gt;LLMs like any other model, drift over time, and system prompts could change in way that will effect your LLM Apps from functioning as expected. At this stage, you have a good amount of data from your LLM Apps, Feedback from your customers, HITL system and the decisions made to take it to the next level.&lt;/p&gt;

&lt;p&gt;Evaluation is a key subsystem in our platform, because many of the outputs of our Customers, System prompts, HITL and Feedback will pour into it as parameters to weigh in the efficiency of our LLM Apps, the components of an evaluation subsystem can vary, you can start simple, by introducing metrics to measure the quality of your prompts, context and output, and then for each LLM app, this can grow in different directions, you might even have custom built models to evaluate certain scenarios and applications.&lt;/p&gt;

&lt;p&gt;With all that feedback collected, you can't just let it sit there. It has to flow back into actually retraining and fine-tuning the LLM model itself through reinforcement learning techniques. This closes the loop so the AI keeps getting smarter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg2vl0cm1sk7qnmgcblpu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg2vl0cm1sk7qnmgcblpu.png" alt="Evaluation system collecting decisions, feedback and actions" width="800" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision Executor as a subsystem
&lt;/h2&gt;

&lt;p&gt;Once an LLM makes a decision (issuing a refund, flagging fraud, etc.), you need a component to implement that decision across your company's systems.&lt;br&gt;
It's the final piece in the path to production ecosystem, the action-taker subsystem, responsible for executing decisions across your business.&lt;br&gt;
Acting as a proxy to integrate seamlessly with existing systems. Whether issuing refunds, canceling orders, or reporting fraud, the action-taker ensures that decisions are implemented efficiently and accurately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm0updh3rswotlpbfzgn3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm0updh3rswotlpbfzgn3.png" alt="Triggering actions from one proxy to out enterprise systems" width="800" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So far, I see this ecosystem being built as a separate platform that integrates with but is distinct from your core business systems. That way you get modularity and observability, as LLM apps move fast and change frequently.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Putting it all together
&lt;/h2&gt;

&lt;p&gt;Integrating this platform into existing business infrastructure requires a standalone architecture that encapsulates LLM apps and their supporting systems. Communication with others can be managed through event-driven or request-response patterns, with robust observability to monitor and maintain the platform's stability.&lt;br&gt;
I want to emphasize that such ecosystem can grow with time, we are still finding and figuring out how LLMs will have the biggest impact to our businesses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ethical Considerations
&lt;/h2&gt;

&lt;p&gt;Ethical considerations also come into play, necessitating moderation agents and policies to ensure responsible usage of LLMs.&lt;br&gt;
There are certainly challenges around trust, and responsible AI obstacles to overcome. But with the right supporting infrastructure, LLMs could soon graduate from experiments and SaaS to become powerful Enterprise AI assistants woven into your day-to-day operations. Exciting times!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>systemdesign</category>
      <category>llm</category>
    </item>
    <item>
      <title>Know your engineers to lead them to success</title>
      <dc:creator>Rabea Abdelwahab</dc:creator>
      <pubDate>Wed, 08 Mar 2023 19:08:28 +0000</pubDate>
      <link>https://dev.to/rabea/know-your-engineers-to-lead-them-to-success-4gbb</link>
      <guid>https://dev.to/rabea/know-your-engineers-to-lead-them-to-success-4gbb</guid>
      <description>&lt;p&gt;There are many engineers out there, and their daily routine would be something like; having coffee, checking that everything is running fine on production, hacker news, a couple of subreddits, and jumping to the biggest part of the day, where you get plugged in and build something that will make a customer or a user more efficient, fast, useful, or unfortunately get laid off (Yes, we do not mean to do that, most of the time) .&lt;/p&gt;

&lt;p&gt;The engineers you hire at your company are of different mindsets even technically, they come from various work environments, which rules how your product or services you are offering will shape eventually, and how willing is this person to handle the tasks you give.&lt;/p&gt;

&lt;p&gt;This is not; a bad/good engineer post and this is also not to say that an engineer can’t have all of the below, but each one of us can surely relate to one of them:&lt;/p&gt;

&lt;h3&gt;
  
  
  Soldiers
&lt;/h3&gt;

&lt;p&gt;Steady performers, they will turn words into action, story cards into features, they have dedicated ownership of the service they are working on, and they believe they are making it better with each change they add to it. As simple as the word ownership can be, it is not found in every engineer, but the good news is; its teachable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Gatekeepers
&lt;/h3&gt;

&lt;p&gt;Their abilities shine when making a situation turn from red to green as soon as possible, with a customer first mentality, they fix now, and question later. whether it is a person or a team, this unit is the gate keeper of your product and the safety net from down times.&lt;/p&gt;

&lt;p&gt;They code review religiously, and they participate in standardizing the way everybody contributes to the platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  Communicators
&lt;/h3&gt;

&lt;p&gt;They will question a feature, and debate how it will effect the customer/user , they will come up with better solutions and evidence to back their case. one is a gem, a product owners’ best friend, since this will be the access for understanding what is happening on the technical side, and how the team can make a better product/service.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architects
&lt;/h3&gt;

&lt;p&gt;They shine when it comes to designing a solution, taking into consideration the current state of the product and what are the next steps to implement for it to grow in the right direction and power future changes. — Be careful of over architecting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Explorers
&lt;/h3&gt;

&lt;p&gt;They are the drivers of proofs of concept, the non-stop seekers of whats out there that can make our products better, a technology, a design pattern, or as simple as a new standard in the way we work. They believe that even if its not broken, it can be much better.&lt;/p&gt;

&lt;p&gt;I take this as a small guide to know the engineer I am talking to, to help me understand what can be their favorite part of the day and what challenges his mind.&lt;/p&gt;

&lt;p&gt;A CEO, product manager, or any leader, will be lucky to have all these types of engineers, every one of them is a key component of a solid productive team, and what will always be common between them is the curiosity and openness to learn more everyday.&lt;/p&gt;

</description>
      <category>leadership</category>
      <category>engineering</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Learnings in Engineering Leadership - From Battles Won and Others Lost.</title>
      <dc:creator>Rabea Abdelwahab</dc:creator>
      <pubDate>Wed, 08 Mar 2023 19:06:08 +0000</pubDate>
      <link>https://dev.to/rabea/learnings-in-engineering-leadership-from-battles-won-and-others-lost-5387</link>
      <guid>https://dev.to/rabea/learnings-in-engineering-leadership-from-battles-won-and-others-lost-5387</guid>
      <description>&lt;p&gt;My background is mainly in startups, as an individual contributor, or a lead for a small team, I always enjoyed working with a group and I decided to move to more corporate environment, to start building that company’s engineering team and rebuilding one of their core systems.&lt;/p&gt;

&lt;p&gt;A best case scenario for a team, is having leadership and management work together to accomplish great positive change that is measurable.&lt;/p&gt;

&lt;p&gt;This is not one of these best case scenarios, this is my personal experience being put into a position where I needed to be both and what I found beneficial for my team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Instill confidence in your team with your decisions and transparent communication
&lt;/h3&gt;

&lt;p&gt;As a leader, you will be taking many decisions for your team, other decisions could be falling into your lap. Decisions you can control and the thought process behind them should be easily explainable to your team members, the decisions that fall from others, the “why” and how it was taken, should be a story you are able to tell if needed, if you can’t, your answer should be “I don’t know yet, but I will get us the answer”.&lt;/p&gt;

&lt;p&gt;Even as a leader, there will be decisions that you can’t control, and even if its a battle fought and lost, your team just wants to know that you stood up for them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Work comes in waves, an opportunity for making mistakes
&lt;/h3&gt;

&lt;p&gt;While strategically, any business is trying to hit their goals continuously, having different teams in a company, means there will be calmer times than others, these little gaps are an amazing opportunity. As a tech leader, these times are the best to sharpen the tools for the next wave, whether its tackling technical debt, or preparing for a new project, or documenting an existing feature. Always have a set of technical goals to achieve in the calm times, to make the team’s life better.&lt;/p&gt;

&lt;p&gt;Your team will also have their ideas on what to improve, this is a great time to let them run with theirs and learn from mistakes they make, they will get better technically, or improve in scoping work, or passing knowledge to others.&lt;/p&gt;

&lt;h3&gt;
  
  
  Specialization is OK, and most of the time its great!
&lt;/h3&gt;

&lt;p&gt;You are leading a set of personalities with different interests, as much as Nirvana for any business would be that everyone is equal in every skill and interest, that is not the case. You have the potential leaders, the unit testing gate keepers, the DevOps fans, and tooling explorers, etc. Make the best out of these qualities, those team members are willing to own and run with an initiative because they are passionate about it, don’t stop a streak of productivity in the sake of making every team member know everything. You would ask, what about if I lose someone that is specialized in a certain area? I am with training people and help achieve sustainable skills in teams, is it the highest priority? I would argue that it’s not.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make the best out of each member’s qualities, they are willing to own and run with an initiative because they are passionate about it&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  How to be a step ahead of the business
&lt;/h3&gt;

&lt;p&gt;While transparent communication should be the de facto in any hierarchy, unfortunately, it is not the case every time, your business owners could decide that the change can be communicated in a shorter timeframe, not giving much buffer time. The way to go around this is to give the business the confidence to throw raw ideas of where they want the direction to go, making you part of the brainstorming process, because once an idea becomes a decision, you lose some valuable time to prepare for it, this is to assure that you are a step ahead, not to steer your ship depending on it, but to have a plan in your head if needed.&lt;/p&gt;

&lt;p&gt;Moreover, communicating to your team a future direction changing scenarios, mentally, the team is also aware of the possibility of a change, you will build a team of agile forward thinkers.&lt;/p&gt;

&lt;p&gt;Yes, there is strategic planning, and goals that are visible that we need achieve, but there is also projects and initiatives that come in between, and those are the direction changing decisions I am mentioning here.&lt;/p&gt;

&lt;p&gt;When an idea becomes a decision, you lose some valuable time to prepare the team for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Engineers need to be good at communication, don’t accept less
&lt;/h3&gt;

&lt;p&gt;When hiring or coaching team members, good communication should be the number one skill to make your engineers master, lone-wolves can’t be an option, and lack of communication between team members and the business will cause a lot of conflict.&lt;/p&gt;

&lt;p&gt;The effect of a team that lacks communication skills is more layers of management to translate to the business, and project managers and facilitators to connect between team members, its a recipe for failure.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Good communication should be the number one skill to make your engineers master&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;All the above, if I were to summarize it; if you happen to be a leader and a manager, which is not uncommon, your mission is to learn from your environment quickly, and value time (your time and your team’s ) so you will be the effective leader they need. Make your mistakes visible to your team, and believe that there is no written in stone guidelines to leadership, no one way of becoming a good one, it’s about trial and error and improving continuously.&lt;/p&gt;

</description>
      <category>leadership</category>
      <category>management</category>
    </item>
    <item>
      <title>DynamoDB — Features that made it the database of choice— Use Case</title>
      <dc:creator>Rabea Abdelwahab</dc:creator>
      <pubDate>Wed, 08 Mar 2023 18:50:40 +0000</pubDate>
      <link>https://dev.to/rabea/dynamodb-features-that-made-it-the-database-of-choice-use-case-1mkb</link>
      <guid>https://dev.to/rabea/dynamodb-features-that-made-it-the-database-of-choice-use-case-1mkb</guid>
      <description>&lt;p&gt;Since DynamoDB’s release in 2012, I have used it in simple scenarios, as a persistent key-value store, but never got into the best practices and design patterns that could let me maximize the benefits of it. As most of AWS technologies, Dynamo evolved, and now it offers more, such as transactions, range-based partitioning, and more native integrations with other AWS services.&lt;/p&gt;

&lt;p&gt;Well finally, I had a good use case, a business capability (service) that needs a NO-SQL type of storage that can scale, but as an AWS customer, I had more options to choose from to be fair. As a note, the service I am building had some unknowns; expected high spikes on certain days of the week, with extensibility in mind for the future if it grows as expected. with that in mind, the choice went as below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9llwwy9cidtv4udjvqoa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9llwwy9cidtv4udjvqoa.png" alt="Image description" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DynamoDB from our stoplight chart above, will be the best candidate to move forward, The next step is to explore “the how”, using Single Table Design.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Single-Table is a concept for utilizing DynamoDB’s design under the hood to connect all data needed in one table for a business capability, making use of well-thought of access patterns, for maximum performance and efficiency. you can learn more here.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To understand more if my use-case fits the bill, I needed to understand how DynamoDB stores the data. For it to be highly available, scalable, with a single digit latency, my service has to abide by the way Dynamo is designed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Overview — Basics of Dynamo
&lt;/h3&gt;

&lt;p&gt;DynamoDB keeps your data in partitions (SSD under the hood), with &lt;strong&gt;Partition Key&lt;/strong&gt; being the identifier of a record, the decision in which partition it goes, happens through a hash function. Optionally you can add a Sort Key, which is helpful to introduce to your records, as DynamoDB is able to order your records by it in ascending order in the same partition, makes the trip to grab your data much shorter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnxwmavtiakmmvbxouuq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnxwmavtiakmmvbxouuq.png" alt="Image description" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Read/Write Patterns
&lt;/h3&gt;

&lt;p&gt;In our use-case, I needed a breakdown of my application’s read/write patterns, this way I am able to translate it to what will be the records in my Dynamo Table.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer needs to be able to view invoice details.&lt;/li&gt;
&lt;li&gt;Customer needs to be able to create/view transactions (charges/refunds) on an invoice.&lt;/li&gt;
&lt;li&gt;Customer needs to be able to view each transaction individually.&lt;/li&gt;
&lt;li&gt;Customer needs to be able to create/view comments on an invoice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftshrfnmmx7pvx6e0gewv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftshrfnmmx7pvx6e0gewv.png" alt="Image description" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From my user stories, it is obvious that invoice number is the best candidate to be the Partition Key in our table, solving for other scenarios utilizing the Sort Key for more ways to access the data as shown above.&lt;/p&gt;

&lt;p&gt;To give an example of how a combination of partition key and a sort key brings us back the data we need, I wanted to visualize it as below depending on AWS docs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbs2s849isbdi6j33ww16.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbs2s849isbdi6j33ww16.png" alt="Image description" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The benefits of DynamoDB as mentioned before are many, but one of the most important ones, is the flexibility it gives Tech and Engineering to respond to the business direction change or any demand, scenarios such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I need to send the data to our data warehouse to analytics (Dynamo -&amp;gt; Streams -&amp;gt; RedShift) or (Dynamo -&amp;gt; S3 -&amp;gt; Data Warehouse)&lt;/li&gt;
&lt;li&gt;I need to be able to send emails on updates/deletes/inserts (Dynamo -&amp;gt; Dynamo Streams -&amp;gt; Lambda -&amp;gt; SeS) or (Dynamo -&amp;gt; TTL Field -&amp;gt; Lambda -&amp;gt; SES)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this single table design, we were able to implement a service that is performant, price efficient, and extensible in the future with all the integrations that Dynamo comes with.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>dynamodb</category>
      <category>database</category>
    </item>
  </channel>
</rss>
