DEV Community

tq-bit
tq-bit

Posted on • Edited on

Question: Webhooks in a Node-Express app

Hello guys,

I have recently found out about webhooks and was curious if they are viable for microservice composition over http.

In a nutshell, the full requirement is to transition from a monolithic application structure into a modular one. Each microservice is responsible for its own state, but some of the underlying databases share i/o dependencies.

My initial idea was to extend the builtin EventEmitter module with controller classes which, upon successful execution of the business logic, emit the calculated result. 'Elsewhere' within the same project, this event could be caught and its payload would be sent to a related API endpoint with an http request.

What are your thoughts? Have you ever implemented such a use case? How did you plan it out? What problems did you face?

SurveyJS custom survey software

Build Your Own Forms without Manual Coding

SurveyJS UI libraries let you build a JSON-based form management system that integrates with any backend, giving you full control over your data with no user limits. Includes support for custom question types, skip logic, an integrated CSS editor, PDF export, real-time analytics, and more.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs