Hero image

Go Serverless with Hantera's Reactors

Published on 
, by Kristoffer

Over the past year, while working on Hantera and introducing core Actors and Rules, one piece was missing. While Actors and Rules enable custom interactions within Hantera, there’s little way to reach out and communicate with external systems. Hantera is about making your business data useful. If it can’t share that data, it’s about as useful as a black hole - cool but not something you’d want to be near.

The idea of extending Actors and implementing custom logic beyond the scope of an Actor Rule event has been an unsolved mystery at our office (our Discord server - come hang out with us). In simple terms, Rules can only access Actors during evaluation, and effects are limited to the Actor scope. While this enables Hantera’s powerful message preview feature, it’s limiting when you want to integrate with external systems.

Imagine having a Rule that decides when an order should be processed in your warehouse. What good is that if there’s no way to notify the warehouse about it? This is where Reactors come in.

Introducing Reactors

Reactors are a new resource type in Hantera, designed specifically for this situation. They operate independently of Actors and can be called externally via our API or internally by Rules. This makes Reactors the perfect bridge between your internal Hantera world and external systems.

Think of Reactors as powerful, flexible functions that can perform any logic and have far-reaching effects. In fact, they’re so versatile, you can use them as a simple serverless platform. Developers, check out our cookbook to set up a Reactor for sending emails.

In this first release, we focus on performing HTTP calls. But expect more advanced effects coming soon - I can’t wait to share what we’re working on!

For detailed information about how to create Reactors, the runtime in which they run, and authorization - check out the Developer Documentation.