Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created September 7, 2022 05:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdamBien/877ce9c05f8eaeaf1dda2ba2df7eddd0 to your computer and use it in GitHub Desktop.
Save AdamBien/877ce9c05f8eaeaf1dda2ba2df7eddd0 to your computer and use it in GitHub Desktop.
103rdAirhacksQ&A.md

Ask questions and see you at October, 3rd, 8.PM. CET: youtube.com/c/bienadam

Also checkout recent episode:

102nd 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

@AdamBien
Copy link
Author

AdamBien commented Sep 7, 2022

The airhacks.tv time machine. Topics review from the 3rd episode: https://adambien.blog/roller/abien/entry/questions_for_the_3th_airhacks

@AdamBien
Copy link
Author

AdamBien commented Sep 7, 2022

Comment from 102nd airhacks.tv by Luis Daniel Mesa Velasquez:

Hi Adam, can you take a look at the @Clustered annotation in Payara for comparison with the answer to question 12 from the second episode (100-ago). Do you think it's a good approach to use Hazelcast as the layer for having distributed event and scheduled beans firing once per cluster?

@JohannesRabauer
Copy link

From https://twitter.com/JohannesRabauer/status/1572460603800956928
I still struggle with the idea of storing all my data in NoSQL Cloud storages.
For example if i have a couple of thousands objects, with complex Java class structure and i want to store them in DynamoDB. For me it would look like this:

To store the top user objects isn't the problem. The difficulty for me lies in the storing of the underlying complex data structure.
Easiest solution in my eyes: Serialization.
But the
@microstreamOne
framework already does that, right?
Well, if you put all your data in MicroStream and then serialize into DynamoDB, that would work. Really easy to use in java and you don't have any hassle.

But to load a single user within a serverless function, i would have to load the whole MicroStream DB and that can't be good.
Ok, to reduce the size of the MicroStream DB one could simply extract the images to S3, right?

But still, to load one user, 10000 users AND 10000 project would get loaded...
Ok. So i simply put multiple MicroStream Datastores into DynamoDB.

....and STILL 10000 users are loaded for one user.

And that's what i struggle with.
@AdamBien
maybe you could nudge me in the right direction for solving this theoretical problem? 👋

@rac021
Copy link

rac021 commented Sep 25, 2022

Hi,

Question about the BCE pattern, I have a builder ( which is a type of utility that helps build the domain model ) and I'm wondering whether to put it at entity or control level ?

Thanks

@AdamBien
Copy link
Author

AdamBien commented Oct 3, 2022

is quarkus alternative for java 8? jee7?
from: https://www.youtube.com/shorts/iamc2EU1TFA

@AdamBien
Copy link
Author

AdamBien commented Oct 3, 2022

System.out.println vs. Logging

@AdamBien
Copy link
Author

AdamBien commented Oct 3, 2022

for short questions - you don't have to wait a month

@AdamBien
Copy link
Author

AdamBien commented Oct 3, 2022

Is System.out.println too complex and verbose?

@AdamBien
Copy link
Author

AdamBien commented Oct 3, 2022

João: "(...) I have been watching your videos and tutorials on Java, can you tell me why you use VS Code instead of IntelliJ?"

@wanderer2097
Copy link

In my application (which is very JPA-heavy) I have to rely on an RDBMS as data storage (can't use DynamoDB). Being in the cloud - RDS seems like the only sensible option (for aws). For an application running as lambda (e.g. using Quarkus) the connection pooling can be solved via RDS Proxy. How about caching of static master data (that rarely changes but is read on almost every request)?

I thought about implementing an application-level cache but that does not work for JPA entities that are fetched via relationship traversal. Quarkus JPA L2 cache support is only "experimental". Architecturally - lambda is not meant as a long running process so adding a cache there makes little sense. Have you come across this problem in any of your projects and how was it solved? Going to the database to fetch these static master data for every request does not seem like the most efficient approach. Does implementing a standalone cache make sense?

(sorry for the lengthy question)

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