Jandex: Is it in MicroProfile's best interest promote its use?

77 views
Skip to first unread message

Gordon Hutchison

unread,
Mar 6, 2019, 9:50:32 AM3/6/19
to Eclipse MicroProfile


It is in our interests to encourage jandex use

or at least help towards making customers more aware of it.

 

This struct me when I was raising microprofile-starter#102


I occasionally look at material from alternatives to MicroProfile-JakartaEE,

like Webflux, Helidon SE, Micronaut and so on.

One of the things they sometimes cite is the start-up cost associated

with archive annotation scanning that is done on startup or app deployment:


 e.g. “What micronaut computes at compile time…Spring/CDI do at runtime”


 

We sometimes do this ourselves too: "...spending up to 40% of startup time scanning"

It seems to me that architectural trends are pushing towards:


1 - more elastic scaling - thus more ‘start-up’ events and scanning

2 – what is deployed on a server is increasingly static (rip and replace servers rather than augment) - so they are more indexable at build time

3 – more CI/CD - meaning that (re)generation of a jandex index could be just another ‘normal’ stage in the pipeline

 

Some customers still have a low awareness of jandex use.


If it aids deploy/startup times in supporting runtimes

and is harmless when in an archive but not exploited,

should we not advertise and encourage its use,

until jandex use is seen as ‘normal’.

 

This could come from routine inclusion in articles,

mvn targets, microprofile-starter, samples on so on.


As well as the concrete benefit for users,

it would be good 'marchitecture' :-)


Gordon


Ken Finnigan

unread,
Mar 6, 2019, 9:54:18 AM3/6/19
to MicroProfile
Personally, I'm not sure there's a huge benefit as it's an implementation detail.

There are also additional concerns about what it should be named, if we were to do it, and whether implementations are able to use a specific name that they haven't defined in their implementation.

--
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/77eeb5a9-3cf5-4f42-9337-a89ecdf92ef2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raymond Auge

unread,
Mar 6, 2019, 10:02:24 AM3/6/19
to Eclipse MicroProfile
In JPMS/OSGi world, runtime class scanning is becoming harder and harder for good reason. Build time indexing is a far superior option.

My 2 cents.
- Ray


For more options, visit https://groups.google.com/d/optout.


--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance (@OSGiAlliance)

Gordon Hutchison

unread,
Mar 6, 2019, 10:03:13 AM3/6/19
to Eclipse MicroProfile
Interesting,
in terms of the file name I have seen many examples of
   META-INF/jandex.idx (the default)
and I have to admit have never seen anything else.

This is probably just my ignorance though, have you got a url
to link me up with the issue re index file naming?

Gordon

Gordon Hutchison

unread,
Mar 7, 2019, 4:55:25 AM3/7/19
to Eclipse MicroProfile


I had envisioned that the main sticking point for this suggestion would be that
it might be harder for some platforms to support than others. So, quite
naturally/reasonably opinion might fall into 'camps':

I think it is right to say that the MicroProfile platforms' CDI implementations
more or less fall into two camps?:

o Weld based (Redhat, IBM, Payara)
o OpenWebBeans/OpenEJB (TomEE, Meecrowave etc.)

I was wondering if the way to make this happen is to think longer term
and ask folks like David Blevins and Mark Struberg what the road map
might be for index use for non-weld platforms.
(I tried but can't find much at https://issues.apache.org/jira for OWB.)

Or would it be preferable to propose a common index use as part of a future spec compliance?
I had thought of CDI but of course not all annotations scanned for are CDI.

Complicated to do things like this as a 'community'. Perhaps it just takes more time
compared to small single vendor 'specs'.  :-)

Gordon.

Alasdair Nottingham

unread,
Mar 7, 2019, 8:14:18 AM3/7/19
to microp...@googlegroups.com
I think this kind of thing should be down to the implementation to enable or not. The starter could generate the right maven chips, or not, based on the implementation chose. But, I don’t think we should require an MP implementation to use Jandex. That should be a choice they can make to speed things up. 

Alasdair Nottingham
Reply all
Reply to author
Forward
0 new messages