Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] New tutorial: Creating a RESTful remote service provider

On 12/11/2013 1:34 AM, Markus Alexander Kuppe wrote:
On 12/11/2013 06:40 AM, Scott Lewis wrote:
I've gone on to create another remote services tutorial, this time
focusing on the much more advanced topic of how to create a custom
remote service distribution provider [1].
- Rather than getting the HttpService explicitly, I find it much more
convenient to use the Whiteboard pattern to register and de-register a
javax.servlet.Servlet via DS and have it automatically be wired up by
org.apache.felix.http.whiteboard (see for example [1])

For this tutorial specifically, I would like to avoid getting into any more subtleties of DS (e.g. whiteboard pattern). I agree this is a nice approach in general, but as you can probably tell from what's there now that I'm just sort of assuming the HttpService is present at the 'right time', and avoiding completely the timing, binding, whiteboard, etc. aspects of DS.


Unfortunately I expect that DS combined with EPs will cause
initialization problems and start-order brittleness. Shouldn't it be
easily possible to extend ECF core to also lookup containerFactory and
namespace in the OSGi service registry?

Yes that's possible. It's an idea I've been thinking about for dealing with the absence of the extension registry. But to be honest, I consider it peripheral to this tutorial specifically. Also...it's not completely obvious to me that using DS/whiteboard for everything is going to be necessarily 'more familiar' than the extension registry...at least for some consumers. It probably depends upon the target consumer and their level of familiarity with DS vs EPs.



- The Java service API (ITimeService) and the REST interface map 1:1 on
each other. I'm not sure if the tutorial should explore more advanced
cases where one wants to use a mapping, e.g. like I did for my
greenhouse [2].

I think that would be great...perhaps for yet another tutorial. My current mood is to keep these tutorials as short and focused as possible (I find it also makes them easier to develop incrementally...which is helpful to me and easier to review :)...which (hopefully) means that we will end up with a fair number of them.

Thanks,

Scott




M.

[1] http://www.lemmster.de/blog/index.php/2013/12/11/1496
[2]
https://github.com/lemmy/greenhouse/blob/master/org.eclipse.ecf.examples.greenhouse.consumer.ext/src/org/eclipse/ecf/examples/greenhouse/internal/consumer/TelemetryTypeAdapter.java
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev




Back to the top