Show HN: Streamdal – an open-source tail -f for your data
148 points| dsies | 2 years ago |github.com
Here's the repo: https://github.com/streamdal/streamdal
Here's the site: https://streamdal.com
And here's a live demo: https://demo.streamdal.com (github repo has an explanation of the demo)
— — —
THE PROBLEM
We built this because the current observability tooling is not able to provide real-time insight into the actual data that your software is reading or writing. Meaning that it takes longer to identify issues and longer to resolve them. That’s time, money, and customer satisfaction at stake.
Want to build something in-house? Prepare to deploy a team, spend months of development time, and tons of money bringing it to production. Then be ready to have engineers around to babysit your new monitoring tool instead of working on your product.
— — —
THE BASIC FLOW
So, wtf is a “tail -f for your data”. What we mean is this:
1. We give you an SDK for your language, a server, and a UI.
2. You instrument your code with `StreamdalSDK.Process(yourData)` anytime you read or write data in your app.
3. You deploy your app/service.
4. Go to the provided UI (or run the CLI app) and be able to peek into what your app is reading or writing, like with `tail -f`.
And that's basically it. There's a bunch more functionality in the project but we find this to be the most immediately useful part. Every developer we've shown this to has said "I wish I had this at my gig at $company" - and we feel exactly the same. We are devs and this is what we’ve always wanted, hundreds of times - a way to just quickly look at the data our software is producing in real-time, without having to jump through any hoops.
If you want to learn more about the "why" and the origin of this project - you can read about it here: https://streamdal.com/manifesto
— — —
HOW DOES IT WORK?
The SDK establishes a long-running session with the server (using gRPC) and "listens" for commands that are forwarded to it all the way from the UI -> server -> SDK.
The commands are things like: "show me the data that you are currently consuming", "apply these rules to all data that you produce", "inspect the schema for all data", and so on.
The SDK interprets the command and either executes Wasm-based rules against the data it's processing or if it's a `tail` request - it'll send the data to the server, which will forward it to the UI for display.
The SDK IS part of the critical path but it does not have a dependency on the server. If the server is gone, you won't be able to use the UI or send commands to the SDKs, but that's about it - the SDKs will continue to work and attempt to reconnect to the server behind the scenes.
— — —
TECHNICAL BITS
The project consists of a lot of "buzzwordy" tech: we use gRPC, grpc-Web, protobuf, redis, Wasm, Deno, ReactFlow, and probably a few other things.
The server is written in Go, all of the Wasm is Rust and the UI is Typescript. There are SDKs for Go, Python, and Node. We chose these languages for the SDKs because we've been working in them daily for the past 10+ years.
The reasons for the tech choices are explained in detail here: https://docs.streamdal.com/en/resources-support/open-source/
— — —
LAST PART
OK, that's it. What do you think? Is it useful? Can we answer anything?
- If you like what you're seeing, give our repo a star: https://github.com/streamdal/streamdal
- And If you really like what you're seeing, come talk to us on our discord: https://discord.gg/streamdal
Talk soon!
- Daniel & Ustin
tfsh|2 years ago
I've noticed you've provided Go, Python, and Node SDKs. What's the general tech stack for these? I assume your usage of Protobufs is for a consistent schemas between languages?
I ask because I'm curious as to how much work it is to define new SDKs for other languages, as I'd love a Java implementation - Ideally the SDK should be a pretty thin wrapper, simply calling the gRPC service with some minimal error handling, is this the case?
jacobheric|2 years ago
Thank you! I wrote the UI! It's a pretty tricky UI stack as we update everything to the browser realtime in protobuf over grpc streaming (using grpc-web and protobuf-ts). There is a lot mapping we have to do to shape the data properly for React Flow so we do that server side in Deno before passing it along to the browser. We still have some optimization to do to keep the live tail view zippy, but it's a pretty solid foundation.
dsies|2 years ago
Tldr: go, grpc, Protobuf, wasm, deno, reactflow, ts
And yep, you’re right - we are using protobuf to have a common schema between all SDKs, the server and UI.
Re: sdk implementation - it’s basically implementing grpc methods, knowing how to exec wasm and doing a couple of extra things at instantiation. In real terms - it took us about a week to implement the python SDK - that’s with learning how to do wasm, Protobuf and grpc in python + 1 week afterwards to iron out edge cases.
Re: Java - that was going to be the next sdk we do but we have no idea if it needs to be a specific Java version? Should we target lowest possible Java version? We need to have a solid wasm runtime support - so maybe that limits us to newer versions of Java. Is that a problem?
I did Java a looong time ago - so need some outside input at this point haha
caledhwa|2 years ago
dsies|2 years ago
smivan|2 years ago
I have been a long time customer of the enterprise version of Streamdal, and I can confidently say Daniel and Ustin are absolutely KILLER engineers. Any time we spoke I always was impressed by their super deep experience and understanding of modern challenges!
So good to see you getting some love on HN. Excited to implement this in some personal projects as well!
dsies|2 years ago
defanor|2 years ago
Those SDKs are simply libraries though, aren't they? "SDK" often stands for more than that (e.g., development tools, bits of code not properly packaged), and may be appalling if you don't want to wrap a project around such an SDK, as opposed to merely incorporating a library.
But then I wonder why it has to be a library at all, limited to just 3 languages: why not to implement a more unixy interface, perhaps with named pipes? And/or a library with C API (so that it can be called from any common language), providing file descriptors to write into. With the former approach, basic named pipes or files and actual tail -f can be used, too.
dsies|2 years ago
re: libs vs sdk - we named it that in anticipation of exactly having to do some funky stuff. As it stands, we are already doing grpc, Protobuf, wasm and having it all interop across all languages is not easy - so having to introduce some sort of a “helper” binding/lib is not at all unlikely.
Besides that, the “tail” part is really a small part of the functionality - the overall idea is that the sdk/lib has access to most/all I/O of the app and is able to interact with the payload that the caller provides before it is sent on its way.
Traditional pipes aren’t really in the equation.
We went with calling it “tail” because it’s easier to explain instead of “it’s a lib that an app owner can wrap their i/o calls with to enable calling dynamic wasm”… and that’s still not the whole thing haha
Last, here’s a diagram depicting the flow: https://docs.streamdal.com/_astro/StreamdalSdk.cd7c8d45.png
kensavage|2 years ago
jacobheric|2 years ago
bradbrewer|2 years ago
dsies|2 years ago
There is a server component (that you host) - but it is only used for pushing rules/Wasm down to the SDKs and for facilitating tail - that's it.
a1369209993|2 years ago
0: https://news.ycombinator.com/item?id=9224
dsies|2 years ago
I’d urge you to check out the live demo and “tail” an app at runtime - it might be able to explain what we we are doing better than I can.
sshine|2 years ago
tzumby|2 years ago
uzarubin|2 years ago
jtcap|2 years ago
jacobheric|2 years ago
However, we implemented the pipeline rules in wasm with the goal of keeping the overhead as minimal as possible. So you could also use it as more of a data security or governance tool and invoke the pipelines synchronously and mask or prevent sensitive data before passing it along.
pitah1|2 years ago
Could you use this for batch data jobs as well? I would imagine having integration with batch job frameworks like Spark would make this more valuable from an organisation perspective.
Also, small note on the website, as an example from the "What is streamdal" page, I feel like I'm bombarded with emojis, bold and italic text, links, etc.
dsies|2 years ago
And re: emojis - we’ll tone it down - we were all working hard on docs late into the night and may have gotten a little wild with emojis haha :)
unkrichk|2 years ago
unknown|2 years ago
[deleted]
tim--|2 years ago
uzarubin|2 years ago
ollybee|2 years ago
uzarubin|2 years ago
od0|2 years ago
iporollo|2 years ago
openquery|2 years ago
qwidjib0|2 years ago