How AWS Generates Polyglot Libraries Based on a Single TypeScript Codebase
Write libraries once in TypeScript and ship them for Python, Java, and Go. Learn the surprising architecture and hidden trade-offs behind the AWS Cloud Development Kit.
#1about 2 minutes
Why polyglot libraries are needed for microservices
Microservice architectures create a challenge by requiring cross-cutting concerns to be implemented across multiple programming languages.
#2about 3 minutes
Simplifying infrastructure as code with AWS CDK
The AWS Cloud Development Kit (CDK) provides a high-level abstraction over CloudFormation, allowing developers to define infrastructure using familiar programming languages.
#3about 1 minute
Maintaining feature parity across multiple languages
Supporting multiple languages like Python, Java, and Go in the AWS CDK required a solution to maintain feature parity without rewriting the library for each language.
#4about 2 minutes
Introducing JSii for building polyglot libraries
JSii is a toolchain that generates language-native bindings from a TypeScript codebase, allowing code in languages like Java or Python to interact with JavaScript classes.
#5about 4 minutes
Configuring a TypeScript project for JSii
A TypeScript project is configured for polyglot support by adding specific metadata and target language definitions to the package.json file.
#6about 5 minutes
Navigating language-specific binding challenges
JSii generates bindings for languages like Java, Python, and Go, but developers must handle non-idiomatic code patterns and language-specific constraints.
#7about 3 minutes
Understanding the JSii runtime execution model
JSii operates by running a Node.js child process alongside the host language's runtime, communicating between them by marshalling JSON objects over standard I/O.
#8about 4 minutes
Evaluating the pros, cons, and use cases of JSii
JSii excels at creating cross-language SDKs and tooling but introduces performance overhead and debugging complexity that must be considered.
Related jobs
Jobs that call for the skills explored in this talk.
Exploring TypeScript: Benefits for Large-Scale JavaScript ProjectsJavaScript is the backbone of web development, powering everything from small websites to large-scale enterprise applications. However, as projects grow in complexity, maintaining JavaScript code can become increasingly difficult. This is where TypeS...
Christina Schaireiter
Why Attend a Developer Event?Modern software engineering moves too fast for documentation alone. Attending a world-class event is about shifting from tactical execution to strategic leadership.
Skill Diversification: Break out of your specific tech stack to see how the industry...
Chris Heilmann
All the videos of Halfstack London 2024!Last month was Halfstack London, a conference about the web, JavaScript and half a dozen other things. We were there to deliver a talk, but also to record all the sessions and we're happy to share them with you. It took a bit as we had to wait for th...