Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active July 13, 2016 15:57
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/37aa198634f5b7227e64e2c7b16fd8d7 to your computer and use it in GitHub Desktop.
Save AdamBien/37aa198634f5b7227e64e2c7b16fd8d7 to your computer and use it in GitHub Desktop.
28thAirhacksQ&A.md

Ask questions and see you at July, 13th (exceptionally, this time at wednesday) at 6.PM. CET: http://www.ustream.tv/channel/adambien Also see archives: airhacks.tv

  1. Java EE 8 News
  2. Discussion around http://microprofile.io (http://www.adam-bien.com/roller/abien/entry/the_enterprise_java_future_is)

Questions from anonymous:

  1. Java EE status – during my studies, I utilized Java EE 6 for creating distributed system to monitor IT infrastructure. Now is 2016 and situation of Java EE is not in bright colors – Oracle reluctant to invest in Java EE standard, concern expressed in formation of “Java EE Guardians” that you are part of. I learned much from it and gave me ability to think “at scale”, distributed manner. But recent developments around standard, started my evaluation - if Java EE is worth pursuing in long term.
  2. Java EE Backend Development – I find great joy in creating backend software – RESTful web services in JAX-RS or Restlet, business logic or database integration using ORM (JPA or Hibernate). Not mentioning Big Data “movement” with Apache Hadoop and Spark frameworks. But Java EE offers I was looking up, almost always require Angular or other JS libraries. More and more employers require “Full-stack” engineers. Is simply market for specialized backend engineers is shrinking and should I adapt to it or is it simply reality of software development – backend can be reused and GUI trends (Desktop or Web) change all the time ? 

  3. Java and JavaScript – In my projects, I always used statically typed languages – benefit for compile time checks (C/C++ or Java/C#) is undisputed. What would be your advice for Java engineer in regard to JavaScript ? Unavoidable future or majority of development but not all ?
  4. Thoughts on Golang ?
  5. ForkJoin and Java EE 8
@dwamara
Copy link

dwamara commented Jul 11, 2016

@julio-rocha-coderoad-com, isn't the solution to the problem you posted what Adam mentions in http://www.adam-bien.com/roller/abien/entry/jax_rs_returning_a_list ? I know it bothered me a lot until I stumbled upon that post and it solved my life since then, been using it with Payara and Wildly without any problem.


Now my own question: @adam, during the last session you had in JUG Nürnberg, you said that in your projects logging were only done when the necessity was there or if it was a requirement.
Let's say that it is with requests going through 5 different microservices, how do you implement your logging in that case: do you

  1. make the logging from the individual services (the downside being that it requires each service to implement its own logging methods, which is not only is this redundant, but it also adds complexity and increases the difficulty of changing logging behavior across multiple services) or
  2. do your services forward their logs to a logging service (services still need a way to generate logs, but the logging service is responsible for processing, storing, or sending logs to a centralized logging service) ?

Simply said, what would be in your opinion the better approach to that? Just made an application where logging was not my top priority and now the client would like to have some logging mechanism, by keeping it simple but clean (every microservice is only 75 KB so I wouldn't want to put some overhead on it).

Thanks for your answers, there are always appreciated and unbeknown to you, they always bring my projects a step closer to simplicity.

@dwamara
Copy link

dwamara commented Jul 12, 2016

Hi Adam,

I hope it's allowed to ask 2 questions :) my second question has to do with monitoring an application as it came up at one of my clients today: how do you monitor the time elapsed during the execution of a method (the method is part of a call done in a micro service architecture)? Some of the methods (not all of them) have to be monitored and their execution evaluated.
One of the people during the meeting mentioned Java Simon (https://github.com/virgo47/javasimon) that I didn't knew about but as I had my computer with me during the meeting, I made a small check and using it for one of my methods moved it from a 2-liners to a 9-liners and I don't like to have things in my methods that make them explode.
What could you recommend for such a thing? And trying the add the monitoring and the logging by calling a logging service (case 2. of my previous question), the 2-liners method moved to be a 11-liners.

Thanks for your answer.

@julio-rocha-coderoad-com

@dwamara yes it is, and I see that solution for the first part, but since 2014 to now, do I have to still using that solution?

@karschdn
Copy link

karschdn commented Jul 13, 2016

Hi Adam,

Question regarding BCE

BCE is fine to organize "modules" and providing a common package structure. As far as i understood, the boundary is used as a kind of entry point (transaction startpoint, ...) to use the modules. Correct? CDI seems to be the "tool" to put everything together and building the application structure e.g. adding cross funcitonalities with interceptors.

But adding @stateless to the boundaries prevents them to be processed by CDI Extensions (because they are EJBs and not CDI Objects). This, for example, makes it impossible to add interceptors programmaticaly by a CDI Extension to @Stateless-Objects. I think this is a big disadvantage of the BCE pattern because the boundary plays a central role in this pattern and in application design and i want to have full CDI feature support here. What is your opinion about that? Do you have a solution for that? Or, should it work and do i make some kind of mistakes or conceptual faults (i am using JEE6 at the moment)?

regards
Karsten

(Currently, i am using a CDI Extension to add interceptors to arbitrary CDI classes but does not work with EJBs. Yes, adding interceptor annotation in code works well but this is not what i want to do. Its like adding some functionallity (temporary) to CDIs without byte-code-manipulation)

@haal
Copy link

haal commented Jul 13, 2016

Hi Adam,

could you comment on this presentation?

Nine Neins - where Java EE will never take you (slides |video)

Points from presentation:

  1. Java EE helps building distributed moniliths
  2. Java EE has a threading-model that isn't ideal for microservices
  3. Java EE doesn't support the notion of data in motion (streams)
  4. Java EE doesn't support resilency
  5. Java EE is implemented as containers - no service elasticity
  6. No notion of immutability
  7. Choice of data stores, use of transactions and evental consistency
  8. No outer architecture - while still calling it a platform
  9. Java EE doesn't know services

Thanks

@jlmc
Copy link

jlmc commented Jul 13, 2016

hello Adam, About Monitoring Java EE, it is possible do use wildfly in the same way as you used on glassfish (like in your project lightfish). if it is not, can you talk about the diferences.

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