[HN Gopher] Capsule: the nano (WASM) functions runner
       ___________________________________________________________________
        
       Capsule: the nano (WASM) functions runner
        
       Author : rcarmo
       Score  : 87 points
       Date   : 2022-10-02 08:56 UTC (14 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | rebolyte wrote:
       | Interested in this! thanks for the clear examples in the readme
        
       | elesbao wrote:
       | been playing with firecrackervm and this seems a perfect runtime
       | for my small images with wasm.
        
       | moralestapia wrote:
       | In case someone knows, is there a way to use this lib but
       | compiling from JS instead of Go?
        
       | norman784 wrote:
       | I was thinking on build my local serverless server, so I can
       | deploy my services easily (almost as easy as docker, but with
       | less overhead I think), there are few downsides I think and it's
       | that docker let more variety of software run, while a serverless
       | host need specifically or in most cases Wasm.
       | 
       | Said that I have no idea how to start, will this be a good
       | foundation to build an easy to deploy local server? (think of aws
       | lambdas, vercel, cloudflare workers, fly.io, etc).
        
         | qbasic_forever wrote:
         | Do you want to use a FaaS or just toy with making your own? If
         | you just want to use something check out OpenFaaS, it's very
         | easy to get started and is well documented:
         | https://www.openfaas.com/
         | 
         | If you want to build your own FaaS, I'd still explore OpenFaaS
         | as its creator has documented a lot of its creation and you
         | will soon discover the critical things you'll need to figure
         | out for building your own similar service (i.e. stuff like
         | sandboxed execution environment, API gateway, scaling up and
         | down functions, etc.).
        
       | inhumantsar wrote:
       | Potentially stupid question: I can see the benefit of running Go-
       | compiled-to-WASM client side but I don't really get why I might
       | want to run WASM server-side.
       | 
       | What would be the benefit of server-side WASM over running a Go
       | binary directly? To run untrusted binaries alone or are there
       | other benefits?
        
         | debarshri wrote:
         | WASM is often pitched as a potential alternative to docker and
         | other OCI compatible alternatives. It does not have to be a go-
         | compiled-to-wasm, it could be python compiled to WASM, or rust
         | for that matter. Either ways, you could use any function
         | runners like these, Wasmer [1] or any webassembly runtime to
         | run them on a host.
         | 
         | [1] https://wasmer.io/
        
           | TobyTheDog123 wrote:
           | Isn't Wasmer the sketchy one? I'm not very up-to-date on the
           | WASM drama lately.
        
             | debarshri wrote:
             | I'm not aware of one. Is there some WASM drama going on
             | lately?
        
               | ignoramous wrote:
               | https://news.ycombinator.com/item?id=27543731
        
         | 0x457 wrote:
         | WASM on server-side main benefits are: easy sandboxing, being
         | polyglot, hot-reload.
         | 
         | This one seems not quite polyglot, but it's easy to change.
         | 
         | I think WASM, once WIT (or something similar) gets into spec,
         | will be a wonderful way to make plugins for your service.
        
       | praveen9920 wrote:
       | The documentation is one of the cleanest I've seen in recent
       | days. Kudos
        
       | bsaul wrote:
       | Side question : is nats a credible alternative to kafka nowadays
       | ? I've read it could do the same things in theory, but i haven't
       | heard of real world experience feedbacks with this tech.
        
         | superzamp wrote:
         | Side answer to your side question: not sure for NATS, but
         | Redpanda is trying to be a lightweight drop-in alternative
        
           | FridgeSeal wrote:
           | Redpanda also appears to be being a bit more stringent about
           | some of the correctness and consistency stuff.
        
           | zcw100 wrote:
           | And RedPanda uses WebAssembly as an execution engine to keep
           | with the WASM theme here. https://redpanda.com/blog/wasm-
           | architecture
        
         | deforciant wrote:
         | It's great actually, you can run it with pretty much no
         | maintenance overhead. I have been using it in prod in multiple
         | companies for years now
        
         | paulgb wrote:
         | I haven't used Kafka in production, but we use NATS in
         | Spawner[1] and I find it quite pleasant to work with. It gives
         | you some basic but powerful messaging constructs
         | (request/reply, queue groups, temporal decoupling via
         | Jetstream) and then gets out of your way.
         | 
         | [1] https://github.com/drifting-in-space/spawner
        
         | asim wrote:
         | NATS is very powerful. The author has like 25 years of
         | experience building messaging systems and NATS has been around
         | for a long time. The streaming component is slightly newer but
         | I'd say it does the same job as Kafka but much lighter
         | footprint with zero deps.
        
           | [deleted]
        
       ___________________________________________________________________
       (page generated 2022-10-02 23:01 UTC)