5 ms·
Craig here from Crunchy. Pretty excited to ship this. It started with one of our engineers showing up in slack 6 weeks ago "So I did something crazy over the we
by craigkerstiens 4y ago
Craig here from Crunchy. Pretty excited to ship this. It started with one of our engineers showing up in slack 6 weeks ago "So I did something crazy over the weekend..." from there it evolved into much more.
The post explains a lot of the high level, but we're going to being doing some deeper dives as well including the build process, but also some of how the tutorials are powered by an internal notion doc which allows us to easily iterate and collaborate on the tutorials themselves.
Perhaps our favorite easter egg is that you can bring your own SQL into it for example: https://www.crunchydata.com/developers/playground?sql=https://gist.githubusercontent.com/eccentric-j/11cce77331a82bcab52563d1f63a9c46/raw/create-births-table.sql https://www.crunchydata.com/developers/playground?sql=https:...
- xfalcox 4y ago> Perhaps our favorite easter egg is that you can bring your own SQL into it for example That is super awesome! I plan to use it to allow people to peruse our table structure easily.
- motleydev 4y agoThat's a heck of an easter egg. It's like the TS playground feature, letting people explore exactly what you mean with a bug, etc. Kudos.
- tofuahdude 4y agoPretty cool project!
- Mo3 4y agoThis is a really cool tool. Nice work
- thesausageking 4y agoThis is awesome. Can you talk about how was it implemented? Is it actually a port of the postgres code that's been compiled to WASM?
- craigkerstiens 4y agoThis is definitely our plan, we've got some follow on posts that go into much more detail on how we built it so stay tuned for those.
- ZitchDog 4y agoWould love to see this! I could see a wasm version of postgres being useful for all sorts of things, especially an easy dev instance of pg runing inside a node app.
- starik36 4y agoYour scientists were so preoccupied with whether they could, they didn’t stop to think if they should. Great job!
- xfalcox 4y agoBroke it trying to load our db schema at https://www.crunchydata.com/developers/playground?sql=https://gist.githubusercontent.com/xfalcox/d24639b6e884b9db70f2342a73d03b88/raw/d95959e7540b49bfba57993b269a6e46470f4074/discourse_db_dump.sql https://www.crunchydata.com/developers/playground?sql=https:... Any ideas?
- craigkerstiens 4y agoMaybe give it another shot or two, it's definitely a slow process to import. We have some improvements coming there in time but it's ideal at moment for smaller schemas and datasets.
- capableweb 4y agoYou definitely seem to have some issues with memory usage, crashes my tab when trying to load that link on a device with low amount of memory (4GB).
- treeman79 4y agoMaybe a per tab memory limit. Step 11 talks about increasing memory. https://www.guidingtech.com/fix-google-chrome-out-of-memory-error-windows-10/ https://www.guidingtech.com/fix-google-chrome-out-of-memory-...
- data-leon 4y agoVery cool, I work on https://sqlpad.io https://sqlpad.io which allows people to practice sql coding interview questions online. Do you provide 3rd party hosting? Might consider replacing ours to something more flexible like yours in the future.
- craigkerstiens 4y agoFeel free to drop me a note craig.kerstiens at crunchydata and happy to have a conversation to see what options may exist.
- MuffinFlavored 4y agoWhat were the hardest parts of getting it to compile for WASM?
- stuaxo 4y agoThis is great, I can't wait for someone to get python in the browser talking to postgres in the browser (and hopefully very soon afterward Django in the browser).
- nerpderp82 4y agoYou are going to need K8S in there to manage all the complexity.
- codethief 4y agoAnd Docker in between to properly isolate processes and dependencies.
- FpUser 4y agoI agree. Those damn computers are becoming too fast. It is time to to slow'em down proper so we can pay more for a hardware.
- 2Gkashmiri 4y agoBring back the turbo button
- EgoIncarnate 4y agoMaybe I missed it, but is the licensing info available anywhere? The playground seems to be using v86.js I don't see the required "Redistributions in binary form must reproduce the above copyright notice" -- https://github.com/copy/v86/blob/master/LICENSE https://github.com/copy/v86/blob/master/LICENSE
- gigel82 4y agov86 is an interesting choice, I wonder why they couldn't compile Postgres itself with Emscripten (AFAIK it's all C code).
- rockwotj 4y agoI'm assuming there are too many details like syscalls and file system specific APIs that they needed a lower level virtualization?
- craigkerstiens 4y agoLate to this, hadn't noticed until now. We have the license included and linked from from inside the VM as it starts up.
- titzer 4y agoThis is great. Have you done any benchmarking? I am currently looking to find/create good Wasm benchmarks, and it seems like this might be a good workload.
- staplung 4y ago> Perhaps our favorite easter egg is that you can bring your own SQL into it This is very cool but I wouldn't call it an easter egg, I'd just call it a feature!
- apatheticonion 4y agoAny chance you can give us access to the PSQL sandbox without it being attached to a tutorial. Would both be a great way to learn and also function as a productivity tool if one could fool around with PSQL "scratch pad"
- dprice1 4y ago@Craig, I wonder if you've thought of making this available (would it work??) for test case construction. Today (working in Go) I start a postgres in a docker container for testing database code. Could I instead use a go wasm runtime, and start postgres inside of it? That would potentially free me from the docker dependency in these tests.
- craigkerstiens 4y agoThe communication in and out is a bit of extra work at the moment. We've got some thoughts on improving this in the future, but it's a bit unclear on timeline and roadmap. We're excited to hear what people want from it and how they use it and that'll inform a lot of how we move forward.