Hi Community,
Since the announcement a few weeks back of some PoC code that’s targeted to be v4 of Thorntail, there have been many questions around what that means for v2 and how they differ.
Firstly, the existing codebase from WildFly Swarm is being migrated to become Thorntail v2, with it's first release coming soon. It will continue to be developed and updated by the core team at Red Hat as well as by the community for some time.
With respect to v4, yes it is a different architecture to v2. The current code is built on top of WildFly subsystems and utilizes a modular classpath. The current architecture for v4 utilizes the upstream projects of WildFly directly, such as Undertow and RESTEasy, while operating with a flat instead of modular classpath. It also embeds Eclipse MicroProfile implementations more directly than v2 ever could. With the switch to a flat classpath, we also see a significant reduction in the dependencies that we need to develop for Thorntail v4, as it’s become infinitely easier to simply include a framework or library directly into a users application. Additionally, development can be accelerated under this new model. Further details on the v4 architecture will follow.
With v4 we will continue to focus on Eclipse MicroProfile, while additionally focusing on appropriate Cloud Native technologies for OpenShift/Kubernetes. Some of these key pieces are projects such as Weld, RESTEasy, Hibernate, and Undertow. Our goal is still to make it easy for developers to use their years of knowledge investment to walk forward into developing microservices with Enterprise Java.
As v4 is currently not the main focus of the team. If there are features and use cases from v2 that the community would like to see in v4, please let us know by creating an issue so everyone is able to assist and contribute. It can then be determined whether the use cases are appropriate for v4 or are a better fit in another project.
As always, any and all feedback is greatly appreciated.
Thanks
Ken
I can't authoritatively answer your questions, but my understanding is that v4 should be much better when it comes to both memory footprint and speed of tests. When it comes to K8s health checks, I think MicroProfile Health is what you're after, and there's no difference in that between v2 and v4.
LT
--
You received this message because you are subscribed to the Google Groups "Thorntail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thorntail+...@googlegroups.com.
To post to this group, send email to thor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/7b039190-224b-4cf5-b2e5-81e6921bdffa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks, Ken! You are right. I abandoned the topology features as soon as I got into K8S and used their DNS based service lookup. I love it. Super simple. No extra code. Just need name of your service and K8S does the load balancing. I use the WFS YAML to separate local from K8S development, where the only differences are the host name used for connecting to other tiers, such as DB, or Web to Microservice.Any document comparing V2 to V4, particularly in regard to functionality that will or won't be included in V4, would be a very helpful start.
I'm looking forward to and am excited about the memory footprint and performance improvements in V4. As long as core JEE functionality is preserved in V4, and YAML has same functionality, I don't think there will be any issues. That's primarily my concern.
Regarding the POM, will this be largely backwards compatible? Will we be able to just pint to a new version, and watch it magically work if our dependencies are included in V4?
Most of us are probably on JDK 8, self included. Not sure what is involved with a move to JDK 10. Hopefully, it just works.
JeffThank in advanceGot it, thanks Ken.BTW, I just see the article "Eclipse Vert.x goes native" (https://vertx.io/blog/eclipse-vert-x-goes-native/). Vertx could be natived by GraalVM. I think it's wonderful.
Do you think Thorntail (or wildfly-swarm) could go native too? Or someone had tested it and please share result information?
To unsubscribe from this group and stop receiving emails from it, send an email to thorntail+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/6903130d-039e-46b2-847d-fe65956b05da%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/CAKeeVe5aJh37cOg3mrTzgB9m6dewVvfE%3D-689QAr8ErL5Z2v%3Dg%40mail.gmail.com.
Comments inline
Ken, that is good news on the POM migration. YAML changes sound like something we can easily work through. TY for JDK 8 support. The less day 1 change, the better.I could care less about JSF, JSP or any UI components other than REST. The standard is pretty much REST and WebSockets for UI integration, with UI being a different layer (e.g., Angular).What do you mean by "just not EJBs"? I use EJBs heavily. Though, I'll strip out the remoting code if needed as this is dead code from 2002. I only needed support to have it compile for now. The only hard part about stripping it out is I don't have time to rewrite all its functionality using REST APIs. But, the goal is REST/WebSockets only for client interfacing.
A quick google suggests the web profile includes "EJB 3.1 Lite", JPA and JTA, all of which I use. Simply because of unit testing, I have been migrating away from not only remote interfaces, but explicit local interfaces, in favor of @LocalBean. And I use JPA.To be sure, I can see uses cases that don't require these, as I have another microservice that uses CrateDB instead of MariaDB. For that, I don't use JPA, but just JDBC. It seemed like a sacrifice in the beginning to not have JPA. But, when you are using a high performance well indexed document database with sharding, you discover that data-modeling, and thus the benefits of JPA, are far less important. This changes how you view transactions as well, since a commit, instead of encompassing multiple tables, will often only touch one table, which contains a document with a lot of depth.I have discovered that for now at least, a hybrid approach using traditional SQL (and thus JPA/JTA/EJBs) for ACID along with a document database gives you the best of both worlds. I've seen a lot of requirements also including both.My apps all depend on the EJB Timer service excluded from the Web Profile. I'm not sure why anyone would want to remove timers. But missing this could be a show stopper for upgrading to V4. Example use case: User registers. That can be synchronously saved in DB. But, propagating to another API requires scheduling, as other API may not alway be up. I use a timer to handle in-memory task queuing. In short, my apps do a lot asynchronously to ensure API calls are not blocking and communication availability with external APIs has fault-tolerance.
I have an app I haven't converted to microservice, yet, but plan to, that relies on MDBs that read a live in-memory queue and broadcast using Observables. The queue is separately populated with live real-time data. One impact is the UI is constantly updated via web sockets with live data that ultimately originates from an external streaming API, but transformed via the microservices app. This requires queuing to handle the large quantity of real-time data in addition to the source of the data being properly loosely coupled from the web use case via the queues.Leaving out asynchronous or queuing is ignoring real-time applications and their requirements. These are not traditional monolithic use cases. This is not tying into an enterprise bus. It is leveraging modern web capabilities in a real-time world, connecting real-time APIs with web clients being a part of the channel in addition to automated clients (other consumers, service accouts), both for input and output, including the use of web sockets in addition to REST APIs.
On Tuesday, June 5, 2018 at 4:38:05 PM UTC-4, Erik wrote:Ken, that is good news on the POM migration. YAML changes sound like something we can easily work through. TY for JDK 8 support. The less day 1 change, the better.I could care less about JSF, JSP or any UI components other than REST. The standard is pretty much REST and WebSockets for UI integration, with UI being a different layer (e.g., Angular).What do you mean by "just not EJBs"? I use EJBs heavily. Though, I'll strip out the remoting code if needed as this is dead code from 2002. I only needed support to have it compile for now. The only hard part about stripping it out is I don't have time to rewrite all its functionality using REST APIs. But, the goal is REST/WebSockets only for client interfacing.For v4 we wanted to focus the programming model on CDI and not EJB, so right now there is no plans for adding EJB into v4. We appreciate that it might be a problem for applications that have evolved over a great deal of time, but we want to focus on programming models that fit with microservices in the cloud, at least from our perspective.
A quick google suggests the web profile includes "EJB 3.1 Lite", JPA and JTA, all of which I use. Simply because of unit testing, I have been migrating away from not only remote interfaces, but explicit local interfaces, in favor of @LocalBean. And I use JPA.To be sure, I can see uses cases that don't require these, as I have another microservice that uses CrateDB instead of MariaDB. For that, I don't use JPA, but just JDBC. It seemed like a sacrifice in the beginning to not have JPA. But, when you are using a high performance well indexed document database with sharding, you discover that data-modeling, and thus the benefits of JPA, are far less important. This changes how you view transactions as well, since a commit, instead of encompassing multiple tables, will often only touch one table, which contains a document with a lot of depth.I have discovered that for now at least, a hybrid approach using traditional SQL (and thus JPA/JTA/EJBs) for ACID along with a document database gives you the best of both worlds. I've seen a lot of requirements also including both.My apps all depend on the EJB Timer service excluded from the Web Profile. I'm not sure why anyone would want to remove timers. But missing this could be a show stopper for upgrading to V4. Example use case: User registers. That can be synchronously saved in DB. But, propagating to another API requires scheduling, as other API may not alway be up. I use a timer to handle in-memory task queuing. In short, my apps do a lot asynchronously to ensure API calls are not blocking and communication availability with external APIs has fault-tolerance.Using timers in that way isn't something I've seen. Is it purely for delaying when an item of the queue is taken to be processed?Is an external message queue, or something of that nature, an option? I'm curious in your case what happens if the service goes down with items on the in-memory task queue?
On Tuesday, June 5, 2018 at 4:51:35 PM UTC-4, Ken Finnigan wrote:
On Tuesday, June 5, 2018 at 4:38:05 PM UTC-4, Erik wrote:Ken, that is good news on the POM migration. YAML changes sound like something we can easily work through. TY for JDK 8 support. The less day 1 change, the better.I could care less about JSF, JSP or any UI components other than REST. The standard is pretty much REST and WebSockets for UI integration, with UI being a different layer (e.g., Angular).What do you mean by "just not EJBs"? I use EJBs heavily. Though, I'll strip out the remoting code if needed as this is dead code from 2002. I only needed support to have it compile for now. The only hard part about stripping it out is I don't have time to rewrite all its functionality using REST APIs. But, the goal is REST/WebSockets only for client interfacing.For v4 we wanted to focus the programming model on CDI and not EJB, so right now there is no plans for adding EJB into v4. We appreciate that it might be a problem for applications that have evolved over a great deal of time, but we want to focus on programming models that fit with microservices in the cloud, at least from our perspective.I guess I still need clarity because the Web Profile I referenced include "EJB 3.1 Lite". Are you saying there won't even be stateless session beans or JPA entity beans?
A quick google suggests the web profile includes "EJB 3.1 Lite", JPA and JTA, all of which I use. Simply because of unit testing, I have been migrating away from not only remote interfaces, but explicit local interfaces, in favor of @LocalBean. And I use JPA.To be sure, I can see uses cases that don't require these, as I have another microservice that uses CrateDB instead of MariaDB. For that, I don't use JPA, but just JDBC. It seemed like a sacrifice in the beginning to not have JPA. But, when you are using a high performance well indexed document database with sharding, you discover that data-modeling, and thus the benefits of JPA, are far less important. This changes how you view transactions as well, since a commit, instead of encompassing multiple tables, will often only touch one table, which contains a document with a lot of depth.I have discovered that for now at least, a hybrid approach using traditional SQL (and thus JPA/JTA/EJBs) for ACID along with a document database gives you the best of both worlds. I've seen a lot of requirements also including both.My apps all depend on the EJB Timer service excluded from the Web Profile. I'm not sure why anyone would want to remove timers. But missing this could be a show stopper for upgrading to V4. Example use case: User registers. That can be synchronously saved in DB. But, propagating to another API requires scheduling, as other API may not alway be up. I use a timer to handle in-memory task queuing. In short, my apps do a lot asynchronously to ensure API calls are not blocking and communication availability with external APIs has fault-tolerance.Using timers in that way isn't something I've seen. Is it purely for delaying when an item of the queue is taken to be processed?Is an external message queue, or something of that nature, an option? I'm curious in your case what happens if the service goes down with items on the in-memory task queue?Basically, the same way SMTP handles priority queues to provide fault-tolerance. Acts as a retry mechanism until it succeeds, and can lower priority of items after X retries to reduce frequency of retry. This is how your emails sent will typically retry for 4 days before bouncing. If the server goes down, it can reconcile via the DB. This would either be used for things that are already persisted and thus can be re-constructed from persisted data, or for things where the loss at server down if acceptable.If you like, at some point, I can blog on how I use it with sample code, because I created a highly re-usable simple pattern. Once you have it, you can simply add tasks to it. Initially, I put tasks I do not want to block the current HTTP thread. Within it, there is a retry mechanism like SMTP. The timer triggers the next retry. Just like SMTP has intervals for handling its queues.I try to avoid persistent MQ queues as much as possible because they are heavy and cannot handle the large volumes of real-time data. To be sure, though, the real time data is published to topic subscribed to by a persistence handler as well as real-time app handling. Each one can filter according to need. I chose an architecture that uses in-memory MQ today, but has the option of adding remote listeners down the road if needed. Not every real-time message is persisted. Not every real-time message needs to be propagated to the app. This comes down to "subscriptions" and filtering. Not an MQ thing, and app content thing. It's hard to explain in more detail without detailing the app. But, it works really well, can handle high throughput very well, and with clustering via web sockets (Java to Java) is infinitely scalable to serve potentially an unlimited number of end-users or agents (ML/AI). I can also blog on that pattern if you think it will help you or others.For the system I haven't converted to microservices yet, but plan to, that uses in-memory MQ and real-time data, here is some blogging on it:(Link button not working in FF, so may have to copy and paste)In many ways it is primed for microservices conversion, only using a REST API and web sockets. The UI, like my microservice apps, is Angular and separately deployed.
@TransactionAttribute(REQUIRES_NEW)
Ken, I'd be willing to consider Quarts if that was all that was needed to migrate to V4, presuming that plays well with injection and other requirements.I think we still need more clarity on EJBs. You said that V4 includes JPA with Hibernate. Isn't that EJBs? Entity beans are a part of EJB. So that only leaves the question of Stateless session beans, which I use a lot, along with their transaction demarcation. E.g.,@TransactionAttribute(REQUIRES_NEW)
I can't remember the details, but I think there are cases where I use EJB instead of CDI, where I could only get EJB to give the behavior I needed, such as @ApplicationScoped vs @Singleton.
It sounds like you're saying V4 would support @Singleton, but not @ApplicationScoped.
And what about @LocalBean and @EJB injection?
What would help is a list of Java packages and annotation that will not be included. This would allow us to assess more precisely how this impacts our code and if V4 is a direction that makes sense for us. Whether we choose to adapt to V4 or choose another option, we'll need to plan this a bit early to manage our current investment and direction.
Terminology clarification: there are no entity beans! The "entity bean" term comes from EJB pre-3.0 era. WildFly removed entity beans entirely (both CMP and BMP) in version 10 (together with a couple of other things). I'm pretty sure that noone who uses WildFly Swarm / Thorntail actually uses EJB entity beans; everyone uses JPA. JPA continues to be supported in Thorntail v4.
LT
--
You received this message because you are subscribed to the Google Groups "Thorntail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thorntail+...@googlegroups.com.
To post to this group, send email to thor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/0eef5c2b-84e0-4edc-93f5-8f8ef1a05e73%40googlegroups.com.
Also, we could use Quartz, but the reason we didn't use it is because it's frankly an overkill and overly complex. EJB Timer Service fit the bill nicely.
OK, I agree my reply wasn't particularly useful, especially for people who are well-versed in Java EE. I agree that clearly JPA @Entity classes are beans per the JavaBeans specification, but also clearly they are not EJB Entity Beans per the EJB specification. The EJB and JPA specifications, as far as I know, intentionally use the word "entity" when refering to JPA entities, instead of "entity bean", and they also use "EJB 2.1 entity bean".
I personally also tend to refer to JPA entities as just entities, leaving the term "entity beans" for EJB 2.1 entity beans. We might disagree on this terminology usage, but I hope we'd agree that it's a good distinction to make in this discussion.
To try to be a little more helpful, here's my understanding about the Thorntail v4 scope. It's web profile with these exceptions:
LT
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/e946a0cc-52a0-4eb9-854e-4ee72fbc3b6e%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Thorntail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thorntail+...@googlegroups.com.
To post to this group, send email to thor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/6b1742f7-5e68-45c4-a9b3-bf52ce48660e%40googlegroups.com.