<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Felycia Edelyne on Medium]]></title>
        <description><![CDATA[Stories by Felycia Edelyne on Medium]]></description>
        <link>https://medium.com/@felyciaedelyne?source=rss-d54c53f5ce2a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Raa37HTFvXJ64eYg</url>
            <title>Stories by Felycia Edelyne on Medium</title>
            <link>https://medium.com/@felyciaedelyne?source=rss-d54c53f5ce2a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 02:04:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@felyciaedelyne/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Designing a Distributed Database for Transplantation Networks]]></title>
            <link>https://medium.com/@felyciaedelyne/designing-a-distributed-database-for-transplantation-networks-f814cb27aab5?source=rss-d54c53f5ce2a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f814cb27aab5</guid>
            <category><![CDATA[hospital]]></category>
            <category><![CDATA[entity-relationship-model]]></category>
            <category><![CDATA[distributed-database]]></category>
            <category><![CDATA[medical]]></category>
            <category><![CDATA[data-warehouse]]></category>
            <dc:creator><![CDATA[Felycia Edelyne]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 09:44:03 GMT</pubDate>
            <atom:updated>2026-11-12T10:45:05.654Z</atom:updated>
            <content:encoded><![CDATA[<h3>How Do You Not Give the Same Kidney to Two People? Designing a Distributed Database for Transplantation Networks</h3><p>Author: <a href="https://medium.com/u/d54c53f5ce2a">Felycia Edelyne</a> &amp; <a href="https://medium.com/u/43a21c8c3c93">Jovan William</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QctQjQS7G6DYBr4qruMeaQ.jpeg" /><figcaption>Cover image by <a href="https://unsplash.com/@m_dominguez_marketing">Martha Dominguez de Gouveia</a> on <a href="https://unsplash.com/license">Unsplash</a></figcaption></figure><p>Once, there’s a condition where the donor passes away at Hospital and a kidney is suddenly available. Three other hospitals have patients waiting for one. Two of those hospitals hit “accept” at almost the same second. So… who gets the kidney?</p><p>If your answer is “whoever’s request reaches the server first”, it means that you just stumbled into one of the nastiest problems in database design. Organs only stay usable for a few hours, so there’s no “let’s sort it out tomorrow”. Promise the same organ to two patients and one of them loses a chance that might never come back.</p><h3><strong>The real problem isn’t storage, it’s all about “Coordination”</strong></h3><p>Information about donors, recipients candidate, hospital facility readiness, and transport is already scattered across different process along hospitals, that changes constantly (Gilbert &amp; Lynch, 2002). Each hospital has different methods to collect, manages, dan updating data. If nobody keeps it in sync, three things could go wrong (Swanson et al., 2010; Joint Task Force, 2020):</p><ul><li><strong>Matching gets slow.</strong> Stale data means the system matches an organ to someone who’s no longer on the list.</li><li><strong>Offers get out of sync.</strong> Hospital B thinks an offer is still open while Hospital C already took it. That’s the dreaded <em>double allocation </em>(Saito &amp; Shapiro, 2005).</li><li><strong>One bad connection stalls everything.</strong> If hospitals depend completely on each other’s network, a single outage can freeze real operations.</li></ul><p>On top of that, there’s a privacy twist. Donor and patient identities must stay secret, but every access and every change still has to be traceable and auditable. So we need data that is fresh, consistent, private and accountable, all at once (Gray &amp; Lamport, 2006).</p><h3>Functional Requirement s— What specific tasks should the user be able to perform?</h3><ul><li><strong>Login with roles.</strong> System authenticate user and apply access rights according to responsibilities. Admins, hospital staff, and auditors each see only what they’re allowed to see.</li><li><strong>Record donors, organs and recipients.</strong> Identity data is split off from clinical data right from the start.</li><li><strong>Hospital transport resources. </strong>Store and update locations, contact details, and estimated transport distance.</li><li><strong>Keep a waiting list</strong> with a history of every change, ranked only by approved rules.</li><li><strong>Search across hospitals</strong> for matching candidates, with the reasons why they match including relevant urgency, hospital details, and also available trasnportation information.</li><li><strong>Sync and detect conflicts.</strong> If two hospitals update the same thing differently, nothing gets silently overwritten. A human reviews it.</li><li><strong>Notify the right people</strong> when offers are accepted, rejected or about to expire, without leaking identities in the message.</li></ul><h3>Non-Functional Requirements — Under what conditions does the system need to operate smoothly?</h3><ul><li><strong>95% of searches finish</strong> within 3 seconds, with 100 people using it at once across four hospitals.</li><li><strong>Consistency and integration, </strong>so the system didn’t overwrite any conflicting critical updates without detection.</li><li><strong>Service availability </strong>of at least 90% per month.</li><li><strong>Recovery time (RTO)</strong> of 60 minutes max and data loss (RPO) of 3 minutes max for committed data.</li><li><strong>Sensitive data encrypted</strong> in transit and never stored as plain text, following Indonesia’s Personal Data Protection Law (UU No. 27/2022).</li><li><strong>Format alignment </strong>across hospital data exchanges require aggreed, versioned, and versioned formats.</li></ul><h3>Entity Relationship Diagram</h3><p>To make sense of all this data, we first modeled it as 13 entities: hospitals, donors, organs, recipients, waiting list, match offers, transplants, transport and transport routes, user accounts, an audit log, and two separate identity tables (one for donors and one for recipients) so that names never mix with medical data. Here’s the model in two notations. The first is the classic Chen style (Figure 1) and the second is the Crow’s Foot style (Figure 2) that looks more like real tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xs7VccS7o0nOvuKOKVxWTw.png" /><figcaption>Figure 1: Entity Relational Diagram (Chen Style) by Author</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gDaLzoaTAyG0R9MONl0v7A.png" /><figcaption>Figure 2: Entity Relational Diagram (Crow’s Foot) by Author</figcaption></figure><h3>Is one big central database enough?</h3><p>A single central server sounds simple, but it gives you a <em>single point of failure</em>. If it goes down, or the link to it breaks, every hospital is stuck. It also puts every patient’s sensitive data into one place, which could pose a risk of data leakage.</p><p>The opposite extreme, copying everything to every hospital, isn’t great either. Sync gets expensive and every copy is one more place for data to leak. So we aimed for the middle: keep data close to where it’s used and only centralize the tiny bit that must be consistent.</p><h3>Database Architecture for Optimizing These Problems</h3><p>Our setup has four hospital nodes. Hospital A is where the donor organ comes from. Hospitals B, C and D are the recipient hospitals. Each hospital keeps its own data locally, in three separate databases:</p><ul><li><strong>Clinic</strong>: medical records and test results.</li><li><strong>Identity</strong>: names and national IDs, that’s all encrypted.</li><li><strong>Audit</strong>: the history of all activities.</li></ul><p>Splitting these up is a big deal for privacy. The identity data can be reached only by people with the right role, and it’s linked to the clinical data through an ID, not through names.</p><p>Then there’s the <strong>coordination cluster</strong>: three servers, K1 (primary), K2 and K3 (replicas). It only holds three things: <strong>the status of each organ</strong>, the <strong>match offers</strong>, and <strong>the hash of the audit trail</strong>. It also acts as the coordinator when hospitals need to agree on something and it handles automatic failover if the primary dies.</p><p>Everything a user does first goes through a gateway that checks Multi-Factor Authentication (MFA) and Role-Based Access Control (RBAC), then routes the request to the right node (Haerudin, et al., 2025; Sahyudi, M., &amp; Susanto, E. R., 2025).</p><p>There’s a data warehouse path too, but it’s kept off to the side, so it never slows down real allocations. Analytics runs on a read-only replica, a routine ETL job moves the data into the warehouse and a dashboard shows things like waiting time and how often allocations succeed.</p><p>Here’s the whole picture in one diagram (Figure 3):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*4dJTA_6CQDZOloIRqNEzBQ.png" /><figcaption>Figure 3: Database Architecture with Node Diagram by Author</figcaption></figure><h4><strong>So what happens when an organ becomes available?</strong></h4><ol><li>Hospital A records the donor, the organ, and the clinical data.</li><li>The gateway checks the user’s login and role, then passes the request to the coordination cluster.</li><li>The cluster matches the organ against candidates across B, C and D, and locks the organ for the best match.</li><li>The chosen hospital accepts or rejects via a two-phase commit (more on that soon).</li><li>Every step is written to the audit ledger.</li></ol><h3>Fragmentation, Replicate, and Allocate Date</h3><p>This is the part where the “distributed” in a distributed database really shows up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_yEq6xArasfTY-FkktQvmQ.png" /><figcaption>Figure 4: Hierarchical Database Architecture by Author</figcaption></figure><p><strong>Fragmentation means cutting the data up.</strong> We could cut the data in two ways. First, <em>horizontally</em>: the recipient table is split by hospital_id, so Hospital B keeps only B’s patients, C keeps C’s, and D keeps D’s. Same columns, different rows. Donors live only at Hospital A. Second, <em>vertically</em>: each hospital splits its data into clinic, identity and audit, because they have very different sensitivity levels.</p><p><strong>Replication means making copies.</strong> Not all data is treated the same:</p><ul><li>Clinic data is copied asynchronously to a standby at a partner hospital (A with B, C with D). It’s big and sensitive, so we don’t make everyone wait for the copy to finish.</li><li>Identity data is not replicated at all. It only has an encrypted backup stored locally.</li><li>Audit logs stay at their hospital and get copied asynchronously, but their hashes are sent synchronously to the coordination cluster. That means anyone can verify the log hasn’t been tampered with, without seeing the sensitive stuff.</li><li>The coordination cluster’s three databases are replicated synchronously, and a write only counts once a majority (2 out of 3) agrees. That’s what stops double allocation.</li></ul><p><strong>Allocation part will decide where things live.</strong> Three strategies given:</p><ul><li>Partitioning with no copies for the hospital data (it stays where it’s used)</li><li>Partial replication for the standby pairs (so data survives a hospital going down)</li><li>Full replication for the small, frequently read, must-be-consistent coordination data. This avoids stuffing everything into one server, and it avoids copying everything everywhere.</li></ul><h3>Mechanism to stop double booking</h3><p>Remember the two hospitals hitting “accept” at the same time? Here’s the toolkit we use to deal with it:</p><ul><li><strong>One coordinator per organ type.</strong> Every status change goes through that coordinator, so there’s no parallel decision-making.</li><li><strong>Locks with a lease.</strong> While an organ is being offered, it gets a temporary lock so nobody else can offer it. The “lease” part means the lock expires by itself if something crashes, so nothing stays locked forever.</li><li><strong>Optimistic concurrency.</strong> Before saving, the system checks whether the organ’s data changed since you last read it. If it did, your update is rejected instead of silently overwriting someone else’s.</li><li><strong>Two-phase commit (2PC).</strong> The coordinator first asks everyone involved “can you do this?” (prepare), and only if all say yes does it say “go” (commit). If anyone says no, everything rolls back.</li><li><strong>Transaction isolation</strong>, so one transaction can’t peek at another one’s half-finished work.</li></ul><h3>Recovery system process</h3><p>For recovery, <strong>Write-ahead logging (WAL)</strong> writes every change to a log before applying it, so after a crash the server can replay the log and know what was finished and what wasn’t (Narrative Goldmine, 2026). If the main server is gone, the <strong>standby</strong> takes over. If a 2PC gets cut in the middle, the system checks the transaction’s status with the coordination cluster and cancels it if it was never committed.</p><p>For cases like someone marking an organ as “allocated” with no matching record in the audit log, regular backups plus archived WAL let us do <strong>point-in-time recovery</strong>: roll the database back to right before things went wrong. If Hospital A goes down completely, B, C and D can still see organ status, offers and audit hashes thanks to the replicated cluster.</p><h3>Security, the most important part because it’s related to people’s private data</h3><ul><li><strong>MFA and session timeouts</strong> for login, plus <strong>RBAC</strong> so people only get the access their job needs.</li><li><strong>Pseudonymization. </strong>Real identities stay encrypted in separate, non-replicated storage.</li><li><strong>Encryption</strong> both at database or media storage (on disk) and in transit (over the network).</li><li><strong>Separation of duties</strong>, so the person who changes data isn’t the person who checks it, plus monitoring that flags weird access patterns.</li><li><strong>Detect abnormal access patterns </strong>that involve sensitive data if any suspicious activity occurs.</li></ul><h3>Limitations and Trade Offs</h3><p>This architecture remains strictly at the conceptual stage without functional prototypes, load testing, or empirical benchmarks, all baseline performance targets that 95% search success rate within 3 seconds, 90% availability, and defined Recovery Time Objective (RTO) and Recovery Point Objective (RPO) metrics are unverified assumptions rather than proven capabilities. Consequently, this design reflects a deliberate trade-off that prioritizes rapid high-level planning and initial resource efficiency over early operational validation, which sacrifices guaranteed system resilience and exposes the architecture to potential structural rework once formal risk analyses and real-world production demands are established.</p><h3>Conclusion</h3><p>From the initial problem statement to the recovery and security plan, this proposal treats organ allocation as a coordination challenge across hospitals not simply as a matter of storing more records. Its 13 entity data model separates personal identity from clinical information. The architecture keeps hospital data close to where it is used, partitions records by hospital and sensitivity, and selectively replicates only the information needed for standby recovery or shared allocation decisions.</p><p>At the center of the design, a three-node coordination cluster is intended to maintain a common view of organ status and offers. A designated coordinator, temporary locks, optimistic concurrency checks, transaction isolation, and two phase commit are proposed to reduce the risk of conflicting decisions and double allocation. When a connection fails, the system favors local reads and postpones new cross-hospital allocations until synchronization can resume. WAL, backups, point in time recovery, and standby nodes address recovery, while MFA, role-based access, encryption, pseudonymous IDs, and auditable logs address privacy and accountability.</p><p>Taken together, these choices form a layered blueprint: keep sensitive data controlled locally, coordinate critical decisions explicitly, and make changes recoverable and traceable. Before the design could guide real operations, its clinical rules, data-sharing responsibilities, failure behavior, security controls, and proposed performance and recovery targets would need to be agreed upon and tested with the participating hospitals.</p><h3>References</h3><p>Anwari, A. D., Akbar, R. J., &amp; Ijtihadie, R. M. (2021). Implementasi optimistic concurrency control pada sistem aplikasi e-commerce berdasarkan arsitektur microservices menggunakan Kubernetes. <em>Jurnal Teknik ITS,</em> 10(2).<a href="https://doi.org/10.12962/j23373539.v10i2.66255?utm_source=chatgpt.com"> https://doi.org/10.12962/j23373539.v10i2.66255</a></p><p>Gilbert, S., &amp; Lynch, N. (2002). Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. <em>ACM SIGACT News</em>, 33(2), 51–59.</p><p>Gray, J., &amp; Lamport, L. (2006). Consensus on transaction commit. <em>ACM Transactions on Database Systems,</em> 31(1), 133–160.</p><p>Haeruddin, H., Prasetyo, S. E., &amp; Mindy, A. (2025). Implementasi multi-factor authentication untuk optimalisasi keamanan akses data. <em>Jurnal Manajemen Informatika (JAMIKA)</em>, 15(1), 85–97.<a href="https://doi.org/10.34010/jamika.v15i1.14190?utm_source=chatgpt.com"> </a><a href="https://doi.org/10.34010/jamika.v15i1.14190">https://doi.org/10.34010/jamika.v15i1.14190</a></p><p>Sahyudi, M., &amp; Susanto, E. R. (2025). Analisis implementasi sistem keamanan basis data berbasis role-based access control (RBAC) pada aplikasi enterprise resource planning. <em>SATESI (Jurnal Sains Teknologi dan Sistem Informasi)</em>, 5(1), 105–116.</p><p>Saito, Y., &amp; Shapiro, M. (2005). Optimistic replication. <em>ACM Computing Surveys</em>, 37(1), 42–81.</p><p>Swanson, M., Bowen, P., Phillips, A. W., Gallup, D., &amp; Lynes, D. (2010). C<em>ontingency planning guide for federal information systems </em>(NIST Special Publication 800–34 Rev. 1). National Institute of Standards and Technology.</p><p>Joint Task Force. (2020). <em>Security and privacy controls for information systems and organizations </em>(NIST Special Publication 800–53 Rev. 5). National Institute of Standards and Technology.</p><p>Narrative Goldmine. (2026, November 4). Write-ahead logging.<a href="https://narrativegoldmine.com/notes/pages/Write-Ahead-Logging?utm_source=chatgpt.com"> https://narrativegoldmine.com/notes/pages/Write-Ahead-Logging</a></p><p>Yasin, M., Sohail, K., Ahmad, I., &amp; Nazar, S. K. A. (2016). Data partitioning and fragments allocation in distributed database. <em>In Proceedings of the 2016 International Conference on Communication System and Network Technologies (CSNT)</em>. IEEE.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f814cb27aab5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>