5 ms·
Jets: Ruby Serverless Framework
- kulor 3y agoIf people aren't familiar, there's a similar project for Python that's fantastic: https://github.com/zappa/Zappa https://github.com/zappa/Zappa
- lobo_tuerto 3y agoThere is one for Elixir too, Flame: https://fly.io/blog/rethinking-serverless-with-flame/ https://fly.io/blog/rethinking-serverless-with-flame/
- freedomben 3y agoIs Flame actually ready for production use yet? I just saw it the first time a couple days ago but no idea how long it's been simmering. Flame seems very different to me than Jets though. Flame just plugs into a Phoenix app and lets you trivially async some application code on a different node through the existing erlang functionality without having to manually sync memory/state/etc. Definitely cool, but seems fundamentally different than Jets which uses traditional "serverless"
- arrowsmith 3y agoFlame was announced two days ago - the above linked blog post is the announcement post. So I'm not sure anyone is using it in production yet except fly.io, its creator.
- bigtunacan 3y agoThat looks similar to Chalice (also for Python) https://github.com/aws/chalice https://github.com/aws/chalice
- Alifatisk 3y agoHow active is this project?
- sam0x17 3y agoFormer CTO at Arist (YC S'20) here. Jet's literally got us off the ground and to the point where we could handle spikes where we scale up 1000x to handle hundreds of thousands of messages per second and then immediately scale back down 1000x because of the spikey nature of our workload. Almost all of the traditional issues one encounters when running a Rails app in production vanish when you build on top of Jets, as scaling just becomes something that happens automatically without you worrying too much about it other than at the database level. One thing that was particularly impressive about Jets is its whole ApplicationJob system that provides an easy-to-use API for writing lambda fan-out routines, which we used as the crux of our message scheduling and processing system https://docs.rubyonjets.com/docs/jobs/ https://docs.rubyonjets.com/docs/jobs/ Anyway, I mostly work in Rust now but still am and will always be a huge fan of the project and Tung Nguyen, its creator :)
- tongueroo 3y agoThanks Sam!
- davidw 3y agoHow much more do you estimate, very roughly, it costs to use the serverless stuff in "normal times" outside of spikes compared to a more traditional system?
- sam0x17 3y agonormal times was well within the free tier, and this was even with a pre-warm job turned on for our endpoints. Even the spikes were not very expensive. Back then 80% of our bill was RDS and I think we were paying under $50/mo for beyond-free-tier usage of lambda. It was a tiny fraction of what the cost was when we had EC2 clusters. If you're ok with cold-starts on less-used routes you could probably make any medium to low traffic app run totally free on jets (other than db)
- quickthrower2 3y agoI guess this is a serverless thing rather than Jets-specific? Has anyone had this experience in NextJS using serverless erm... servers? Maybe Vercel themselves (or Lambda etc.)
- tongueroo 3y agoJets 5 was just released also https://blog.boltops.com/2023/12/05/jets-5-improvements-galore/ https://blog.boltops.com/2023/12/05/jets-5-improvements-galo...
- dcchambers 3y agoLove seeing non-rails ruby stuff. This project looks cool...In general I think most people should avoid lambdas except for very specific types of workloads, but I hope projects like this allow ruby/rails devs to feel a bit more comfortable building lambda functions when they do need one.
- freedomben 3y agoLikewise, non-rails ruby stuff doesn't get nearly enough love. I still use and love Sinatra for small apps quick PoCs/demos/tools. So wonderfully stable and mature, and does what it needs to do.
- manojlds 3y agoNot to mention Jekyll
- freedomben 3y agoOh yeah! I still have two sites powered by Jekyll, and that thing has been a rock. So refreshing compared to the other worlds of constant churn and breakage
- rubyfan 3y agoSame, I almost always default to Sinatra. Love me some Rails for all the powerful stuff though.
- sho 3y agoCheck out hanami next time you're starting something new. It's a little more complex than sinatra, but really gels with how I like to architect things. It's basically "what if dry-rb had a web framework"?
- bigtunacan 3y agoI've done enough with dry-rb to know I don't want to try Hanami. I think at that point it's just better to switch to something truly functional like Elixir.
- jmarchello 3y agoAnything that gets more Ruby out in the world is positive in my book. Great looking project!
- nazka 3y agoYa I miss the time when Rails was used 2 out 3 times in startups. It has it flows but dang the DX and the features it has. And the speed you ship things. Even Java with its massive ecosystem and devs doesn’t have an all packed solution like Rails but it gets closer with Spring Boot but not equal or better. Maybe Phoenix? We are getting there with TS but you have to use 30 different packages and glue and config the whole thing before even beginning to code anything.
- arrowsmith 3y ago> Maybe Phoenix? Yes
- blondin 3y agocan't recall the last time i was on a project's page and everything just clicked. no fluff. kudos to the team!
- xutopia 3y agoIs there an example of this to run a web socket?
- kondro 3y agoLambda doesn't allow websockets in the way you might expect. However, you can use the WS feature of API Gateway[1] to implement WS serverlessly in AWS. [1] https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api.html https://docs.aws.amazon.com/apigateway/latest/developerguide...
- xutopia 3y agoOh thank you for this!
- dang 3y agoRelated: Ruby on Jets: Like Rails but serverless - https://news.ycombinator.com/item?id=34474049 https://news.ycombinator.com/item?id=34474049 - Jan 2023 (84 comments) Jets: Ruby Serverless Framework - https://news.ycombinator.com/item?id=19893796 https://news.ycombinator.com/item?id=19893796 - May 2019 (39 comments)
- askonomm 3y agoI've learned and previously also professionally worked with: JavaScript, TypeScript, PHP, Clojure, ClojureScript. I really like the ergonomics of Ruby. Should I learn it? How's the job market (decreasing|stable|increasing)? Is Ruby also good for non-web things?
- promiseofbeans 3y agoI've been seeing a lot of job postings mentioning rails recently
- caseyohara 3y agoRuby is absolutely worth learning. It's a nice combination of OO and functional programming, and I find it nice to both read and write. It's very expressive; I find it easier to model my ideas in Ruby than many other languages. The job market seems healthy and stable, but I'm not a reliable source on that. Outside of web development, Ruby is an excellent scripting language, that's perhaps where it excels best.
- uticus 3y agoAgreed, Ruby the language is fantastic for ease of use starting, then more complex concepts ready to go (functional programming, WASM, C interopt, etc) when you're ready to dive into them. IMO the jury is still out on its recent changes to make things faster and statically typed. With so many other options in the script-language space (Python and Javascript being biggest by market share) it's difficult to grab a bigger piece of the pie, even if the newer features would be 100% perfect with no downsides. As far as jobs, most will be tied to Ruby on Rails - the Rails framework of course being built on top of Ruby the language. And I'll mention Rails is also worth at least trying out, to see for yourself what it does and how it works. [edit: added reference to JavaScript]
- siliconwrath 3y agoThe rails community is working on building out a job listing site, worth checking out: https://jobs.rubyonrails.org/ https://jobs.rubyonrails.org/
- trevor-e 3y agoNice, looks like the Ruby equivalent of sst.dev for folks that prefer Typescript.
- ryukoposting 3y agoI tried Jets a couple years back. I wanted the ease of Rails, but with (ostensibly) a cheaper AWS bill. Actually writing your app and testing it is just as easy as it is with Rails. That's good. The hellish cryptic errors when it borks a CloudFormation config? Not so good. Ultimately I gave up and went back to Rails. With Jets, you still have to keep in mind that the infrastructure is way more complex than Rails. Jets tries to hide away that complexity, and it does a good job... until it doesn't. If you're an AWS expert (I'm not) then this is a great tool and you should try it. If you aren't, just stick with Rails.
- ajmurmann 3y agoI've had great success running Rails apps with Google Run. If you can live with the initial request sometimes taking 1-2s it's great. All my usage is within the free tier and once it's set up with Google Build, it's fire and forget
- andrelaszlo 3y agoCloud Run? Did you do any work to get cold boots faster?
- giovannibonetti 3y agoYou can have your cake and eat it, too. Have a minimum of 1 instance "on", with the CPU in low-power mode until a request comes. This way, you get low cost in idle times without cold starts. https://cloud.google.com/blog/products/serverless/cloud-run-adds-min-instances-feature-for-latency-sensitive-apps https://cloud.google.com/blog/products/serverless/cloud-run-...
- iamflimflam1 3y agoBut you get charged for that 1 instance running all the time which kind of defeats the whole point of it being serverless?
- dkobia 3y agoTung Nguyen who runs this project has done a stellar job managing it. He is super responsive and it is amazing how much time and effort he's put into it. I've been pretty active with Jets for the last 4 years.
- tongueroo 3y agoThanks!
- teaearlgraycold 3y agoI was a Rails dev for 4 years. After the switch to TypeScript I could never go back.
- usernamed7 3y agoif you view typescript as equivalent to what rails can provide in development... best of luck to you!
- film42 3y agoThis is pretty cool. For folks on GCP, does it make more sense to use vanilla rails with cloud run? I wish lambda had the ability to share processes like cloud run with a max concurrency setting.
- fareesh 3y agor-r-r-ruby and the jets
- devKnight 3y agoMissed opportunity to call it Ruby on Rockets XD