Hacker News new | ask | show | jobs
by yjgyhj 3914 days ago
On a slightly unrelated note:

Would it be possible to make a webapp like Meteor in Clojure pretty easily, using CSP go-style channels ang go-threads.

I imagine a function would "broadcast" or "listen to" websocket connections. If the app uses channels for communicating between different go-blocks, server/client contact could use an identical interface. Sending things server-side would be no different than sending things client-side.

Could also be a simple 2-function library.

4 comments

Yes, it's definitely possible, I've personally done that many times and we do that at my current company as well. It ends up being a few hundred lines of code, and you have pretty much full understanding of what's going on and you can fit the code to your needs.
Sente is a good library that allows you to do something like this: https://github.com/ptaoussanis/sente

You would have to do the database code yourself, however.

Huh. You'd need a closurescript wrapper around MiniMongo which is the in memory mongo database that powers Meteor's isomorphic code. But in theory very doable.
Yep. In Coils it has a frontend database cache like MiniMongo