5 ms·
I love Clojure and take every chance to use it, but unfortunately it’s very much behind the curve. Building web apps is more and more about tying together manag
by abiro 7y ago
I love Clojure and take every chance to use it, but unfortunately it’s very much behind the curve. Building web apps is more and more about tying together managed services with short scripts (aka serverless). This means that most app developers never have to deal with the hard technical problems that Clojure was designed to solve and Clojure’s slow startup time on the JVM makes it unfeasible for serverless functions.
Clojurescript on Node could be a good contender, but last time I tried it, the development experience was very poor and the power of Clojure doesn’t really shine in serverless functions, so I just use Python for that which is a perfectly adequate scripting language.
- james-mcelwain 7y ago> Clojure’s slow startup time on the JVM makes it unfeasible for serverless functions GraalVM could totally change this.
- joobus 7y agoClojure uses too much runtime reflection. I tried many iterations of compiling different server projects with Graal and none worked. I could get simple programs to compile with an older clojure version, but nothing with recent code.
- james-mcelwain 7y agoI'd expect the tooling will improve over time. This obviously isn't an immediate solution for running Clojure in situations where cold starts matter, but in general I think many of the improvements coming to the JVM in the next few years will pay dividends for Clojure.
- smashedtoatoms 7y agoNot to mention provisioned lambdas if you're on AWS.
- abiro 7y agoProvisioned lambdas make sense if you set the capacity to your median load to save money. But you still want the snappy horizontal scaling of lambda for loads above the median.
- fulafel 7y agoA slight tangent but are there really signals that indicate AWS Lambda style serverless is becoming a dominant way of making web backends? Especially since the AWS flavour is so developer hostile (APIGW, CloudFormation, highly divergent dev vs deployment setups complicating debugging, etc) It's fairly painful compared to a normal backend, and it seems like the serverless advocates are on the super high and super low end: big product teams that can justify microservices and the associated high friction, and on the other hand users/use-cases who recoil at keeping a monolithic server turned on all the time even on a wimpy cloud service. But if you've jumped on the bandwagon, look into Datomic - Ions are the Cloure-native Lambdas there.
- astuyvenberg 7y agoYes, I believe so. We've just passed the peak of inflated expectations on the technology hype curve, and the comments on HN reflect this. But in general - Do people manually deploy MySQL, Postgres, or MariaDB on EC2 servers? No, (most) people use RDS. The servers are still there, but the management is less. Do people manually deploy RabbitMQ? No, (most) people use SQS. Cloud providers have been working out of the same playbook for years - provide low-level compute, watch what people build, and create managed services which solve common use cases. Developers love these services, because it's less infrastructure to be on call for, and they can build products faster. Lambda and Serverless represents the inevitable conclusion of the natural evolution of the cloud. Parts of it are still painful, but undoubtably it's getting easier and more capable.
- fulafel 7y agoSure but RDS, SQS etc make your life simpler and easier, and they work fine with server-ful backend on eg Fargate. I think serverless is still far from providing the same net positive value.
- abiro 7y agoThe value of serverless is in commodified operations: once you wrote the code, it’s your favorite cloud provider’s problem to run it. This lets you provide high-availability services without a 24/7 on-call rotation. RDS and Fargate are not serverless, bc you still have to think about scaling strategies, appropriate network topologies and you might still have to wake up at night to tweak JVM or kernel settings in your containers.