Using Servlet in TCK of Opentracing?

120 views
Skip to first unread message

Tomas Langer

unread,
Sep 27, 2018, 9:47:29 AM9/27/18
to Eclipse MicroProfile
Hi,
 I am looking into the microprofile spec for Opentracing and the first thing I found is that there are several Servlet classes in TCK.
As MP is not required to support Servlets, how is this used and will I fail TCK if I do not support Servlet API?

Thanks!
Tomas Langer
Project Helidon

Ondro Mihályi

unread,
Sep 28, 2018, 6:07:47 PM9/28/18
to Eclipse MicroProfile
Hi,

I don't know the details about the Opentracing TCK but no MicroProfile implementation is required to provide servlet API. If a TCK requires it it's a bug and the TCK needs to be fixed.

Ondro

Message has been deleted

Mark Struberg

unread,
Oct 8, 2018, 3:15:29 AM10/8/18
to Eclipse MicroProfile
+1

I understand that opentracing needs some integration setup. 
But that should be abstracted away so that it could run on Servlets, Low-level Connection servers, etc
And this abstraction then has to be integrated with the implementation under test.

LieGrue,
strub

Pavol Loffay

unread,
Oct 11, 2018, 11:51:25 AM10/11/18
to Eclipse MicroProfile
Hi, 

these servlets are used to simulate metrics and health endpoints. TCK verifies that these endpoints are not traced.  The main motivation behind this is to avoid adding other spec impls to run the TCK. 

The same concern might apply for other specs. Although not sure how servlet API is used there. It seems that only for tests:

Regards,

Tomas Langer

unread,
Oct 11, 2018, 1:28:53 PM10/11/18
to Eclipse MicroProfile
The problem I have is that we do not have a servlet engine at all, so these resource will be ignored (and as they are not part of any MP specification, it is kind of expected). 
You could achieve the same thing using a JAX-RS resource (JAX-RS actually is the base of MP specification and must be present).
T.

Ondro Mihályi

unread,
Oct 11, 2018, 1:41:03 PM10/11/18
to MicroProfile
I think that the same can be achieved with a JAX-RS app, which is also a kind of servlet and binds to a specific URL. We should fix the tests to use JAX-RS and avoid using Servlets. Instead we should use only MP depencies, e.g. JAX-RS.

If the TCK tests applications that require non-MP dependencies it violates the requirements of MP specs. Although TCK tests may depend on non-MP dependencies, tested application packages shouldn't. Otherwise, the TCK requires more than specified in the spec.

This should be fixed in TCKs of all specs, including OpenTracing, OpenAPI and JWT.

--Ondro

št 11. 10. 2018 o 17:51 Pavol Loffay <plo...@redhat.com> napísal(a):
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/fY2e-e1YLFI/unsubscribe.
To unsubscribe from this group and all its topics, 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/48f783bf-52c8-44bf-b41f-167ae00ae1ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ondro Mihályi

unread,
Oct 11, 2018, 1:50:34 PM10/11/18
to Eclipse MicroProfile
I've raised this at the architecture board: https://github.com/eclipse/microprofile/issues/59

--Ondro

On Thursday, October 11, 2018 at 7:41:03 PM UTC+2, Ondro Mihályi wrote:
I think that the same can be achieved with a JAX-RS app, which is also a kind of servlet and binds to a specific URL. We should fix the tests to use JAX-RS and avoid using Servlets. Instead we should use only MP depencies, e.g. JAX-RS.

If the TCK tests applications that require non-MP dependencies it violates the requirements of MP specs. Although TCK tests may depend on non-MP dependencies, tested application packages shouldn't. Otherwise, the TCK requires more than specified in the spec.

This should be fixed in TCKs of all specs, including OpenTracing, OpenAPI and JWT.

--Ondro

št 11. 10. 2018 o 17:51 Pavol Loffay napísal(a):
Hi, 

these servlets are used to simulate metrics and health endpoints. TCK verifies that these endpoints are not traced.  The main motivation behind this is to avoid adding other spec impls to run the TCK. 

The same concern might apply for other specs. Although not sure how servlet API is used there. It seems that only for tests:

Regards,


On Monday, October 8, 2018 at 9:15:29 AM UTC+2, Mark Struberg wrote:
+1

I understand that opentracing needs some integration setup. 
But that should be abstracted away so that it could run on Servlets, Low-level Connection servers, etc
And this abstraction then has to be integrated with the implementation under test.

LieGrue,
strub


Am Samstag, 29. September 2018 00:07:47 UTC+2 schrieb Ondro Mihályi:
Hi,

I don't know the details about the Opentracing TCK but no MicroProfile implementation is required to provide servlet API. If a TCK requires it it's a bug and the TCK needs to be fixed.

Ondro

--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/fY2e-e1YLFI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile+unsubscribe@googlegroups.com.

James Roper

unread,
Oct 11, 2018, 9:35:09 PM10/11/18
to MicroProfile
I agree - we're considering offering a MicroProfile implementation on top of Akka HTTP, but we have no intention of implementing the Servlet API. A MicroProfile TCK shouldn't assume anything exists that isn't part of MicroProfile.

To unsubscribe from this group and all its topics, 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/48f783bf-52c8-44bf-b41f-167ae00ae1ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.

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


--
James Roper
Senior Developer, Office of the CTO

Lightbend – Build reactive apps!
Twitter: @jroper

Pavol Loffay

unread,
Oct 12, 2018, 4:27:16 AM10/12/18
to Eclipse MicroProfile
I think we choose servlet for simplicity but I agree that a separate jax-rs app can be used.  I have created to https://github.com/eclipse/microprofile-opentracing/issues/107 to track it.

Pavol Loffay

unread,
Nov 13, 2018, 5:00:33 AM11/13/18
to Eclipse MicroProfile
Hi Tomas,

servlets were removed in 1.2.1 release.

Regards,
Reply all
Reply to author
Forward
0 new messages