Instantly share code, notes, and snippets.

Embed
What would you like to do?
54thAirhacksQ&A.md
@litts

This comment has been minimized.

litts commented Aug 13, 2018

Hi Adam,

Thanks for the great show always looking forward to the show every first week of the month. I have a question on the BCE architecture, how do you structure your reports logic. Whats your recommendation do you stick it with the business domain and make a sub package for reporting?

Your 2 cents will be greatly appreciated.

Thanks,
Litts

@vanuatoo

This comment has been minimized.

vanuatoo commented Aug 17, 2018

Hello Adam,

Looking forward for your wise advice on the following issues:

  1. Angular Front-End talks to JAX-RS Back-End.
    After successful authentication token is generated and stored in a cookie.
    For every request the back-end checks if the token is expired and if not, extends timeout just like HttpSession does.
    Token is stored in RDBMS, so every request hits the database.
    We also use HttpAuthenticationMechanism to authorize the tokens and every request hits the database to get user roles.
    Which caching solution would you propose to handle large numbers of users in a clustered environment?

  2. How to implement Timer service (EJB Timer or ManagedScheduledExecutorService) fail-over in a clustered environment?
    For example: 2 payara-full servers running in a docker behind haproxy.
    Challenge #1: ensure that only one server runs the timer function.
    Challenge #2: ensure that if one server dies, the second one runs the timer function.

Thanks,
Vano

@ssr7

This comment has been minimized.

ssr7 commented Aug 18, 2018

Hi Adam.
I want to start project that is store files on network for that each file split number of slice and send nodes(former) .Each node share his hard disk (min 10 G). End client if has coin he can upload and download file from these nodes. If download or upload file from one node, the system must be calculate coin and save on network with blockchain.
Is Actor model good for this project? if yes, which actor model is good? AKKA or Vertex or other?
Thanks.

@rieckpil

This comment has been minimized.

rieckpil commented Aug 21, 2018

Hi Adam,

  1. How do you validate the database schema during startup if you are using EclipseLink (e.g. on Payara) as there is no alternative to Hibernate's hibernate.hbm2ddl.auto = validate? Do you add custom code for EclipseLink's IntegrityChecker?
  2. Do you have any improvment for the following implementation of the rate limiting of the last Airhacks question? https://rieckpil.de/howto-jax-rs-user-based-rate-limiting-with-jsr-375/ . I wouldn't use this approach for a Netflix scale application but for a small API provider with max of. 500 - 100 requests/second.

Thanks,
Phil

@vanuatoo

This comment has been minimized.

vanuatoo commented Aug 27, 2018

Using JAX-RS with JSON-B.
Java Bean contains LocalDate fields. I annotate them with @JsonbDateFormat("dd/MM/yyyy") to pass validation during json consumption.
How do I define this format globally for my project, so I don't have to annotate every LocalDate field in my other Java Beans?

@SlobodanVujovic

This comment has been minimized.

SlobodanVujovic commented Aug 28, 2018

Hi, Adam,

I looked at your Payara5 Dockerfile in which you call shell script start.sh at end of Dockerfile. I don't understand what is next line, from start.sh, doing:

echo deploy ${DEPLOYMENT_DIR}/`cd ${DEPLOYMENT_DIR} && ls -1 | head -1` > ${INSTALL_DIR}/deploy-command

Can you explain it a little bit. I can not find deploy command anywhere. Is it Linux command, Docker command, or something else?

Thank you for so much quality content.
Slobodan Vujovic.

@Valleyman1

This comment has been minimized.

Valleyman1 commented Aug 31, 2018

Good day, Adam,

Thank you very much for the knowledge sharing you have been doing. I have learned a lot, and the "Java Ninja" book Real World Java EE Patterns - Rethinking Best Practices is incredible.

I have the following question. In JAX-RS how would one pass bulk (message with more that one request) JSON/XML request?

Regards,

@GADNT

This comment has been minimized.

GADNT commented Sep 3, 2018

Hi Adam,

Let's say that I have deployed a service on some application server(weblogic ,old but strong :) ). Programmatically or not what will be your approach to get run-time errors by type(let's say) and if some threshold is touched then an alert/email to be sent to the administrators?
As always,I appreciate your time shared with us through videos.
Thank you
Gabriel

@mhlulani

This comment has been minimized.

mhlulani commented Sep 3, 2018

Application Server Credential Rotation (pull)

Hi Adam

Is it possible to configure application servers (Wildfly) to pull resource (database) credentials from somewhere, instead of setting them statically in the config (standalone.xml). Even if it means we need to write a plugin for the application server, we will have to do that.
We are now required to rotate credentials everyday on MANY instances as apposed to every week.

Thanks for the continued effort
Enjoy you evening.

@zak905

This comment has been minimized.

zak905 commented Sep 3, 2018

Hi Adam,

have you ever used GWT (previously Google Web Toolkit), does it have any future for front end development using Java ? or as alternative to writing front ends for Java (or Jakarta) EE backends ?

Thanks for the show.

@jcrochavera

This comment has been minimized.

jcrochavera commented Sep 3, 2018

Hi Adam,
Thank you very much for share your knowledge.

Is there any way to load/unlod in runtime resources/endpoints contained in external classes?
I already have an approach:

    1. create a new configuration: JAXRSConfiguration resourceConfig = new JAXRSConfiguration();
    1. Load the clas: loadClass(source, parentClassLoader);
    1. register as instance : resourceConfig.registerInstances(clazzInstance); (because if I use another method the instance cached is not removed and the old code is still present)
    1. reload the container JAXRSConfiguration.reload(resourceConfig);
      This approach does not support CDI...
      Is there a better way to do the same, but more efficiently ???
      Regards,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment