You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Rob Walker <ro...@ascert.com> on 2008/10/15 09:58:46 UTC

Re: Felix HTTP Service improvement

Clement

Certainly raise a Jira issue if you think this is an issue - I may still 
have some mods to do, so might get a chance to look at it on this 
iteration of changes.

I know we do support the standard BundleContext properties:

    org.osgi.service.http.port
    org.osgi.service.http.port.secure

Do you know of another standard OSGi way of doing this that we're not 
currently supporting?

If not - do you have a suggestion for an appropriate Felix specific 
mechanism that won't take us too far from the standard.

Regards

-- Rob


Clement Escoffier wrote:
>
> Rob,
>
>  
>
> We're using the Felix Http service in our group. We have to modify it 
> slightly to add a service property specifying the current port 
> (http.port). Do you think that is can be added to the current HTTP 
> service (I can open a Jira and submit the patch).
>
>  
>
> Regards,
>
>  
>
> Clement
>

-- 


Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com


Re: Felix HTTP Service improvement

Posted by Stuart McCulloch <mc...@gmail.com>.
2008/10/15 Rob Walker <ro...@ascert.com>

> Ok Clement - understand the need.
>
> Please feel free to raise a JIRA issue and maybe paste in this email
> thread. Will take a look if I get a chance - prob won't be this week, but
> might be able to squeeze in a quick look next week
>
> For completeness - I'd say it may be best that the name of the service
> property we push be configurable - that way it can be altered in config to
> fit other schemes. I think I'd got with defaulting the service property
> names to match the OSGi names to be honest - which is simple, consistent,
> and fairly obvious.
>

defaulting to use the OSGi property names sounds reasonable to me

perhaps we should also raise a request against the HttpService spec to
get these service properties formalized? (https://www.osgi.org/bugzilla)

-- Rob
>
> clement escoffier wrote:
>
>> Hi,
>>
>> When we specify the port 0 in org.osgi.service.http.port or
>> org.osgi.service.http.port.secure, the system gives an unused port
>> automatically. This avoids socket binding issues (when a port is already
>> used by another application). However, there is no way to get this port from
>> the published HTTP service.
>>
>> This improvement is very simple. Just publish a service property with the
>> HTTP service indicating the port. For example, the Equinox HTTP service
>> publishes the 'http.port' property. This allows other bundles to get the
>> port and is able to send an endpoint URL to a remote client.
>>
>> May these properties reused the org.osgi.service.http.port or
>> org.osgi.service.http.port.secure names, or follows the Equinox way
>> (http.port) ?
>>
>> Regards,
>>
>> Clement
>>
>> 2008/10/15 Rob Walker <robw@ascert.com <ma...@ascert.com>>
>>
>>    Clement
>>
>>    Certainly raise a Jira issue if you think this is an issue - I may
>>    still have some mods to do, so might get a chance to look at it on
>>    this iteration of changes.
>>
>>    I know we do support the standard BundleContext properties:
>>
>>        org.osgi.service.http.port
>>        org.osgi.service.http.port.secure
>>
>>    Do you know of another standard OSGi way of doing this that we're
>>    not currently supporting?
>>
>>    If not - do you have a suggestion for an appropriate Felix
>>    specific mechanism that won't take us too far from the standard.
>>
>>    Regards
>>
>>    -- Rob
>>
>>
>>
>>    Clement Escoffier wrote:
>>
>>>
>>>    Rob,
>>>
>>>
>>>    We're using the Felix Http service in our group. We have to
>>>    modify it slightly to add a service property specifying the
>>>    current port (http.port). Do you think that is can be added to
>>>    the current HTTP service (I can open a Jira and submit the patch).
>>>
>>>
>>>    Regards,
>>>
>>>
>>>    Clement
>>>
>>>
>>    --
>>
>>    Ascert - Taking systems to the Edge
>>    robw@ascert.com <ma...@ascert.com>
>>    +44 (0)20 7488 3470
>>    www.ascert.com <http://www.ascert.com>
>>
>>
>>
> --
>
>
> Ascert - Taking systems to the Edge
> robw@ascert.com
> +44 (0)20 7488 3470
> www.ascert.com
>
>


-- 
Cheers, Stuart

Re: Felix HTTP Service improvement

Posted by Rob Walker <ro...@ascert.com>.
You're very welcome - was already tinkering in that area of code, and it 
wasn't a large mod
Regards
-- Rob

Clement Escoffier wrote:
>
> It works perfectly.
>
>  
>
> Thank you very much !
>
>  
>
> Regards,
>
>  
>
> Clement
>
>  
>
> *From:* Rob Walker [mailto:robw@ascert.com]
> *Sent:* mardi 21 octobre 2008 10:58
> *To:* Clement Escoffier
> *Cc:* 'SIMON Eric'; dev@felix.apache.org
> *Subject:* Re: Felix HTTP Service improvement
>
>  
>
> Clement
>
> This is done and checked in. Feel free to give it a try
>
> Regards
>
> -- Rob
>
> Clement Escoffier wrote:
>
> I open the https://issues.apache.org/jira/browse/FELIX-769 issue.
>
> I agree with you. By default, reusing OSGi property names makes sense 
> for me too.
>
>  
>
> Thanks,
>
>  
>
> Clement
>
>  
>
> *From:* Rob Walker [mailto:robw@ascert.com]
> *Sent:* mercredi 15 octobre 2008 10:41
> *To:* clement escoffier
> *Cc:* SIMON Eric; dev@felix.apache.org <ma...@felix.apache.org>
> *Subject:* Re: Felix HTTP Service improvement
>
>  
>
> Ok Clement - understand the need.
>
> Please feel free to raise a JIRA issue and maybe paste in this email 
> thread. Will take a look if I get a chance - prob won't be this week, 
> but might be able to squeeze in a quick look next week
>
> For completeness - I'd say it may be best that the name of the service 
> property we push be configurable - that way it can be altered in 
> config to fit other schemes. I think I'd got with defaulting the 
> service property names to match the OSGi names to be honest - which is 
> simple, consistent, and fairly obvious.
>
> -- Rob
>
> clement escoffier wrote:
>
> Hi,
>
> When we specify the port 0 in org.osgi.service.http.port or 
> org.osgi.service.http.port.secure, the system gives an unused port 
> automatically. This avoids socket binding issues (when a port is 
> already used by another application). However, there is no way to get 
> this port from the published HTTP service.
>
> This improvement is very simple. Just publish a service property with 
> the HTTP service indicating the port. For example, the Equinox HTTP 
> service publishes the 'http.port' property. This allows other bundles 
> to get the port and is able to send an endpoint URL to a remote client.
>
> May these properties reused the org.osgi.service.http.port or 
> org.osgi.service.http.port.secure names, or follows the Equinox way 
> (http.port) ?
>
> Regards,
>
> Clement
>
> 2008/10/15 Rob Walker <robw@ascert.com <ma...@ascert.com>>
>
> Clement
>
> Certainly raise a Jira issue if you think this is an issue - I may 
> still have some mods to do, so might get a chance to look at it on 
> this iteration of changes.
>
> I know we do support the standard BundleContext properties:
>
> org.osgi.service.http.port
> org.osgi.service.http.port.secure
>
> Do you know of another standard OSGi way of doing this that we're not 
> currently supporting?
>
> If not - do you have a suggestion for an appropriate Felix specific 
> mechanism that won't take us too far from the standard.
>
> Regards
>
> -- Rob
>
>
>
>
> Clement Escoffier wrote:
>
> Rob,
>
>  
>
> We're using the Felix Http service in our group. We have to modify it 
> slightly to add a service property specifying the current port 
> (http.port). Do you think that is can be added to the current HTTP 
> service (I can open a Jira and submit the patch).
>
>  
>
> Regards,
>
>  
>
> Clement
>
>  
>
> -- 
>  
>  
> Ascert - Taking systems to the Edge
> robw@ascert.com <ma...@ascert.com>
> +44 (0)20 7488 3470
> www.ascert.com <http://www.ascert.com>
>
>  
>
>
>
>
> -- 
>  
>  
> Ascert - Taking systems to the Edge
> robw@ascert.com <ma...@ascert.com>
> +44 (0)20 7488 3470
> www.ascert.com <http://www.ascert.com>
>
>
>
> -- 
>  
>  
> Ascert - Taking systems to the Edge
> robw@ascert.com <ma...@ascert.com>
> +44 (0)20 7488 3470
> www.ascert.com <http://www.ascert.com>

-- 


Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com


RE: Felix HTTP Service improvement

Posted by Clement Escoffier <cl...@gmail.com>.
It works perfectly.

 

Thank you very much !

 

Regards,

 

Clement

 

From: Rob Walker [mailto:robw@ascert.com] 
Sent: mardi 21 octobre 2008 10:58
To: Clement Escoffier
Cc: 'SIMON Eric'; dev@felix.apache.org
Subject: Re: Felix HTTP Service improvement

 

Clement

This is done and checked in. Feel free to give it a try

Regards

-- Rob

Clement Escoffier wrote: 

I open the https://issues.apache.org/jira/browse/FELIX-769 issue. 

I agree with you. By default, reusing OSGi property names makes sense for me
too.

 

Thanks,

 

Clement

 

From: Rob Walker [mailto:robw@ascert.com] 
Sent: mercredi 15 octobre 2008 10:41
To: clement escoffier
Cc: SIMON Eric; dev@felix.apache.org
Subject: Re: Felix HTTP Service improvement

 

Ok Clement - understand the need.

Please feel free to raise a JIRA issue and maybe paste in this email thread.
Will take a look if I get a chance - prob won't be this week, but might be
able to squeeze in a quick look next week

For completeness - I'd say it may be best that the name of the service
property we push be configurable - that way it can be altered in config to
fit other schemes. I think I'd got with defaulting the service property
names to match the OSGi names to be honest - which is simple, consistent,
and fairly obvious.

-- Rob

clement escoffier wrote: 

Hi,

When we specify the port 0 in org.osgi.service.http.port or
org.osgi.service.http.port.secure, the system gives an unused port
automatically. This avoids socket binding issues (when a port is already
used by another application). However, there is no way to get this port from
the published HTTP service. 

This improvement is very simple. Just publish a service property with the
HTTP service indicating the port. For example, the Equinox HTTP service
publishes the 'http.port' property. This allows other bundles to get the
port and is able to send an endpoint URL to a remote client. 

May these properties reused the org.osgi.service.http.port or
org.osgi.service.http.port.secure names, or follows the Equinox way
(http.port) ?

Regards,

Clement

2008/10/15 Rob Walker <ro...@ascert.com>

Clement

Certainly raise a Jira issue if you think this is an issue - I may still
have some mods to do, so might get a chance to look at it on this iteration
of changes.

I know we do support the standard BundleContext properties:

org.osgi.service.http.port
org.osgi.service.http.port.secure

Do you know of another standard OSGi way of doing this that we're not
currently supporting? 

If not - do you have a suggestion for an appropriate Felix specific
mechanism that won't take us too far from the standard.

Regards

-- Rob 




Clement Escoffier wrote: 

Rob,

 

We're using the Felix Http service in our group. We have to modify it
slightly to add a service property specifying the current port (http.port).
Do you think that is can be added to the current HTTP service (I can open a
Jira and submit the patch).

 

Regards,

 

Clement

 

-- 
 
 
Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com

 






-- 
 
 
Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com





-- 
 
 
Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com

Re: Felix HTTP Service improvement

Posted by Rob Walker <ro...@ascert.com>.
Clement

This is done and checked in. Feel free to give it a try

Regards

-- Rob

Clement Escoffier wrote:
>
> I open the https://issues.apache.org/jira/browse/FELIX-769 issue.
>
> I agree with you. By default, reusing OSGi property names makes sense 
> for me too.
>
>  
>
> Thanks,
>
>  
>
> Clement
>
>  
>
> *From:* Rob Walker [mailto:robw@ascert.com]
> *Sent:* mercredi 15 octobre 2008 10:41
> *To:* clement escoffier
> *Cc:* SIMON Eric; dev@felix.apache.org
> *Subject:* Re: Felix HTTP Service improvement
>
>  
>
> Ok Clement - understand the need.
>
> Please feel free to raise a JIRA issue and maybe paste in this email 
> thread. Will take a look if I get a chance - prob won't be this week, 
> but might be able to squeeze in a quick look next week
>
> For completeness - I'd say it may be best that the name of the service 
> property we push be configurable - that way it can be altered in 
> config to fit other schemes. I think I'd got with defaulting the 
> service property names to match the OSGi names to be honest - which is 
> simple, consistent, and fairly obvious.
>
> -- Rob
>
> clement escoffier wrote:
>
> Hi,
>
> When we specify the port 0 in org.osgi.service.http.port or 
> org.osgi.service.http.port.secure, the system gives an unused port 
> automatically. This avoids socket binding issues (when a port is 
> already used by another application). However, there is no way to get 
> this port from the published HTTP service.
>
> This improvement is very simple. Just publish a service property with 
> the HTTP service indicating the port. For example, the Equinox HTTP 
> service publishes the 'http.port' property. This allows other bundles 
> to get the port and is able to send an endpoint URL to a remote client.
>
> May these properties reused the org.osgi.service.http.port or 
> org.osgi.service.http.port.secure names, or follows the Equinox way 
> (http.port) ?
>
> Regards,
>
> Clement
>
> 2008/10/15 Rob Walker <robw@ascert.com <ma...@ascert.com>>
>
> Clement
>
> Certainly raise a Jira issue if you think this is an issue - I may 
> still have some mods to do, so might get a chance to look at it on 
> this iteration of changes.
>
> I know we do support the standard BundleContext properties:
>
> org.osgi.service.http.port
> org.osgi.service.http.port.secure
>
> Do you know of another standard OSGi way of doing this that we're not 
> currently supporting?
>
> If not - do you have a suggestion for an appropriate Felix specific 
> mechanism that won't take us too far from the standard.
>
> Regards
>
> -- Rob
>
>
>
>
> Clement Escoffier wrote:
>
> Rob,
>
>  
>
> We're using the Felix Http service in our group. We have to modify it 
> slightly to add a service property specifying the current port 
> (http.port). Do you think that is can be added to the current HTTP 
> service (I can open a Jira and submit the patch).
>
>  
>
> Regards,
>
>  
>
> Clement
>
>  
>
> -- 
>  
>  
> Ascert - Taking systems to the Edge
> robw@ascert.com <ma...@ascert.com>
> +44 (0)20 7488 3470
> www.ascert.com <http://www.ascert.com>
>
>  
>
>
>
> -- 
>  
>  
> Ascert - Taking systems to the Edge
> robw@ascert.com <ma...@ascert.com>
> +44 (0)20 7488 3470
> www.ascert.com <http://www.ascert.com>

-- 


Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com


RE: Felix HTTP Service improvement

Posted by Clement Escoffier <cl...@gmail.com>.
I open the https://issues.apache.org/jira/browse/FELIX-769 issue. 

I agree with you. By default, reusing OSGi property names makes sense for me
too.

 

Thanks,

 

Clement

 

From: Rob Walker [mailto:robw@ascert.com] 
Sent: mercredi 15 octobre 2008 10:41
To: clement escoffier
Cc: SIMON Eric; dev@felix.apache.org
Subject: Re: Felix HTTP Service improvement

 

Ok Clement - understand the need.

Please feel free to raise a JIRA issue and maybe paste in this email thread.
Will take a look if I get a chance - prob won't be this week, but might be
able to squeeze in a quick look next week

For completeness - I'd say it may be best that the name of the service
property we push be configurable - that way it can be altered in config to
fit other schemes. I think I'd got with defaulting the service property
names to match the OSGi names to be honest - which is simple, consistent,
and fairly obvious.

-- Rob

clement escoffier wrote: 

Hi,

When we specify the port 0 in org.osgi.service.http.port or
org.osgi.service.http.port.secure, the system gives an unused port
automatically. This avoids socket binding issues (when a port is already
used by another application). However, there is no way to get this port from
the published HTTP service. 

This improvement is very simple. Just publish a service property with the
HTTP service indicating the port. For example, the Equinox HTTP service
publishes the 'http.port' property. This allows other bundles to get the
port and is able to send an endpoint URL to a remote client. 

May these properties reused the org.osgi.service.http.port or
org.osgi.service.http.port.secure names, or follows the Equinox way
(http.port) ?

Regards,

Clement

2008/10/15 Rob Walker <ro...@ascert.com>

Clement

Certainly raise a Jira issue if you think this is an issue - I may still
have some mods to do, so might get a chance to look at it on this iteration
of changes.

I know we do support the standard BundleContext properties:

org.osgi.service.http.port
org.osgi.service.http.port.secure

Do you know of another standard OSGi way of doing this that we're not
currently supporting? 

If not - do you have a suggestion for an appropriate Felix specific
mechanism that won't take us too far from the standard.

Regards

-- Rob 




Clement Escoffier wrote: 

Rob,

 

We're using the Felix Http service in our group. We have to modify it
slightly to add a service property specifying the current port (http.port).
Do you think that is can be added to the current HTTP service (I can open a
Jira and submit the patch).

 

Regards,

 

Clement

 

-- 
 
 
Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com

 





-- 
 
 
Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com

Re: Felix HTTP Service improvement

Posted by Rob Walker <ro...@ascert.com>.
Ok Clement - understand the need.

Please feel free to raise a JIRA issue and maybe paste in this email 
thread. Will take a look if I get a chance - prob won't be this week, 
but might be able to squeeze in a quick look next week

For completeness - I'd say it may be best that the name of the service 
property we push be configurable - that way it can be altered in config 
to fit other schemes. I think I'd got with defaulting the service 
property names to match the OSGi names to be honest - which is simple, 
consistent, and fairly obvious.

-- Rob

clement escoffier wrote:
> Hi,
>
> When we specify the port 0 in org.osgi.service.http.port or 
> org.osgi.service.http.port.secure, the system gives an unused port 
> automatically. This avoids socket binding issues (when a port is 
> already used by another application). However, there is no way to get 
> this port from the published HTTP service.
>
> This improvement is very simple. Just publish a service property with 
> the HTTP service indicating the port. For example, the Equinox HTTP 
> service publishes the 'http.port' property. This allows other bundles 
> to get the port and is able to send an endpoint URL to a remote client.
>
> May these properties reused the org.osgi.service.http.port or 
> org.osgi.service.http.port.secure names, or follows the Equinox way 
> (http.port) ?
>
> Regards,
>
> Clement
>
> 2008/10/15 Rob Walker <robw@ascert.com <ma...@ascert.com>>
>
>     Clement
>
>     Certainly raise a Jira issue if you think this is an issue - I may
>     still have some mods to do, so might get a chance to look at it on
>     this iteration of changes.
>
>     I know we do support the standard BundleContext properties:
>
>         org.osgi.service.http.port
>         org.osgi.service.http.port.secure
>
>     Do you know of another standard OSGi way of doing this that we're
>     not currently supporting?
>
>     If not - do you have a suggestion for an appropriate Felix
>     specific mechanism that won't take us too far from the standard.
>
>     Regards
>
>     -- Rob
>
>
>
>     Clement Escoffier wrote:
>>
>>     Rob,
>>
>>      
>>
>>     We're using the Felix Http service in our group. We have to
>>     modify it slightly to add a service property specifying the
>>     current port (http.port). Do you think that is can be added to
>>     the current HTTP service (I can open a Jira and submit the patch).
>>
>>      
>>
>>     Regards,
>>
>>      
>>
>>     Clement
>>
>
>     -- 
>
>
>     Ascert - Taking systems to the Edge
>     robw@ascert.com <ma...@ascert.com>
>     +44 (0)20 7488 3470
>     www.ascert.com <http://www.ascert.com>
>
>

-- 


Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com


Re: Felix HTTP Service improvement

Posted by clement escoffier <cl...@gmail.com>.
Hi,

When we specify the port 0 in org.osgi.service.http.port or
org.osgi.service.http.port.secure, the system gives an unused port
automatically. This avoids socket binding issues (when a port is already
used by another application). However, there is no way to get this port from
the published HTTP service.

This improvement is very simple. Just publish a service property with the
HTTP service indicating the port. For example, the Equinox HTTP service
publishes the 'http.port' property. This allows other bundles to get the
port and is able to send an endpoint URL to a remote client.

May these properties reused the org.osgi.service.http.port or
org.osgi.service.http.port.secure names, or follows the Equinox way
(http.port) ?

Regards,

Clement

2008/10/15 Rob Walker <ro...@ascert.com>

>  Clement
>
> Certainly raise a Jira issue if you think this is an issue - I may still
> have some mods to do, so might get a chance to look at it on this iteration
> of changes.
>
> I know we do support the standard BundleContext properties:
>
> org.osgi.service.http.port
> org.osgi.service.http.port.secure
>
> Do you know of another standard OSGi way of doing this that we're not
> currently supporting?
>
> If not - do you have a suggestion for an appropriate Felix specific
> mechanism that won't take us too far from the standard.
>
> Regards
>
> -- Rob
>
>
>
> Clement Escoffier wrote:
>
>  Rob,
>
>
>
> We're using the Felix Http service in our group. We have to modify it
> slightly to add a service property specifying the current port (http.port).
> Do you think that is can be added to the current HTTP service (I can open a
> Jira and submit the patch).
>
>
>
> Regards,
>
>
>
> Clement
>
>
> --
>
>
> Ascert - Taking systems to the Edgerobw@ascert.com
> +44 (0)20 7488 3470www.ascert.com
>
>