Languages and Frameworks Thoughtworks Technology Radar 86. npm workspaces Assess While many tools support multipackage development in the node.js world, npm 7 adds direct support with the addition of npm workspaces. Managing related packages together facilitates development, allowing you, for example, to store multiple related libraries in a single repo. With npm workspaces, once you add a configuration in a top-level package.json file to refer to one or more nested package. json files, commands like npm install work across multiple packages, symlinking the dependent source packages into the root node_modules directory. Other npm commands are also now workspace aware, allowing you, for example, to execute npm run and npm test commands across multiple packages with a single command. Having that flexibility out of the box decreases the need for some teams to reach for another package manager. 87. Remix Assess We witnessed the migration from server-side rendering website to single-page application in the browser, now the pendulum of web development seems to swing back to the middle. Remix is one such example. It’s a full-stack JavaScript framework. It provides fast page loads by leveraging distributed systems and native browsers instead of clumsy static builds. It has made some optimizations on nested routing and page loading, which makes page rendering seem especially fast. Many people will compare Remix with Next.js, which is similarly positioned. We’re glad to see such frameworks cleverly combining the browser run time with the server run time to provide a better user experience. 88. ShedLock Assess Executing a scheduled task once and only once in a cluster of distributed processors is a relatively common requirement. For example, the situation might arise when ingesting a batch of data, sending a notification or performing some regular cleanup activity. But this is a notoriously difficult problem. How does a group of processes cooperate reliably over laggy and less reliable networks? Some kind of locking mechanism is required to coordinate actions across the cluster. Fortunately, a variety of distributed stores can implement a lock. Systems like ZooKeeper and Consul as well as databases such as DynamoDB or Couchbase have the necessary underlying mechanisms to manage consensus across the cluster. ShedLock is a small library for taking advantage of these providers in your own Java code, if you’re looking to implement your own scheduled tasks. It provides an API for acquiring and releasing locks as well as connectors to a wide variety of lock providers. If you’re writing your own distributed tasks but don’t want to take on the complexity of an entire orchestration platform like Kubernetes, ShedLock is worth a look. 89. SpiceDB Assess SpiceDB is a database system, inspired by Google’s Zanzibar, for managing application permissions. With SpiceDB, you create a schema to model the permissions requirements and use the client library to apply the schema to one of the supported databases, insert data and query to efficiently answer questions like “Does this user have access to this resource?” or even the inverse “What are all the resources this user has access to?” We usually advocate separating the authorization policies from code, but SpiceDB takes it a step further by separating data from the policy and storing it as a graph to efficiently answer authorization queries. Because of this separation, you have to ensure © Thoughtworks, Inc. All Rights Reserved. 37
Vol 26 | Technology Radar Page 36 Page 38