Infrastructure and application code are, traditionally, written and deployed separately – even when they represent a single concern.
With Notation, the compiler reads your application code, detects the cloud services you need, and generates a ready-to-deploy cloud architecture.
import { lambda } from "@notation/aws";
import twilio from "twilio";
const client = twilio();
export const SendSms = lambda(async () => {
await client.messages.create({
body: "Hello world",
to: "+12345678901",
from: "+12345678901",
});
});
SendSms.config({
arch: "arm",
memory: 64,
timeout: "5s",
});
The presence of an exported
lambda()
indicates to the compiler that all executable code in this module is to be built and packaged for AWS lambda.
Connecting cloud services should be simple. In reality, it requires developers to set up everything from network security groups to role-based policy attachments.
Notation's compiler automatically infers implicit dependencies, and configures them with appropriate permissions.
import { lambda, apiGateway } from "@notation/aws";
import twilio from "twilio";
const client = twilio();
export const SendSms = lambda(async () => {
await client.messages.create({
// ...
});
});
const api = apiGateway();
export const PostMessage = api.route({
method: "POST",
route: "/message",
handler: SendSms,
});
The compiler applies the principle of least privilege and generates only the necessary permissions and rules.
Writing software that spans different machines and services can be challenging. Contracts need to be enforced to ensure compatibility across network boundaries.
Notation unifies cloud services into a single type space. That means, if you introduce a change that breaks another service's contract, the compiler will alert you immediately.
import { lambda, apiGateway } from "@notation/aws";
import z from "zod";
const schema = z.object({
to: z.string(),
from: z.string(),
message: z.string(),
});
type Schema = z.infer<typeof schema>;
export const SendSms = lambda<Schema>(async (props) => {
await client.messages.create({
to: props.to,
from: props.from,
message: props.message,
});
});
const api = apiGateway();
export const PostMessage = api.route({
method: "POST",
route: "/message",
handler: SendSms,
request: { schema },
});
Notation provides a first-class API for composing Turing-complete serverless workflows, and a high performance runtime for orchestrating them.
Build anything, from data and analytics pipelines, to AI-powered integrations, to automations that keep your organisation compliant with GDPR.
import { workflow } from "@notation/aws";
import { GetUsers } from "../functions/get-users.ts";
import { SendSms } from "../functions/send-sms.ts";
export default workflow(() => {
const users = GetUsers();
users.batch({ size: 100 }, (user) => {
SendSms(user);
});
});
The workflow code is compiled into a static definition that describes how the referenced services should be executed, and how data flows through the workflow.
Notation will be released as an open source project. Our goal is to increase access to cloud development, and to empower developers to be more innovative.
Sign up now to get early access and be notified when we launch.