Meet TyX, a TypeScript-based serverless backend framework designed for deployment into AWS Lambda
Leverage TypeScript support for object-oriented programming with TyX core framework. TyX gives developers the support and structure they need to rapidly deploy serverless frameworks as Lambda functions.
Looking for a way to utilize serverless frameworks for your backend? Written in TypeScript, TyX core framework is a serverless backend designed for deployment into AWS Lambda. Writing and structuring application components into Lambda functions is easier than ever with TyX!
TyX uses decorators extensively while simultaneously minimizing inheritance from base classes. Services are abstracted, with containers handling a number of responsibilities for HTTP events and responsibilities.
Built with Serverless Framework in mind, TyX provides rapid deployment into production. However, there’s no direct dependency on Serverless Framework; developers can choose whichever deployment tool best suits their needs.
TyX architectural features
Here are the basic building blocks to the core framework:
- Serverless environment
TyX provides developers with the opportunity to utilize the AWS Service Platform with its Lambda functions. Lambda functions are subject to limitations on both memory and allowed execution time. They’re also inherently stateless. Additionally, AWS Lambda can create, destroy, or reuse instances of Lambda functions if it needs to manage traffic demands for higher performance.
The TyX framework isn’t meant to protect developers from the challenges of serverless architecture or the limitations of the execution environment. It’s meant to provide rapid deployment.
Services are the foundation for TyX core framework’s application backend. Together with dependency injections, they provide structured and flexible code organization. This framework is relatively agnostic as for styles or paradigms. However, it does favor named services with dependency injection over the direct import of modules.
Events kick off the execution of a Lambda function. The TyX core framework supports the standard HTTP events and follows the ApiGateway path syntax. Event bindings for S3, DynamoDB and Kinesis Stream events are still in the experimental stages.
Containers work as both as a service registry and dependency injector. They provide the entry point for the Lambda function.
Proxies are helpful in case of integration between two applications. TyX uses a RMI-like communication.
Want to try out this TypeScript framework? It’s freely available on through a npm module:
npm install tyx --save
reflect-metadata shim is required. More information about TyX is available here, along with an in-depth exploration of the framework’s concepts, data structures, and more.