zlacker

Windmill: Open-source developer platform to turn scripts into workflows and UIs

submitted by InitEn+(OP) on 2023-05-12 18:20:44 | 428 points 109 comments
[view article] [source] [go to bottom]

NOTE: showing posts with links only show all posts
2. mikepu+3f[view] [source] 2023-05-12 19:24:10
>>InitEn+(OP)
Thank you for this: https://github.com/windmill-labs/windmill#cli

My first questions with any new tool of this kind is immediately:

- Can I run/validate branch versions of the scripts non-destructively, for example as part of pre-merge checks in an IaC CD workflow?

- Can I run my scripts locally without a lot of drama, while developing?

If the answer to either of these questions is no, then the tool is the moral equivalent of directly editing PHP files on the prod machine, unless you're committed to deploying an entire second instance of the tool for staging/dev purposes.

9. thawab+vo[view] [source] 2023-05-12 20:06:19
>>InitEn+(OP)
The best part about windmill is the team behind it, join the discord server to see how fast they fix issues and add features. The blog is also top notch: https://www.windmill.dev/blog
16. rubenf+YB[view] [source] 2023-05-12 21:08:57
>>InitEn+(OP)
Hello, founder here. Thank you for submitting Windmill. We're really close from hitting v2 (adding multiplayer with yjs is our last milestone) and would have waited a bit before submitting but here we go.

We are fully open-source (AGPLv3) with just one ee plugin for syncing the cache of the workers at large scale (more on that below). You can deploy it on a small ec2 instance with our docker-compose or on very large clusters with our helm charts: https://docs.windmill.dev/docs/advanced/self_host

We are an onion of 3 layers, which are usually separated verticals and the closest services we replace in each vertical are: Lambda + n8n/temporal + Retool:

- Workers implemented in Rust that can run any scripts from source in python/typescript(deno)/go/bash. They are extremely efficient, with most typescript scripts being able to run in 40ms e2e. This can be seen as a self-hosted lambda except it works very differently. Lambdas spawn microvms using firecracker and launch http servers within those micro-vms. We run the scripts bare (with isolation using nsjail on our multi-tenant instance) but cache very aggressively the dependencies. For instance, in python we analyze the dependencies using the AST: https://github.com/windmill-labs/windmill/blob/main/backend/..., infer the dependencies from there, have them go through pip-compile to generate a lockfile (and cache the result), then create a pathset similar to how virtualenv behave with the version of each dependency locked. For typescript, we leverage the very well made immutable deno cache. The cache works well but if you scale your cluster to more than 10 workers, the likelihood of having your worker see dependencies for the first time increase, which is why we reimplemented a pip scheme backed by s3 that is extremely fast (we do not compress, just tar individual wheels and s3 is very fast on local networks). For all the supported languages, we parse the signatures of the main function to infer the corresponding json schema of the payload to trigger them, and from that jsonschema we can then generate automatically the UI and infer the input shape required in the flows for that particular step.

- A workflow engine re-implemented from scratch which can be seen as a distributed FSM and whose state is stored in postgresql and every transition done through postgres transactions. Every worker is picking a job and progressing the fsm at completion. The full spec is at: https://docs.windmill.dev/docs/openflow. We support branches, for loop, suspend/sleep, approval steps, sharing the same folder between steps and everything you would expect from a temporal like engine (retries, error handlers).

- A dashboard/app builder that is very similar to Retool but much faster because it's implemented in Svelte and which can also run python scripts directly leveraging the 1st layer. We also support full react apps: https://github.com/windmill-labs/windmill-react-template

We have a CLI that allows you to sync from github directly: https://github.com/windmill-labs/windmill-sync-example or your local filesystem. Our scripts are absolutely normal scripts so there is no lock-in, and they are executable locally https://docs.windmill.dev/docs/advanced/local_development so you do not have to use our webeditor if you do not want to but our editor supports pyright and deno lsp through our dedicated backend communicating to monaco using websockets.

We also support worker groups to run some jobs on hardware accelerated machines (GPU) and a lot of other features (oauth syncing of the resources, schedules, granular permissioning, groups and folders).

Every script/flow deployed has a dedicated webhook endpoint to run synchronously and asynchronously. Scripts are never overwritten, they keep a lineage of hash for each version and have per-hash dedicated webhook to ensure their behavior never change.

We also have a hub for sharing re-usable scripts https://hub.windmill.dev to be used in flows to have some of the same convenience you can find in Pipedream or Zapier.

Our closest alternative would be Airplane.dev, but they're not open-source, not self-hostable air-gapped, less performant, less-featured and much more expensive. You can self-host us fully free.

We are used in production at scale in clusters of 50 nodes+ and thanks to the reliability of Rust and Postgresql have had no downtime to report.

I'm a solo founder, YC S22. The MVP got some attention at the very beginning: https://news.ycombinator.com/item?id=31272793 but was very bare. Now we're ready to bring this to the next level and enable all engineers to spend more time building and less time reinventing the wheel thanks to it :)

◧◩
23. rubenf+GF[view] [source] [discussion] 2023-05-12 21:29:53
>>mikepu+3f
In opposite order

2) yes, https://docs.windmill.dev/docs/advanced/local_development

1) since you can run them locally, you can also run tests as part of your CI. You can also deploy a full windmill as part of your CI, deploy to that local instance, run some e2e tests by calling the webhooks, and then only deploy once those work.

Note that we have a full drafting system baked in into the webeditor as well: https://docs.windmill.dev/docs/core_concepts/draft_and_deplo... and have support for folders with different permissions and you can create workspaces so you may implement dev/staging/prod in any fashion you like (different folder, workspace, instances)

◧◩
38. EMIREL+BP[view] [source] [discussion] 2023-05-12 22:25:39
>>rubenf+YB
Your product sounds extremely great! I'm hooked!

One nitpick: In my humble opinon, you should switch from Discord chat to Zulip.

It's completely open-source (Apache 2, self-hostable, free full cloud plan for open-source projects) and has an excellent threads-first (called "topics" model): https://zulip.com/why-zulip/

It can run fully in the browser, but it has desktop and mobile clients as well.

It also supports public channels which AFAIK discord doesn't. So you can link to specific messages inside a GitHub issue and anyone who doesn't even have an account can see the relevant messages and context.

Interestingly it's what the Rust language team (and community) uses for comms: https://rust-lang.zulipchat.com

(I'm not affiliated in any way with Zulip btw, I just love the product)

◧◩
41. pas+yR[view] [source] [discussion] 2023-05-12 22:36:27
>>ropela+NQ
this is targeting the "low-code" audience, like https://n8n.io
42. 1000th+AR[view] [source] 2023-05-12 22:37:09
>>InitEn+(OP)
How does this compare to Ansible, and AWX?

https://github.com/ansible/awx

◧◩
44. rubenf+3S[view] [source] [discussion] 2023-05-12 22:39:37
>>ropela+NQ
It's similar to airflow/prefect/dragster in that it can run workflows, and those workflows can do ETL and ops and can run arbitrary code.

It's different in those fashions. Windmill can run python but also typescript, go and bash. Airflow/Prefect etc uses code annotation which mean the code is actually specific to the platform. We actually have the steps be directly scripts/code with a main function, and then have a low-code builder to compose them into powerful workflows. That low-code builder produces a yaml like that one: https://github.com/windmill-labs/windmill-sync-example/blob/... which you could theoretically write by hand.

The low-code builder is intuitive and similar to n8n except it has the feature-set of the above framework. It's easy to test the individual steps or to test the whole flow. The workflow engine is very efficient and running 50 steps will essentially have about 1s overhead total, and the steps are executed bare so it will take as much time as if you were running them without windmill on your node directly. They can be hardware accelerated easily in that fashion. We also support some features borrowed from temporal like the ability to suspend at no-cost flows until they are resumed by an external event such as an approval from slack.

◧◩
45. rubenf+AS[view] [source] [discussion] 2023-05-12 22:43:08
>>SPasca+IR
Passing information between steps is a pain in Airflow (https://docs.astronomer.io/learn/airflow-passing-data-betwee...) whereas it's quite trivial in windmill, the performances/latency is better, and it supports typescript. Overall, the biggest improvement is the support for typescript/go/bash and the low-code builder that will allow you to build extremely complex flows that would be hard to visualize with just code annotations but with exactly the same featureset and more (retries, error handlers, suspend/sleep). We also make it really easy to test individual steps and the whole flow since web apps allow you to build advanced UX fit for big graphs. But Airflow is a great framework that we took a lot of inspiration from.
55. metada+3a1[view] [source] 2023-05-13 01:29:27
>>InitEn+(OP)
This looks cool as a concept, but I've already got script-server [0] and it works pretty great as a no/low code solution for UI-ifying shell scripts.

What does windmill do that script-server can't? Or is windmill targeting a completely different area, and is thus irrelevant to me and my pile of 500+ python, shell, Golang, and java bin dir.

https://github.com/bugy/script-server

◧◩
58. morgan+6f1[view] [source] [discussion] 2023-05-13 02:25:27
>>rubenf+YB
Hey Ruben! The product looks pretty interesting and I love the underlying technical choices.

One suggestion: I think you could do improve the docs by (a) providing a direct comparison to Airplane and (b) providing more code-oriented documentation.

Most of you docs highlight the web editor which, frankly, I have little interest in. I want to write my scripts and views in my IDE and store them in GitHub. This is something Airplane really nails: their docs are clearly about how to use this as a developer. Compare your flows quick start [0] with their tasks quick start [1] and it really feels like Airplane is more suited to a developer audience. I'm worried I will be locked into static control flow with yours, whereas Airplane makes it clear I can do ~any code I want, as long as it runs in Temporal.

Of course, totally fair if you are trying to target more no-code use cases.

[0]: https://docs.windmill.dev/docs/getting_started/flows_quickst... [1]: https://docs.airplane.dev/getting-started/orchestration

◧◩◪◨
61. abathu+ek1[view] [source] [discussion] 2023-05-13 03:26:05
>>rubenf+KQ
https://oilshell.zulipchat.com/ is a good ~applied-zulip example in OSS.
◧◩◪
65. rubenf+Tr1[view] [source] [discussion] 2023-05-13 04:51:31
>>morgan+6f1
You're absolutely right. We're pretty weak in docs for developers that only want to use the CLI and the reason why I wanted to wait for the V2 is that we wanted to do a full cycle on showing the potential of the CLI for local dev and airplane-like kind of development.

For the temporal thing, that's absolutely fair and completely understand the worry but since most workflows are about the steps and not the glue between them, you will be able to reuse most of your code. However, temporal is quite an heavy format for writing workflows so of course it will still be a bit of work.

Our views support our retool like builder but also full react apps, or svelte, or vue, or anything that can compile to an iife. The example provided above can be iterated on with just a simple 'npm run dev': https://github.com/windmill-labs/windmill-react-template

71. irf1+FG1[view] [source] 2023-05-13 08:10:06
>>InitEn+(OP)
in this interview Ruben, the founder of Windmill, talks about his background, shares how the project got started (bootstrapped solo founder, went through YC last summer) and encourages more software engineers to start their own companies

interview highlights (4min): https://www.youtube.com/watch?v=_jsl0k7LX34

full interview (33min): https://www.youtube.com/watch?v=rPLVwFRjw7o

◧◩
74. rubenf+yJ1[view] [source] [discussion] 2023-05-13 08:54:51
>>stavro+dJ1
1. Yes there are no time limits for workflows and there is no cost to keep a workflow suspended. It will just be scheduled to be reactivated in the future

2. The webhook can contain a payload, and you can but the suspend step into a for-loop. You could literally say, for-loop forever the suspend until the result of the suspend step (which can be the result of the evaluation of the webhook payload by your rule is true). For that, you will need to use another primitive that we expose which is "Break" that will break out of the for-loop

3. I'm a bit unsure of the term synchronous call. We have a long list of APIs https://app.windmill.dev/openapi.html#/ and you fetch the status of the flow or trigger a flow in a synchronous http webhook to wait for the result. As to force the state of the workflow. We do not expose something like that but it could be added easily.

Happy to chat if we could be a good fit for your needs: ruben@windmill.dev

◧◩
78. rubenf+hL1[view] [source] [discussion] 2023-05-13 09:26:20
>>foreig+7L1
Yes: https://github.com/windmill-labs/windmill-sync-example
◧◩◪
79. rubenf+sL1[view] [source] [discussion] 2023-05-13 09:27:49
>>revski+AY
Yes, you can do both. We actually have a guide about keycloak: https://docs.windmill.dev/docs/misc/setup_oauth#keycloak

For the second part, you can just iframe the whole public app and we will provide a React component soon.

◧◩
80. sisve+zL1[view] [source] [discussion] 2023-05-13 09:29:35
>>foreig+7L1
yes you can sync the scripts, the json for the flows and the app UI. Including variables, secrets, resource types etc.

See https://github.com/windmill-labs/windmill-sync-example

it should be trivial to push that to a self-hosted setup if you need it.

I have not tried to take my entire workspace from self-hosted to cloud. But I have been exporting and importing individual scripts/flows/apps from self-hosted to cloud.

(no affiliation, just a happy user)

84. debars+NQ1[view] [source] 2023-05-13 10:52:06
>>InitEn+(OP)
I have been following this space for really long time. I think closest competitor is Airplane.dev [1]. One of the most difficult thing to sell as a sales person is to sell an open ended workflow and UI engine and ask me to segment and prospect customers. It is not that you cant sell it, it is just too broad even for your customers to figure out a usecase, because theres always a specific tool to solve the usecase. For instance, stripe refund is one most common usecase posted by all of these platform, but there are actual tools that just does stripe refund and they solve it in depth. You can argue these tools are value for money but then if it involves build time, in long run it becomes expensive. Retool is actually captured the market really well. It is basically become the verb in the internal tool market, it is hard to compete with that even as an opensource project.

[1] https://airplane.dev

◧◩◪◨
92. fulafe+KV1[view] [source] [discussion] 2023-05-13 11:55:57
>>xrd+zU1
(Not op)

https://docs.windmill.dev/docs/core_concepts/webhooks#trigge... seems to cover a hello world for hooks.

◧◩
100. rubenf+Qg2[view] [source] [discussion] 2023-05-13 14:36:10
>>radiow+Z92
We have worker groups that would allow you to do exactly this: https://docs.windmill.dev/docs/core_concepts/worker_groups

And you would do exactly what you suggest in the last paragraph

◧◩◪◨
105. alfonm+E53[view] [source] [discussion] 2023-05-13 19:41:21
>>rubenf+KQ
Discourse[0] is a perfect fit for Windmill, IMO. Maybe I'm biased because I don't like Discord for this kind of project. Let the search engines leverage your project.

[0] https://www.discourse.org

106. onetom+DJ3[view] [source] 2023-05-14 01:19:41
>>InitEn+(OP)
https://babashka.org/ would be great to support.

or maybe just the Small Clojure Interpreter: https://github.com/babashka/SCI if it's a requirement for proper sandboxing

[go to top]