Live data from Hacker News

Ask HN: What is the safest way to replicate Repl.it like sites?

news.ycombinator.com

11–14 of 14 posts

Re: Ask HN: What is the safest way to replicate Repl.it like sites?

#11
post #9

This post from fly.io [1] has a pretty comprehensive survey of the tech available for running users' code safely. It's a good read. I've been investigating something similar for a feature I want to launch. I'm currently leaning towards running users' code in Kubernetes using Firecracker or gVisor. My main takeaway has been that while there are good solutions for isolating users' code, there's going to be a lot of wor…

An operator might be overkill.

I used a K8S cluster to run untrusted code. User code was executed inside of a container running as a job, rather than a naked pod or deployment. To monitor/track/handle abuse, I used a sidecar container running alongside the user's container.

The real challenge around running user's code isn't running code, per se. Instead, it is storage! I was never able to come up with a good solution for allowing users to create a very large number of files, such as the number of files created by creating a React app.

Re: Ask HN: What is the safest way to replicate Repl.it like sites?

#12
I think the killer product would be one which runs a bunch of languages in a browser thru WASM, see Python[0] for start - no need for server side infra and cost, no shared env thus less security worries, unlimited user scalability etc.

[0] https://github.com/pyodide/pyodide

Re: Ask HN: What is the safest way to replicate Repl.it like sites?

#13
We built https://iko.ai, a machine learning platform, to speed up our work as a boutique machine learning consultancy.

It offers live collaboration on notebooks, scheduled long-running GPU notebooks that you can watch live while they run even when closing the browser, automatic experiment tracking for notebooks, parameters, and models, plus one click model deployment and a live dashboard to monitor models.

We use containers and Kubernetes (we have executors for Docker and Kubernetes). We currently run things on our GCP cluster, but are working to use users' clusters in a "bring your own cluster" setting, so users can choose the specs and use their billing.

Re: Ask HN: What is the safest way to replicate Repl.it like sites?

#14
post #4

Earlier quoted context omitted.

No I hadn't, I had looked at Amazon's Firecracker (used for Lambda) and some of the early work Shopify has been doing to run untrusted code by using web assembly.[2] Thank you for the tip on Piston! [1] https://aws.amazon.com/blogs/aws/firecracker-lightweight-virtualization-for-serverless-computing/ [2] https://shopify.engineering/shopify-webassembly

let me know how it works out for you

Hey @firefly284,

Just letting you know that Piston worked great once I worked out how to enable outbound networking (a requirement for my system).

Thanks for pointing me in the direction of Piston!

Post reply on HN