Get the latest tech news
Show HN: Moose – OSS framework to build analytical back ends with ClickHouse
-i <(curl -fsSL https://fiveonefour.com/install.sh) moose What is Moose? Moose lets you develop analytical backends in pure TypeScript or Python code like this: import { Key, OlapTable, Stream, IngestApi, ConsumptionApi } from "@514labs/moose-lib"; interface DataModel { primaryKey: Key<string>; name: string; } // Create a ClickHouse table export const clickhouseTable = new OlapTable<DataModel>("TableName"); // Create a Redpanda streaming topic export const redpandaTopic = new Stream<DataModel>("TopicName", { destination: clickhouseTable, }); // Create an ingest API endpoint export const ingestApi = new IngestApi<DataModel>("post-api-route", { destination: redpandaTopic, }); // Create consumption API endpoint interface QueryParams { limit?: number; } export const consumptionApi = new ConsumptionApi<QueryParams, DataModel>("get-api-route", { async handler({limit = 10}: QueryParams, {client, sql}): { const result = await client.query.execute(sql`SELECT * FROM ${clickhouseTable} LIMIT ${limit}`); return await result.json(); } }); Core Capabilities Type-Safe Data Models Streaming & Batch Ingestion Real-Time Stream Processing In-Database Transformations Analytics APIs Script Orchestration Why Moose Exists Building Analytical Backends With Today's Tooling is Slow Tool fragmentation More time spent integrating Kafka, ClickHouse, Postgres, dbt, Airflow, and a dozen other services instead of building your actual application Schema drift everywhere Your TypeScript or Python models, database schemas, API validation, and message formats all diverge over time Painful development workflow No local testing, long deployment cycles, and constant context switching SQL-only processing Having to use SQL for everything when you'd rather use languages you're already comfortable with The DIY Approach What if you need to add a simple string field to your data model? Update your TS/Python Code Model Update your Database Schema Update your Kafka Topic Update your Runtime Validation Update your transformations & queries Can you see the problem? This process repeats for every change. You also have to test that everything is working together in a safe, isolated dev environment, which is even more painful with so many moving parts.
Tool fragmentation More time spent integrating Kafka, ClickHouse, Postgres, dbt, Airflow, and a dozen other services instead of building your actual application Painful development workflow No local testing, long deployment cycles, and constant context switching Moose is ideal for a wide range of data-intensive applications, from real-time analytics to complex data pipelines:
Or read this on Hacker News