You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2019/06/18 08:12:08 UTC

[git] New git repository - sling-org-apache-sling-connection-timeout-agent

Hi,

I'd like to create a new repo for the code currently living in the
whiteboard at [0].

Proposed repository name:  sling-org-apache-sling-connection-timeout-agent
Artifact id: org.apache.sling.connection-timeout-agent

The resulting jar file will be a java agent (and probably _not_ and
OSGi bundle ) that is used to set timeout defaults for HTTP connections
made from within a Sling application.

The README [1] has more details on requirements, supported features and
usage.

Thoughts?

Robert

[0]: https://github.com/apache/sling-whiteboard/tree/master/url-connection-agent
[1]: https://github.com/apache/sling-whiteboard/blob/master/url-connection-agent/README.md


Re: [git] New git repository - sling-org-apache-sling-connection-timeout-agent

Posted by Robert Munteanu <ro...@apache.org>.
On Tue, 2019-06-18 at 10:12 +0200, Robert Munteanu wrote:
> Proposed repository name:  sling-org-apache-sling-connection-timeout-
> agent

Repository and code are now at

  https://github.com/apache/sling-org-apache-sling-connection-timeout-agent

Thanks,

Robert


Re: [git] New git repository - sling-org-apache-sling-connection-timeout-agent

Posted by Robert Munteanu <ro...@apache.org>.
Hi Julian,

On Tue, 2019-06-18 at 16:42 +0200, Julian Sedding wrote:
> Hi,
> So just as an FYI, some time ago I implemented OSGi configuration
> support for HttpClient 4.x, which allows having pre-configured
> HttpClient instances injected (or preconfigured
> HttpClientBuilderFactory instances for more complex use-cases). The
> docs and code are at
> https://github.com/code-distillery/httpclient-configuration-support.

That bundle looks quite nice, I will add it to a list of 'alternative
solutions' on the documentation page when that goes up.

I think there's also https://caravan.wcm.io/commons/httpclient/ that I
can add. If anyone knows of more alternatives feel free to reply, I
think it's good to have them listed.

Thanks,

Robert

> 
> Regards
> Julian
> 
> On Tue, Jun 18, 2019 at 12:03 PM Stefan Seifert <
> sseifert@pro-vision.de> wrote:
> > makes sense, i'm fine with it.
> > 
> > stefan
> > 
> > > -----Original Message-----
> > > From: Robert Munteanu [mailto:rombert@apache.org]
> > > Sent: Tuesday, June 18, 2019 11:47 AM
> > > To: dev@sling.apache.org
> > > Subject: Re: [git] New git repository - sling-org-apache-sling-
> > > connection-
> > > timeout-agent
> > > 
> > > Hi Stefan,
> > > 
> > > On Tue, 2019-06-18 at 08:47 +0000, Stefan Seifert wrote:
> > > > sounds reasonable
> > > > (although i'm always a bit hesitent with such low-level
> > > > instrumentation magic - if this magic creates a problem
> > > > sometimes in
> > > > the future it's quite difficult to find out what's the source
> > > > of the
> > > > problem if you are not aware of the presence of it)
> > > 
> > > I agree and I'm looking at this as a last resort. If you run code
> > > you
> > > can't control which is also not setting timeouts you basically
> > > have
> > > three options:
> > > 
> > > 1. try and get the code fixed (might not always be possible or
> > > simple)
> > > 2. Live with possible downtime due to missing timeouts
> > > 3. Apply a little bit of magic and get more stability
> > > 
> > > Up till now we only had 1 and 2. This new module add option 3.
> > > 
> > > Note that I don't think anyone should just apply this for their
> > > Sling
> > > deployments unless they think they have a real need for it.
> > > 
> > > If you own the code, you should 100% apply timeouts yourself.
> > > This is
> > > for code you're running but not controlling.
> > > 
> > > > the README is missing the "OkHttp" support.
> > > 
> > > Added in https://github.com/apache/sling-whiteboard/pull/42 ,
> > > thanks!
> > > 
> > > Robert
> > > 
> > > > stefan
> > > > 
> > > > > -----Original Message-----
> > > > > From: Robert Munteanu [mailto:rombert@apache.org]
> > > > > Sent: Tuesday, June 18, 2019 10:12 AM
> > > > > To: dev@sling.apache.org
> > > > > Subject: [git] New git repository - sling-org-apache-sling-
> > > > > connection-
> > > > > timeout-agent
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I'd like to create a new repo for the code currently living
> > > > > in the
> > > > > whiteboard at [0].
> > > > > 
> > > > > Proposed repository name:  sling-org-apache-sling-connection-
> > > > > timeout-agent
> > > > > Artifact id: org.apache.sling.connection-timeout-agent
> > > > > 
> > > > > The resulting jar file will be a java agent (and probably
> > > > > _not_ and
> > > > > OSGi bundle ) that is used to set timeout defaults for HTTP
> > > > > connections
> > > > > made from within a Sling application.
> > > > > 
> > > > > The README [1] has more details on requirements, supported
> > > > > features
> > > > > and
> > > > > usage.
> > > > > 
> > > > > Thoughts?
> > > > > 
> > > > > Robert
> > > > > 
> > > > > [0]:
> > > > > https://github.com/apache/sling-whiteboard/tree/master/url-connection
> > > > > -
> > > > > agent
> > > > > [1]:
> > > > > https://github.com/apache/sling-whiteboard/blob/master/url-connection
> > > > > -
> > > > > agent/README.md
> > > > > 


Re: [git] New git repository - sling-org-apache-sling-connection-timeout-agent

Posted by Julian Sedding <js...@gmail.com>.
Hi,

I realise that this module provides a catch-all last-resort solution,
which definitely has its place. Especially if the code without
timeouts is not within our control.

So just as an FYI, some time ago I implemented OSGi configuration
support for HttpClient 4.x, which allows having pre-configured
HttpClient instances injected (or preconfigured
HttpClientBuilderFactory instances for more complex use-cases). The
docs and code are at
https://github.com/code-distillery/httpclient-configuration-support.

Regards
Julian

On Tue, Jun 18, 2019 at 12:03 PM Stefan Seifert <ss...@pro-vision.de> wrote:
>
> makes sense, i'm fine with it.
>
> stefan
>
> >-----Original Message-----
> >From: Robert Munteanu [mailto:rombert@apache.org]
> >Sent: Tuesday, June 18, 2019 11:47 AM
> >To: dev@sling.apache.org
> >Subject: Re: [git] New git repository - sling-org-apache-sling-connection-
> >timeout-agent
> >
> >Hi Stefan,
> >
> >On Tue, 2019-06-18 at 08:47 +0000, Stefan Seifert wrote:
> >> sounds reasonable
> >> (although i'm always a bit hesitent with such low-level
> >> instrumentation magic - if this magic creates a problem sometimes in
> >> the future it's quite difficult to find out what's the source of the
> >> problem if you are not aware of the presence of it)
> >
> >I agree and I'm looking at this as a last resort. If you run code you
> >can't control which is also not setting timeouts you basically have
> >three options:
> >
> >1. try and get the code fixed (might not always be possible or simple)
> >2. Live with possible downtime due to missing timeouts
> >3. Apply a little bit of magic and get more stability
> >
> >Up till now we only had 1 and 2. This new module add option 3.
> >
> >Note that I don't think anyone should just apply this for their Sling
> >deployments unless they think they have a real need for it.
> >
> >If you own the code, you should 100% apply timeouts yourself. This is
> >for code you're running but not controlling.
> >
> >>
> >> the README is missing the "OkHttp" support.
> >
> >Added in https://github.com/apache/sling-whiteboard/pull/42 , thanks!
> >
> >Robert
> >
> >>
> >> stefan
> >>
> >> > -----Original Message-----
> >> > From: Robert Munteanu [mailto:rombert@apache.org]
> >> > Sent: Tuesday, June 18, 2019 10:12 AM
> >> > To: dev@sling.apache.org
> >> > Subject: [git] New git repository - sling-org-apache-sling-
> >> > connection-
> >> > timeout-agent
> >> >
> >> > Hi,
> >> >
> >> > I'd like to create a new repo for the code currently living in the
> >> > whiteboard at [0].
> >> >
> >> > Proposed repository name:  sling-org-apache-sling-connection-
> >> > timeout-agent
> >> > Artifact id: org.apache.sling.connection-timeout-agent
> >> >
> >> > The resulting jar file will be a java agent (and probably _not_ and
> >> > OSGi bundle ) that is used to set timeout defaults for HTTP
> >> > connections
> >> > made from within a Sling application.
> >> >
> >> > The README [1] has more details on requirements, supported features
> >> > and
> >> > usage.
> >> >
> >> > Thoughts?
> >> >
> >> > Robert
> >> >
> >> > [0]:
> >> > https://github.com/apache/sling-whiteboard/tree/master/url-connection
> >> > -
> >> > agent
> >> > [1]:
> >> > https://github.com/apache/sling-whiteboard/blob/master/url-connection
> >> > -
> >> > agent/README.md
> >> >
> >
>

RE: [git] New git repository - sling-org-apache-sling-connection-timeout-agent

Posted by Stefan Seifert <ss...@pro-vision.de>.
makes sense, i'm fine with it.

stefan

>-----Original Message-----
>From: Robert Munteanu [mailto:rombert@apache.org]
>Sent: Tuesday, June 18, 2019 11:47 AM
>To: dev@sling.apache.org
>Subject: Re: [git] New git repository - sling-org-apache-sling-connection-
>timeout-agent
>
>Hi Stefan,
>
>On Tue, 2019-06-18 at 08:47 +0000, Stefan Seifert wrote:
>> sounds reasonable
>> (although i'm always a bit hesitent with such low-level
>> instrumentation magic - if this magic creates a problem sometimes in
>> the future it's quite difficult to find out what's the source of the
>> problem if you are not aware of the presence of it)
>
>I agree and I'm looking at this as a last resort. If you run code you
>can't control which is also not setting timeouts you basically have
>three options:
>
>1. try and get the code fixed (might not always be possible or simple)
>2. Live with possible downtime due to missing timeouts
>3. Apply a little bit of magic and get more stability
>
>Up till now we only had 1 and 2. This new module add option 3.
>
>Note that I don't think anyone should just apply this for their Sling
>deployments unless they think they have a real need for it.
>
>If you own the code, you should 100% apply timeouts yourself. This is
>for code you're running but not controlling.
>
>>
>> the README is missing the "OkHttp" support.
>
>Added in https://github.com/apache/sling-whiteboard/pull/42 , thanks!
>
>Robert
>
>>
>> stefan
>>
>> > -----Original Message-----
>> > From: Robert Munteanu [mailto:rombert@apache.org]
>> > Sent: Tuesday, June 18, 2019 10:12 AM
>> > To: dev@sling.apache.org
>> > Subject: [git] New git repository - sling-org-apache-sling-
>> > connection-
>> > timeout-agent
>> >
>> > Hi,
>> >
>> > I'd like to create a new repo for the code currently living in the
>> > whiteboard at [0].
>> >
>> > Proposed repository name:  sling-org-apache-sling-connection-
>> > timeout-agent
>> > Artifact id: org.apache.sling.connection-timeout-agent
>> >
>> > The resulting jar file will be a java agent (and probably _not_ and
>> > OSGi bundle ) that is used to set timeout defaults for HTTP
>> > connections
>> > made from within a Sling application.
>> >
>> > The README [1] has more details on requirements, supported features
>> > and
>> > usage.
>> >
>> > Thoughts?
>> >
>> > Robert
>> >
>> > [0]:
>> > https://github.com/apache/sling-whiteboard/tree/master/url-connection
>> > -
>> > agent
>> > [1]:
>> > https://github.com/apache/sling-whiteboard/blob/master/url-connection
>> > -
>> > agent/README.md
>> >
>


Re: [git] New git repository - sling-org-apache-sling-connection-timeout-agent

Posted by Robert Munteanu <ro...@apache.org>.
Hi Stefan,

On Tue, 2019-06-18 at 08:47 +0000, Stefan Seifert wrote:
> sounds reasonable
> (although i'm always a bit hesitent with such low-level
> instrumentation magic - if this magic creates a problem sometimes in
> the future it's quite difficult to find out what's the source of the
> problem if you are not aware of the presence of it)

I agree and I'm looking at this as a last resort. If you run code you
can't control which is also not setting timeouts you basically have
three options:

1. try and get the code fixed (might not always be possible or simple)
2. Live with possible downtime due to missing timeouts
3. Apply a little bit of magic and get more stability

Up till now we only had 1 and 2. This new module add option 3.

Note that I don't think anyone should just apply this for their Sling
deployments unless they think they have a real need for it.

If you own the code, you should 100% apply timeouts yourself. This is
for code you're running but not controlling.

> 
> the README is missing the "OkHttp" support.

Added in https://github.com/apache/sling-whiteboard/pull/42 , thanks!

Robert

> 
> stefan
> 
> > -----Original Message-----
> > From: Robert Munteanu [mailto:rombert@apache.org]
> > Sent: Tuesday, June 18, 2019 10:12 AM
> > To: dev@sling.apache.org
> > Subject: [git] New git repository - sling-org-apache-sling-
> > connection-
> > timeout-agent
> > 
> > Hi,
> > 
> > I'd like to create a new repo for the code currently living in the
> > whiteboard at [0].
> > 
> > Proposed repository name:  sling-org-apache-sling-connection-
> > timeout-agent
> > Artifact id: org.apache.sling.connection-timeout-agent
> > 
> > The resulting jar file will be a java agent (and probably _not_ and
> > OSGi bundle ) that is used to set timeout defaults for HTTP
> > connections
> > made from within a Sling application.
> > 
> > The README [1] has more details on requirements, supported features
> > and
> > usage.
> > 
> > Thoughts?
> > 
> > Robert
> > 
> > [0]: 
> > https://github.com/apache/sling-whiteboard/tree/master/url-connection
> > -
> > agent
> > [1]: 
> > https://github.com/apache/sling-whiteboard/blob/master/url-connection
> > -
> > agent/README.md
> > 


RE: [git] New git repository - sling-org-apache-sling-connection-timeout-agent

Posted by Stefan Seifert <ss...@pro-vision.de>.
sounds reasonable
(although i'm always a bit hesitent with such low-level instrumentation magic - if this magic creates a problem sometimes in the future it's quite difficult to find out what's the source of the problem if you are not aware of the presence of it)

the README is missing the "OkHttp" support.

stefan

>-----Original Message-----
>From: Robert Munteanu [mailto:rombert@apache.org]
>Sent: Tuesday, June 18, 2019 10:12 AM
>To: dev@sling.apache.org
>Subject: [git] New git repository - sling-org-apache-sling-connection-
>timeout-agent
>
>Hi,
>
>I'd like to create a new repo for the code currently living in the
>whiteboard at [0].
>
>Proposed repository name:  sling-org-apache-sling-connection-timeout-agent
>Artifact id: org.apache.sling.connection-timeout-agent
>
>The resulting jar file will be a java agent (and probably _not_ and
>OSGi bundle ) that is used to set timeout defaults for HTTP connections
>made from within a Sling application.
>
>The README [1] has more details on requirements, supported features and
>usage.
>
>Thoughts?
>
>Robert
>
>[0]: https://github.com/apache/sling-whiteboard/tree/master/url-connection-
>agent
>[1]: https://github.com/apache/sling-whiteboard/blob/master/url-connection-
>agent/README.md
>