The Essence of Godspeed Abstractions: A Deep Dive with Mohit and Ayush

The sun was rising in Dubai, and as Mohit and Ayush sat on the porch sipping their morning tea, a deep conversation about microservices and Godspeed emerged. This was a beautiful morning just before the Gitex, North Star 2023 event.

Mohit: “So, Ayush, why is Godspeed special? Why do abstractions matter so much?”

Ayush: “Godspeed offers three primary abstractions related to the core pillars of any microservice.”- event sources, workflows, and data sources. Event sources trigger workflows, and workflows access data sources. The beauty is in the simplicity and standardisation."

Mohit: “Okay, let’s delve deeper into the first abstraction. What about these plugin-based event sources?”

Ayush: “Event sources in Godspeed are modular. We have plugins for different types of sources like HTTP, Kafka, Socket, and Cron. Instead of dealing with these separately, Godspeed provides a unified method to integrate them. Plus, there’s a consistent way to define event schemas, emphasizing schema-driven development.”

Mohit: “That sounds efficient. Can you tell me more about what an event schema consists of?”

Ayush: “Certainly. First, it has validation for both input and output of every event, grounded on the swagger spec. This defines the acceptable input and potential responses. Second, we ensure authorization for every event call. This can be JWT, role-based, or attribute-based. Finally, we dictate which workflow gets triggered. And guess what? All of these can be laid out using a simple YAML DSL we’ve developed where only the first line of the event schema changes across different types of event sources.”

Mohit: “So, if we don’t adopt these abstractions, what’s the challenge for developers?”

Ayush: “Without these abstractions, developers have to wire every component manually. Different event sources have unique quirks. This increases implementation effort, chances of errors, and leads to more code coupling.”

Mohit: “Ah, coupling. Tell me more about its consequences.”

Ayush: “Coupling refers to how intertwined different code segments are. In the context of microservices, if your event source and workflow are tightly connected, it’s a nightmare to modify or replace one without affecting the other. Let’s say you want to switch from Express to Fastify in Node.js. If they’re coupled, the Express API like the request and response object has percolated inside your workflows, you’ll spend significant time and resources on that transition.”

Mohit: “I get the idea. And this friction you mentioned between the teams, what’s that about?”

Ayush: “Friction arises when teams aren’t working with a consistent blueprint or ‘contract’ or single source of truth. In the absence of schema-driven development one team might change an API implementation without notifying the others. This leads to bugs, miscommunication, back and forth, meetings, rework and project delays.”

Mohit: “So, in essence, Godspeed enforces a contract-based approach to development?”

Ayush: "Exactly. We champion schema-driven development."First, define your DB Model API contract or schema. From there, everything flows smoothly. Godspeed even auto-generates crud api, Swagger specs and Postman collections and React app with store. Plus, if any deviation from the schema occurs in a request or even the microservice response, Godspeed flags it. Godspeed enforces that if you have changed your response, for example, of an API, but you have not updated the schema, your microservice itself will fail in that API call. It will return an 500 internal server error saying response is not as defined in the API spec. The same validations occur when you call an external API from this microservice. Hence all the input and output from microservices is guarded by schema driven development.

Mohit: “This sounds revolutionary. It’s about making development more efficient, reducing errors, and ensuring teams are on the same page.”

Ayush: “That’s the goal. With Godspeed,we provide the guardrails to keep projects on track and teams aligned.”

As the day deepened, Mohit and Ayush delved into numerous other tech topics, but the essence of Godspeed remained a highlight. It’s not just about the tech; it’s about ensuring harmony in development and fostering collaboration.