syn
Published on

Syntaxia - The Ideation of a Pattern-Driven, Type-Safe Backend-as-a-Service (BaaS) Platform

Authors

Syntaxia, A pattern-driven, scalable, and typesafe Backend-as-a-Service (BaaS) platform.

We're thrilled to share the ideation journey behind Syntaxia, our innovative Backend-as-a-Service (BaaS) solution. Developed with a keen focus on pattern-driven design, type safety, scalability, and testability, Syntaxia is the product of forward-thinking and efficient problem-solving.

With Syntaxia, we want to explore possibilities for teams being able to streamline their processes from data storage, authentication, and real-time updates, to the construction of complex patterns like event-sourcing. Also to explore can we create something to elegantly express complex backends using a patterns-first approach.

Why are we building this?

The problem:

Building event-driven backends on existing BaaS platforms can be challenging. It requires the use of complex patterns such as event sourcing to create flexible, failsafe systems for event-driven applications to truly benefit from the event-driven architecture. The numerous moving parts involved in applying these patterns on current BaaS platforms can be difficult to manage and can quickly become overwhelming for developers, particularly when it comes to ensuring the proper functioning of the components connected by events. As a result, building sophisticated event-driven backends on top of existing BaaS platforms is currently a challenging task.

Here are some analyses for popular BaaS and Serverless platforms. In this discussion, we will focus on the assessment of Firebase and AWS Amplify, along with their ecosystems, due to their prominence in the market.

firebase

Firebase is an excellent BaaS platform and offers NoSQL real-time database, APIs, serverless functions, cloud storage, and authentication. It also stands out when it comes to security, user-friendly functions, and scalability for millions of transactions. Thousands of apps have been built on Firebase with the support of its robust client libraries – it really shines in many ways and for so many developers.

At the same time, many teams face difficulties with their codebases as complexity increases due to several factors [1][2]. Some of the challenges include it only supports NoSql. Some queries are extremely challenging and end up duplicating datasets in order to overcome them[3]. Firebase can become a challenge to manage in a large event-driven codebase due to a Lack of support for complex data relationships and isolated cloud functions, which can architectural complexity, and will eventually lead to a fragmented and difficult-to-maintain codebase.

The other alternative ➕

Aws Amplify is an elegant application framework, and a great gift to the Serverless community to build and deploy full-stack apps to the AWS Serverless cloud. Many are building and deploying great maintainable FaaS-based backends [4], particularly with the help of frameworks like Serverless[5], which helps to overcome the inherent difficulties with FaaS when it comes to the large codebase.

However, it's hard to call them ‘BaaS’ apps, they are more like custom-built backends but deployed on scalable cloud infrastructure. And It generally demands enormous technical skills and a deeper understanding of many sub-systems and practices, below are some of the practical challenges one might face while implementing event-driven backends using current frameworks and platforms.

amplify
  1. Complexity: Difficulty in identifying issues. If a problem arises, it can be challenging to locate the source of the issue due to the multiple areas that need to be checked. Debugging a single function in isolation can be difficult when it is part of a larger, distributed system.

  2. Event ordering: Debugging the order and timing of events in a distributed, event-driven system can be challenging, as events may be processed out of order or at different times.

  3. Mismatched schema: Debugging issues caused by mismatched schema between contracts, events, and configurations can be difficult, as it requires an understanding of the relationships between the different components.

The why?

I'm Murali Ganta, as a software engineer and experienced architect with a reasonable amount of experience in building real-time event-driven systems and low-code platforms. I have always enjoyed the benefits of event-driven development, such as scalability, efficiency, and real-time responsiveness, using tech stacks like Scala, Akka, Akka-persistence, Kafka, and more. However, my experiences also taught me about the difficulties in event ordering, debugging, type mismatch, and testing of event-driven backend systems. event-driven systems are not easy to build even with such great serverless platforms.

This led me to the realization that there should be an easier way to build sophisticated backends on top of BaaS platforms, to handle complexity in the heart of domains[6][7] without ending up building custom backends as complexity increases.

Building on this vision, a few months ago, I resigned from my previous position as co-founder and CTO where I led a team in developing a low-code platform. My aim was to create Syntaxia, a BaaS (Backend as a Service) platform designed by developers, for developers. With Syntaxia, particularly for MVP builders, we aim to make serverless development accessible and enable developers, including beginners, to handle complexity with ease.

Syntaxia: Exploring Bold Solutions, Unleashing Unconventional Ideas:

Imagine having an expert backend team skilled in building complex event-driven systems. They combine publishers, subscribers, and queues and apply patterns like event sourcing to create flexible, failsafe systems that enable elegant real-time data processing. They also patiently debug and tie all loose ends with thorough testing.

Also, a creative architect who provides an overarching visual view of all key components layered within your codebase.

What if we can build a solution that encapsulate all these fine skills and offer as a packaged Backend-as-a-service (BaaS) platform to build, deploy, and maintain your next-generation backends. Syntaxia raises the abstraction level, so you don't need to worry so much about the inner workings of complex patterns.

So that you no longer have to feel limited by current BaaS platforms in the market nor invest in expensive custom backends. Whether you're building an IoT platform, an e-commerce platform, a fintech system, or a real-time multiplayer game, Syntaxia can rapidly assist with any event-driven challenge.

By leveraging such platform, can development time be reduced and costs while improving the reliability and scalability of your applications. With such help, can you go to market faster without compromising on essential features.

How does it work?

While offering all the essential features such as user and role management, security, NoSQL databases, functions, scalability, and APIs; can below features be benificial to the community ? For e.g. combining powerful features like end-to-end type safety, static analysis, and assisted pattern-driven development approach. Let's take a look at those features.

static-analysis
fig: Static analysis module

A Static analysis module provides schema-driven type-safety for commands, events, states, and queries. It catches errors, offers IntelliSense, and enables visual examination of project components, making it easier to resolve issues. With its type-safety features, it minimizes schema mismatches and improves system quality, making it ideal for managing large codebases..



patterns
fig: Design patterns

How about Built-in support for various design patterns- To effectively leverage event-driven architecture, it's crucial to apply patterns like event-sourcing that process events seamlessly without side effects. With built-in support for design patterns such as Queues, Pub/Sub, and Event-Sourcing, What if we can simplify the use of complex patterns, making it effortless and safe to implement an event-driven architecture. Developers can build scalable, reliable, and efficient systems with And provide out-of-the-box support for these patterns, allowing developers to focus more on functional logic.

backend-visualized
fig: Backend visualized

The backend does not need to be a Blackbox, it can be beautifully visual. In a relative sense, unlike the front end, it is quite difficult to build mental models as it is not visual by its nature unless one creates diagrams and updates them continuously as the codebase changes. What if create layered architectural diagrams of the project as the project progresses. This makes The backend transparent with visual representations that subsequently improve context-based understanding, collaboration, debugging, and maintenance.


smart-query-builder
fig: Smart Query builder

What if create a Smart Query builder with a powerful visual query resolver construction for GraphQL that simplifies the process of combining data from different sources. With this tool, developers can easily create a unified view of data from NoSQL and relational databases, events and states, and real-time streams, enabling them to quickly build powerful applications that make use of data from a variety of sources. The customizable data integration feature unlocks the value of data and creates new opportunities for businesses.


Lastly, Generative AI powered project builder as Project Assistant- Project Assistant is to Syntaxia is like Co-pilot to VsCode. Works closely with the Static analysis module of Syntaxia, helps to improve development speed, and reduces errors and maintenance costs. It can also generate business components by giving prompts (e.g. “create eventsource aggregate for a shopping cart where AddItemsTocommand should return next possible products”).

The diagram illustrates the lifecycle of the 'event-sourcing' pattern and its implementation and usage on the Syntaxia platform.

syntaxia

fig: Conceptual overview of Syntaxia visual backend builder in context of event-sourcing pattren

Like most of BaaS platforms, The envisioned platform has to be also cloud-native Backend-as-a-Service (BaaS) platform that has to be designed to operate optimally in cloud environments. Like any cloud-native platform, it needs to be engineered and developed with a focus on key considerations, such as security, cost efficiency, scalability, and data sovereignty, to ensure that customers can use it with confidence and trust to develop and deploy cloud-based applications.

In summary, when completed, Syntaxia has the potential that can help developers to build and maintain complex backends enjoyable with its developer-friendly features.

Thank you for taking the time to read these ideas. We hope it was informative and enjoyable. If you're interested in staying updated, please sign up for our waitlist.

References:

Footnotes

  1. Is Serverless Just a Stopover for Event-Driven Architecture https://thenewstack.io/is-serverless-just-a-stopover-for-event-driven-architecture/

  2. Advantages and disadvantages of Function as a Service https://www.techtarget.com/searchitoperations/definition/function-as-a-service-FaaS

  3. When You Should and Shouldn’t Use Firebase https://osdb.io/firebase-pros-and-cons-when-you-should-and-shouldnt-use-firebase-osdb/

  4. What’s the big problem with having a large number of Lambda functions in your application https://serverlessfirst.com/many-lambda-functions/

  5. Serverless Framework https://www.serverless.com/framework/docs/tutorial

  6. Eventsourcing pattern, https://martinfowler.com/eaaDev/EventSourcing.html

  7. Domain-Driven Design: Tackling Complexity in the Heart of Software: https://www.oreilly.com/library/view/domain-driven-design-tackling/0321125215