Replies: 3 comments 5 replies
-
I was thinking about this some time ago.
Project Leyden seems to targgeting JLink and CDS. So maybe we could start working on it - or follow the progress of this project just for now. But probably there are more options, these are the ones I could think of right now. |
Beta Was this translation helpful? Give feedback.
-
Jandex is indeed not used in Piranha Embedded and that is by design as Piranha Embedded itself does not do annotation scanning unless you add it manually. This is done to make Piranha Embedded completely composable. |
Beta Was this translation helpful? Give feedback.
-
@OndroMih Do you think we can deliver a DefaultAnnotationManager implementation that can work for both the current AnnotationScanExtension and a Jandex based one and then deliver each as a separate extension? I think that would be the best approach as it allows you to swap to either extension if so desired (e.g. if the Jandex license is a concern). |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm thinking how Piranha stands in the serverless and scalable microservices worlds where fast startup times are required. Especially in serverless, where each request processing can lead to a new startup.
I'd like to explore options, in these categories:
I think that, although runtime optimizations are the most natural ones and the only ones that made sense in traditional application servers, build-time optimizations make more sense in cloud scenarios as they shift some work to happen before application is started. And native compilation is an extreme form of build-time optimization, however, not always necessary or even convenient, with its own set of challenges.
Therefore I'd like to focus on build-time optimizations mostly. They can be extended to native compilation with some additional work, for example, if reflection is replaced with bytecode manipulation or bytecode generation. Build-time optimizations could shift annotation scanning and reflection to from runtime to some time before so that optimized application is deployed/stated at runtime. I'm not sure but maybe build-time optimization could be implemented by an extension, which scans the application before it's started and then outputs an optimized application instead of stating it. The same engine could optimize an application deployed on Piranha Server so that it starts faster on next boot.
Does anybody have any thoughts on this? What options do we have to implement this? Would such optimization work as an extension?
I'd be glad for any thoughts or pointers into existing solutions so that I can investigate them and see whether I can improve them towards build-time optimization.
Beta Was this translation helpful? Give feedback.
All reactions