Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Last active January 11, 2017 21:44
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/a7a638836c24b9a80133418844a1c2ed to your computer and use it in GitHub Desktop.
Save AdamBien/a7a638836c24b9a80133418844a1c2ed to your computer and use it in GitHub Desktop.
34thAirhacksQ&A.md
@kgoralski
Copy link

kgoralski commented Jan 7, 2017

Hi Adam,

Recently I found interesting article about microservices where Spring Cloud and Kubernetes is compared:
https://developers.redhat.com/blog/2016/12/09/spring-cloud-for-microservices-compared-to-kubernetes/

Here is a nice table with comparison:
http://blog-redhatdevelopers.rhcloud.com/wp-content/uploads/2016/12/screen-shot-2016-12-06-at-10-32-19.png

There are "microservices concerns" like:
configuration management, service discovery, load balancing, api gateway, service security, centralized logging, centralized metrics, distributed tracing, resilence & fault tolerance, auto scaling & self healing, packaging, deployment & scheduling, job management, singleton application.

Could you compare Java EE environment to it? or how it can fit to it? or solve such problems?
I guess "it depends" and it is always a matter of scale or maybe we can use kubernetes or something else with Java EE with success?

Thank you

@AdamBien
Copy link
Author

AdamBien commented Jan 8, 2017

Using Concurrency utilities (JSR-236) in Java EE context:

"...I need to establish communication to a third-party system with socket communication using TCP/IP or UDP both as server and client, so I have to listen on a socket for client messages and also send messages to clients.

Before JEE 7, the standard urged me to write such code in a Resource Adapter using Work threads because I was not allowed to have long running threads in the EJB environment.

Now with JEE 7 and JSR-236, I have the possiblity to get long running threads directly in the EJB environment. So I think it should be possible/allowed to get such a managed long running (never ending) thread and listen on a socket for incoming requests.
..."

@AdamBien
Copy link
Author

AdamBien commented Jan 9, 2017

@davidsoles
Copy link

I have been working recently with Spring Boot and it is incredibly useful. I offer this technology to clients with small needs and is a very reliable. I guess as an entry point it is a better option than WordPress or PHP. What are your thoughts about this product? I must admit that not having to deal with XML files is a plus. (Convention over configuration). Would you recommend it? Any know disadvantage?

Thanks, Adam.
Big fan of your channel.

@kdaham
Copy link

kdaham commented Jan 11, 2017

In regards of the HTML5.war + docker question, personally I do something like this (two separate war-builds, one backend and one html5 + js)

o cat Dockerfile
FROM wildfly
COPY backend/build/libs/backend.war ${DEPLOYMENT_DIR}
RUN touch ${DEPLOYMENT_DIR}/gui.war.dodeploy

And then run docker with a mapping to my webapps folder something like this
docker run -d -p 8080:8080 -v $(pwd)/gui/src/main/webapp:/opt/wildfly-10.1.0.Final/standalone/deployments/gui.war:rw

The main reason is that for some reason I write code differently when im in html5/js-mode, more reloads to look at the ui :)
So with this method I have a shorter write/run-cycle with just the idea and a browser window next to eachother.

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