Daemon Mode
Amorphic Framework for Server Side-only Applications
Background
This post is about a new feature we developed at Haven Life (called “daemon mode”) onto “Amorphic”, our existing framework. To fully understand this article, you should read our previous post on Amorphic here.
But to quickly review, the Amorphic Framework is an Isomorphic JavaScript framework that uses Node.js. Amorphic itself is an express-based web server that delegates requests to the framework’s three subcomponents including: SuperType, Semotus, and Persistor.
Daemon Mode
We’ve experienced a need for expanded framework functionality when developing our policy administration system, a server-side only application that requires a robust web API solution.
Amorphic currently allows developers to build complex applications quickly (see our previous post about Amorphic), but the types of technical problems we solve is rapidly expanding, and not every solution is “one size fits all”.
With that in mind, we developed an Amorphic feature called “daemon mode” which provides new flexibility for how we solve problems. Daemon mode opens up our internal server object for use by developers to add their own HTTP endpoints. We also expose a hook for adding custom middlewares to perform actions on each request; for example, logging or performance analysis.
In addition to adding flexibility, daemon mode adds familiarity. Developing server side APIs with custom endpoints is a well known pattern in web development. New hires, especially those joining us from REST API driven development, can contribute more quickly to the development of features with daemon mode. As we scale our platforms and our problem sets going into 2020 and beyond, flexibility is crucial, and daemon mode is a big step in the right direction.