Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created May 4, 2022 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/cb27cbe9bf704633549ae96b1c3bbc20 to your computer and use it in GitHub Desktop.
Save AdamBien/cb27cbe9bf704633549ae96b1c3bbc20 to your computer and use it in GitHub Desktop.
99thAirhacksQ&A.md

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

Also checkout recent episode:

98th 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

@OndroMih
Copy link

OndroMih commented May 7, 2022

Hi Adam, I really enjoyed your podcast #185 with Goran. You mentioned there's a Jersey adaptor for AWS Lambda. I know Azure provides JMS API for service bus.

Do you know of any other Jakarta APIs supported by cloud services? Not only the whole JakartaEE but also individual APIs?

@OndroMih
Copy link

OndroMih commented May 7, 2022

Where do you think is a place for JakartaEE in AWS lambda and other commodity cloud services (e. g. messaging , storage, etc.)? Does it fit somehow, can it be helpful, or it's an overkill to use JakartaEE and plain Java, JDBC, etc. is enough?

@OndroMih
Copy link

OndroMih commented May 7, 2022

If you build an app based on AWS lambdas, how do you package all things together? Just by keeping all in the same repository, together with CDK commands to peovision the infrastructure and connect the lambdas?

Thanks, and I'm sorry for so many questions :) The podcast with Goran was so much inspiring.

@OndroMih
Copy link

OndroMih commented May 8, 2022

Hi Adam, one more question, what's your take on connection pooling and AWS Lambda? What works best for you in practice?

Is RDS proxy the best solution? Or is there anything simpler that works in practice?

@felixrichardt
Copy link

Hi Adam,
I always enjoy your recommendation migrating some workload to plain java lambda on AWS. Currently I'm working on optimizing start time without using provisioned concurrency and saw that official aws blog post on how to optimize java lambda performance https://aws.amazon.com/de/blogs/compute/optimizing-aws-lambda-function-performance-for-java/ . In this post they also recommend set JAVA_OPTIONS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1
I wonder if there are any drawbacks by using this option, what is your opinion about this and can you share a quick insight on what that option does under the hood? Thanks!

@omega09
Copy link

omega09 commented Jun 5, 2022

We are developing a system where mobile devices send their location frequently to a JavaEE server. There can be many devices talking to the server at the same time, so scaling is important.

These are the requirements for messages from the device:

  1. The device sends the location 5-10 times per second.
  2. There doesn't need to be a response from the server for these updates.
  3. It is not crucial that all of these updates reach the server.
  4. The devices might have bad connections.

This looks like a use case for UDP. If so, how can a JavaEE server listen to UDP? Would you recommend something else that we can do on a JavaEE server? WebSockets might not scale well with many devices, might not deal well with disconnections, and are battery hungry I think. Maybe some sort of "Reverse SSE" if that's a thing?

These are the requirements for the messages from the server:

  1. The server needs to message each client (mobile device) once in a relatively long time (maybe on the order of once a minute or more).
  2. It is crucial that the messages reaches the device (but no response is needed).

For this maybe some kind of push notification (how to do this in JavaEE?), asynchronous REST, or SSE seem like candidates. What are your recommendations?

Thanks!

@dempile
Copy link

dempile commented Jun 5, 2022

Hi Adam,
Can you give us some recommendation for security protection of Java EE or Quarkus applications, something like Slowloris or http Dos attacks, I was thinking of using microprofile @Bulkheads with @Retry and Soteria RBAC @RollesAllowed, but I dont know if it is efficient against this kind of attacks.
Thanks

@felixrichardt
Copy link

felixrichardt commented Jun 5, 2022

Hi Adam,
if I want to deploy an API service with e.g Quarkus or Helidon to AWS - do you have a recommendation when to prefer e.g. a Docker container instead of a Lambda function? Or is it better to split the API into several smaller Lambda functions. Have you found a good and maintainable solution for you here?

Is it also ok to use Panache when using Quarkus in Lambda to access RDS or should I prefer plain JDBC for query my database? (when nosql is no option right now)

Thanks!

@felixrichardt
Copy link

Hi Adam,
If you want to use Identity Management (e.g. User Registration / Account Management / Authorization) within a Quarkus/Helidon API which run in a Lambda function - Do you have a recommendation here what fits well in the Serverless stack, or what do you use here in your projects?

@AdamBien
Copy link
Author

AdamBien commented Jun 5, 2022

IaC with Java and Pulumi

@comdotlinux
Copy link

Hey Adam,

When you are running with Fargate, if the server is always running does it not cost a lot? would you say that compilation with GraalVM is the only option then to have quick cold startup time? or is there a way to have let's say a small server that is running else where that immediately spins up one fargate service and then scales up as required, but more importantly scales back down to zero :) is there an example maybe with CDK that you could do?

Thanks in advance

@comdotlinux
Copy link

Hey Adam,
Also another request with AWS CDK, is it possible to use path routing with a single application load balancer to route requests to two services running in a single fargate cluster? Is there and example I tried but failed :)

Thanks,
Guru

@jefrog1844
Copy link

Hi Adam. Is there a cost effective solution for JPA/sql in the cloud that's still "jakartaeestic"?

@comdotlinux
Copy link

Hey Adam,

I also used your aws CDK lamda project to create a simple lambda that uses quesrkus but without native compilation. it does not start is 1.5 seconds but around 5 seconds,

do you have a repo where you have a quarkus project that is deployed to aws lambda but with native compilation?

Thanks,
Guru

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