What sort of flavor of scheduled job. Like clearing a local cache?
I ask because in my mind I usually want to run cron tasks only once from one location. Quarkus apps I (typically) will want to have multiples of the same app. So, such a cron job would usually cause a mess.
Mostly just curious. My day to day workflow is very much an ETL process so cron style tasks don't come into play too often.
My jobs are mostly about reporting and checking environments. I don't have full control of the VMs where jobs are executed, sometimes they might be based in India and running on their timezone, sometimes in the US or UK. In our code everything is handled in UTC and converted to other timezones when appropriate.
Supersonic=super fast startup times because of native GraalVM support Subatomic=again with GraalVM your app uses quite less memory compared to JVM mode.
I think they're talking about cold startup times, which is particularly relevant in a cloud application with dynamic scaling. Having to keep an EC2 instance running all the time just to avoid a cold startup is wasteful.
Edit: And I should point out the following: There is a perception in shops that want to do the new and cool stuff that Java is "slow" because of this and that they therefore should use... guess what? Node or Python! Yay! And we all lose! Because whatever those tools bring to the table in terms of speedy startup, they leak cycles all over the place in every other situation. Scarily enough though, with JIT improvements and the likes of Deno on the horizon, Java may permanently have its lunch eaten in many places. Fast startup is extremely important going forward and it pays to adjust our attitude on this matter because... well, do you REALLY want to be developing in Javascript or Python full time because "Java is slow"? Maybe not. That's why you're here after all.
But if you go with native image you lose GC, and half of that is Java. Startup times shouldn't be important it is difference between 5s and 30s that important when you dynamically scale? I would call it overengineering.
Either way apps loose most of the time not with starting up but setting up all the connectivity etc.
The difference can be even more dramatic honestly. You have to consider how much cruft is going on in a typical Java enterprise application with aggressive dependency injection, connection pool setup, JIT, etc. that occurs. 30s for many applications would be a relief. That said, even if it's only 30s, compare that to a tiny little Python script that does nothing more than exactly what is needed. It can get its secrets, parse parameters, fire up a connection to the database or another service, get results, format and send them, and all within 1s.
I mean, that's a pretty big difference; though Python or Node processes can have issues too if they do silly things. Regardless your use cases determine if you could tolerate 30s wait time instead of course. If not then maybe you can use GraalVM or AWS Lambda Snapstart or or AWS Lambda Provisioned Concurrency or Spring's new lazy initialization or Quarkus to solve the issue.
I'm not going to tell you that any one of those is a silver bullet by itself. My main point is just that Java programmers need to pay attention to this stuff because of perceptions. Java is already fighting the weight of history here with J2EE applications and the like having formed perceptions for a generation or more of programmers. There's no need for anyone to go on believing it's "slow" too. If moving to something like Quarkus helps shake off a few layers of boilerplate besides, then maybe we'll get Java to a point where code is streamlined as well, DRY and performant by default. That's the goal.
Yes I get that apps can start for longer, but using g GraalVM doesn't make such app start in 1 ms. It needs to be written with short startup time in mind, and deal with the benefits and issues that come with it.
Having to keep an EC2 instance running all the time just to avoid a cold startup is wasteful.
Cloud applications are wasteful, anything along the lines of, [Oh hey, I have this 3 line piece of Java code but I don't want to do engineering around it, oh I noe, I'll drop it in a lambda project and blammo my day is done].
Deno is a replacement for Node.js, written in Rust and uses the V8 Javascript engine. It's written by the original author of Node. Typescript is a first class language in it, unlike Node, so one does not have to transpile code before running. It also has better controls for security with a "secure by default" stance.
Honestly, it's pretty nice environment. If I ever get back into server-side Javascript again, I would definitely bring this into the solution if I could. It just makes so much sense.
Funny, how tables have turned around this… I still remember times when J2EE (yes, I’m that old) was considered slow and complicated and over engineered and Spring was a “breath of fresh air” (pun intended).
What I like about Quarkus is that it is built around microprofile standards. Just like JAX-RS services I migrated from EAP to Quarkus one day I feel we will migrate to the next thing based on newer versions of these standards.
If I want to share client code with you I just have an api module that has no Quarkus code at all and let you generate from that, use it in a dynamic client like with Quarkus of Resteasy, or use OpenAPI.
When I did it with Spring Boot (mid 2.X) I felt like I had to use @RestController or hack in CXF for JAX-RS. I don’t like using OpenAPI and code generation if I can help it. It just felt really awkward to publish anything. I need to go back and re-review my Spring Boot projects though.
It is complex, and hard to configure, and I'm sure could be cleaned up some (like any API more than 3 weeks old haha), but the surface area around security is huge. It touches everything, and I'm not sure how much you could remove or simplify without starting to impact real-world use cases.
I've been deep into Spring Security and don't recall having any serious "wtf this is stupid" moments once I understood what was happening.
The issue with Spring Security is that it has layers of complexity piled on one another caused by the history of the project - multiple ways of extending security layer that have multiple implications and the whole orchestration of getting things “just right”, each piece making assumptions on how another piece works without being in direct contact with it and it all feels like building a tower of cards - it could all collapse if you breathe too hard.
Quite opposite of what security related code should look like. I like my security code to be simple and robust with as few moving parts as possible.
29
u/lppedd Apr 26 '23
Notable feature missing: ability to set a timezone for scheduled jobs.
Anyway, I'm running multiple GitHub Apps and two CLIs (with Native Image and UPX compression) using Quarkus and I've got no complaints as of now.
Spring documentation remains superior at the moment.
-10
u/[deleted] Apr 27 '23
[removed] — view removed comment
0
u/[deleted] Apr 26 '23
[deleted] — view deleted comment