Building a Sync Bridge

<p>Event-driven architecture (EDA) is a powerful way of building loosely coupled, performant, scalable apps on the web. It enables rich experiences like push notifications, collaborative editing and multiplayer, and other real-time interactions, and encourages modularity.</p> <p>But sometimes the model is inconsistent with what we as developers need to do. When two application layers can only communicate via asynchronous message passing, we can be forced to structure our code awkwardly. We can&rsquo;t collocate the&nbsp;<em>requesting</em>&nbsp;code with the&nbsp;<em>receiving</em>&nbsp;code, and are responsible for managing listeners or subscriptions ourselves.</p> <p>In this article, I&rsquo;ll demonstrate a general solution to adapt event-based APIs into convenient,&nbsp;<code>Promise</code>-based APIs that hide the complexity and boilerplate of message passing, and allow you to write linear code across application boundaries.</p> <p><a href="https://medium.com/better-programming/building-a-sync-bridge-ccbd9fd920b5"><strong>Read More</strong></a></p>
Tags: Building