Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created June 6, 2022 04:31
Show Gist options
  • Save AdamBien/0b8ebc12edd95c159362182fd4ff1996 to your computer and use it in GitHub Desktop.
Save AdamBien/0b8ebc12edd95c159362182fd4ff1996 to your computer and use it in GitHub Desktop.
100thAirhacksQ&A.md

Ask questions and see you at July, 4th, 8.PM. CET: youtube.com/c/bienadam

Also checkout recent episode:

99th airhacks.tv

Please keep the questions Jakarta EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions. Upcoming airhacks.tv events are also going to be announced at meetup.com/airhacks

@douglas444
Copy link

douglas444 commented Jun 20, 2022

Hi, Adam.

Feel free to ask several, shorter questions.

Ok, so here I go. And I'm sorry if there's a lot of misconceptions on my questions though. I'm new to Jakarta.

First question:

In a context where the deployment is layered and an application server is used, is there any significant advantage in having the application built using only Jakarta APIs rather than dependencies that are bundled in the artificat (like Spring's ones)?

@douglas444
Copy link

douglas444 commented Jun 20, 2022

Considering that the answer for my previous question was positive (or at least a "maybe"):

How using Quarkus instead of an application server would impact this possible advantage? I mean, considering that Quarkus puts all required runtime dependencies in a lib-folder which you can put into a Docker-Layer.

@douglas444
Copy link

Spring Native is said to provide key advantages, like instant startup, instant peak performance, and reduced memory consumption. Is there a equivalent solution for applications built using Jakarta EE only?

@douglas444
Copy link

douglas444 commented Jun 20, 2022

If I use Payara as my application server but I want to use Hibernate instead of eclipselink, will I have to deploy Hibernate together with my application?

@douglas444
Copy link

How does Quarkus provides to the application the dependencies from the lib folder? In terms of efficiency, how does this Quarkus strategy for providing dependencies compares to the one used by application servers to provide spec's implementations to the application?

@douglas444
Copy link

Which application server do you recommend if I want to use Hibernate (I'm not intending to use Hibernate specific features though. I just prefer its logging)?

@autohandle
Copy link

100? whoa!!
congradulations!
and, of course, a shout-out to kinga

@pglizniewicz
Copy link

Do you have any recommendations or "rules of thumb" on where to check roles/privileges declaratively? Basically, where would you use annotations like Spring @Secured: at the Controller (endpoint) level or at the business logic/"service" level? If "it depends", then what are the questions I should ask, before settling for one of these approaches?

@jefrog1844
Copy link

jefrog1844 commented Jul 1, 2022

My quarkus app running in jvm mode consumes about 200MB and less than 1% CPU and in native mode consumes 80MB and less than 1% CPU when I inspect them in activity monitor. Some online providers offer VM sizes like nano or micro with .25 vCPU to .5 vCPU and 512MB to 1GB. Would using activity monitor be a good test of what VM size to select?

@jarryDk
Copy link

jarryDk commented Jul 4, 2022

Hi Adam

Thanks for sharing the code for CDK deployment to AWS - https://github.com/AdamBien/aws-quarkus-lambda-cdk-plain

Can't get LambdaAlbStack to do as I like. How do I get alb to return text/plan or application/json as Content-Type in the response and not ´application/octet-stream´ ?

$ curl -i http://AirhacksLambdaLB-1858173519.eu-central-1.elb.amazonaws.com/hello
HTTP/1.1 200 OK
Server: awselb/2.0
Date: Mon, 04 Jul 2022 07:25:02 GMT
Content-Type: application/octet-stream
Content-Length: 28
Connection: keep-alive

hello, quarkus as AWS Lambda

I have done two very small change to the code.

Change in lambda/pom.xml

- <artifactId>quarkus-amazon-lambda-http</artifactId>
+  <artifactId>quarkus-amazon-lambda-rest</artifactId>

Change in cdk/src/main/java/airhacks/CDKApp.java

- new FunctionURLStack(app,appName);
+ // new FunctionURLStack(app,appName);
- // new LambdaAlbStack(app,appName);
+ new LambdaAlbStack(app,appName); 

@haglo
Copy link

haglo commented Jul 4, 2022

HI Adam,

dynamic import in JavaScript.
i want dynamicly import in JavaScript, because sometimes i let run my JavaScript-App local on my pc, sometimes in the Cloud

Example for run local:
import { content01 } from "http://localhost:8182/lib/env.js";
....

Example for run in Cloud:
import { content01 } from "http://www.meine-app.com:8182/lib/env.js";
....

I am searching for something like this:
import { content01 } from ${baseURI}:8182/lib/env.js";

My Application must only run on Google-Chrome.
Is there a new feature in new ECMA-Standard?

@wanderer2097
Copy link

wanderer2097 commented Jul 4, 2022

Congratulations on the 100th airhacks! Keep it going, Adam!

You mentioned on several occasions that cloud is like an "exploded application server". Do you think the same is also true of the cloud-native databases?

Do you have any experience using Amazon DynamoDB transactions - like here ? Have you used them on any of your projects requiring stronger consistency guarantees or you wouldn't bother?

@wanderer2097
Copy link

On one of recent episodes you mentioned using caches (e.g. JPA L2 cache) in serverless (e.g. Lambda) deployments makes no sense. How about accessing static data (e.g. master data which very rarely changes)?

@dwamara
Copy link

dwamara commented Jul 4, 2022

Hi Adam,

I have no question (for today) :-) I was there for the 60th, which was the 5th year anniversary so I cannot not give a shoutout for the 100th episode. It has been 8 years and 4 months, that's a milestone, thanks for keeping it up and not quitting. We went from the green and blue books to Java EE to BCE to Glassfish to Payara to Quarkus and now AWS Lamba... thrilled to know what's next down the line.

D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment