Websocket support??
Hi All,Does httpclient support websockets? I want to try websockets out and I am hoping httpclient might support and saw some emails from 2010 talking about it.I am willing to use another package if needed. Regards,-Tony
Re: Support for http 2.0
My guess is IT and developers will be pushed to quickly use the new standard and bypass HC to use a simpler solution in the interim. Regards,-Tony On Tuesday, February 24, 2015 12:39 PM, Tony Anecito adanec...@yahoo.com.INVALID wrote: Thanks Gary looks like discussions are happening but nothing is ever vary fast. -Tony On Tuesday, February 24, 2015 12:08 PM, Gary Gregory garydgreg...@gmail.com wrote: Please see https://marc.info/?l=httpclient-commons-devm=142434644830689w=2 Gary On Tue, Feb 24, 2015 at 10:56 AM, Tony Anecito adanec...@yahoo.com.invalid wrote: Hi All, Is there plans by Apache http components to support http 2.0? Thanks,-Tony -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition http://www.manning.com/bauer3/ JUnit in Action, Second Edition http://www.manning.com/tahchiev/ Spring Batch in Action http://www.manning.com/templier/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
Re: Support for http 2.0
Thanks Gary looks like discussions are happening but nothing is ever vary fast. -Tony On Tuesday, February 24, 2015 12:08 PM, Gary Gregory garydgreg...@gmail.com wrote: Please see https://marc.info/?l=httpclient-commons-devm=142434644830689w=2 Gary On Tue, Feb 24, 2015 at 10:56 AM, Tony Anecito adanec...@yahoo.com.invalid wrote: Hi All, Is there plans by Apache http components to support http 2.0? Thanks,-Tony -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition http://www.manning.com/bauer3/ JUnit in Action, Second Edition http://www.manning.com/tahchiev/ Spring Batch in Action http://www.manning.com/templier/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
Support for http 2.0
Hi All, Is there plans by Apache http components to support http 2.0? Thanks,-Tony
Re: Support for http 2.0
Actually there are other pluses. For one the number of sockets will go down dramatically to one since the data is multiplexed over one socket which the app server people will really want. Also, there is header compression which for mobile devices is very important since most of thier communication is small such that header size affects performance. The data is now binary in the main body which helps with the performance and secuirty aspect. Also, if an organization has upgraded the firewalls and proxies with http/2 and thier browsers support it and they have server side support then they can move forward. But as you said the server side support is sparse but netty and jetty support it now so if that is upgraded for web servers like apache then that covers the server side fairly well. Servlet 4.0 will support http/2 in J2EE 8 but who knows when that will be released. With app servers, java ect getting faster the network bottleneck is more the concern especially resources consumed by all those cell phones and maybe tablets. What will push all this is cost savings. For big companies it may be worth it if it is all internal planned updates anyway. It will be a interesting year to see what IT does. Best Regards,-Tony On Tuesday, February 24, 2015 6:01 PM, Brett Ryan brett.r...@gmail.com wrote: Tony, HTTP/2 is 1.1 backwards compatible. If the client doesn't understand HTTP/2 then it will not elect HTTP/2 features. From my understanding performance gains are only going to be noticed by the new push mechanism that allows the server serve up parts of the content that the server thinks the client needs to render the response. While a client may understand HTTP/2, the server needs to also, AND so does the application running on the server so that the application can manifest what content should be served up with the main request. With all this, considering that there's only a select few of servers supporting HTTP/2, I think the HC project has a little time before HTTP/2 support is going to be something a lot of developers are requiring. On 25 Feb 2015, at 11:43, Tony Anecito adanec...@yahoo.com.INVALID wrote: Good question. Simpler means no frameworks without all the features and focus on simple url type calls to take advantage of the performance to begin with.http 2.0 is mostly about performance. The question is what will be available this month and beginning next month and who will be early adopters.The amount of money saved for big sites is quite a bit. And network and app server folks will love it. Regards,-Tony On Tuesday, February 24, 2015 4:10 PM, Stefan Magnus Landrø stefan.lan...@gmail.com wrote: What do you mean by simpler? Sendt fra min iPhone Den 24. feb. 2015 kl. 20.46 skrev Tony Anecito adanec...@yahoo.com.INVALID: My guess is IT and developers will be pushed to quickly use the new standard and bypass HC to use a simpler solution in the interim. Regards,-Tony On Tuesday, February 24, 2015 12:39 PM, Tony Anecito adanec...@yahoo.com.INVALID wrote: Thanks Gary looks like discussions are happening but nothing is ever vary fast. -Tony On Tuesday, February 24, 2015 12:08 PM, Gary Gregory garydgreg...@gmail.com wrote: Please see https://marc.info/?l=httpclient-commons-devm=142434644830689w=2 Gary On Tue, Feb 24, 2015 at 10:56 AM, Tony Anecito adanec...@yahoo.com.invalid wrote: Hi All, Is there plans by Apache http components to support http 2.0? Thanks,-Tony -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition http://www.manning.com/bauer3/ JUnit in Action, Second Edition http://www.manning.com/tahchiev/ Spring Batch in Action http://www.manning.com/templier/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: Support for http 2.0
Good question. Simpler means no frameworks without all the features and focus on simple url type calls to take advantage of the performance to begin with.http 2.0 is mostly about performance. The question is what will be available this month and beginning next month and who will be early adopters.The amount of money saved for big sites is quite a bit. And network and app server folks will love it. Regards,-Tony On Tuesday, February 24, 2015 4:10 PM, Stefan Magnus Landrø stefan.lan...@gmail.com wrote: What do you mean by simpler? Sendt fra min iPhone Den 24. feb. 2015 kl. 20.46 skrev Tony Anecito adanec...@yahoo.com.INVALID: My guess is IT and developers will be pushed to quickly use the new standard and bypass HC to use a simpler solution in the interim. Regards,-Tony On Tuesday, February 24, 2015 12:39 PM, Tony Anecito adanec...@yahoo.com.INVALID wrote: Thanks Gary looks like discussions are happening but nothing is ever vary fast. -Tony On Tuesday, February 24, 2015 12:08 PM, Gary Gregory garydgreg...@gmail.com wrote: Please see https://marc.info/?l=httpclient-commons-devm=142434644830689w=2 Gary On Tue, Feb 24, 2015 at 10:56 AM, Tony Anecito adanec...@yahoo.com.invalid wrote: Hi All, Is there plans by Apache http components to support http 2.0? Thanks,-Tony -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition http://www.manning.com/bauer3/ JUnit in Action, Second Edition http://www.manning.com/tahchiev/ Spring Batch in Action http://www.manning.com/templier/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Upgrade to latest httpclient and now getting timeouts
Hi All, I just upgraded to 4.3.3 of Httpclient and now getting connection timeouts when using from internet. The older version worked just fine and all I did was change code to use provider and newer connection manager. Anyone have any ideas what might be wrong? Thanks!
Re: [ANNOUNCEMENT] HttpComponents HttpClient 4.3.2 Released
I am using 4.2.5. Have there been any performance improvements since then? Great job on the updates! -Tony On Tuesday, January 21, 2014 1:29 AM, Gary Gregory ggreg...@apache.org wrote: The Apache HttpComponents project is pleased to announce 4.3.2 GA release of HttpComponents HttpClient. [Sorry for the resend, I had the wrong component in the email subject] HttpClient 4.3.2 (GA) is a maintenance release that delivers a number of improvements as well as bug fixes for issues reported since 4.3.1 release. SNI support for Oracle JRE 1.7+ is being among the most notable improvements. Users of HttpClient 4.3 are encouraged to upgrade. Download: http://hc.apache.org/downloads.cgi Release notes: https://www.apache.org/dist/httpcomponents/httpclient/RELEASE_NOTES-4.3.x.txt HttpComponents site: http://hc.apache.org About HttpComponents HttpClient The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support. Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn't provide the full flexibility or functionality needed by many applications. HttpClient seeks to fill this void by providing an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations. Designed for extension while providing robust support for the base HTTP protocol, HttpClient may be of interest to anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or extend the HTTP protocol for distributed communication. Gary Gregory on behalf of the HttpComponents team. -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Editionhttp://www.manning.com/bauer3/ JUnit in Action, Second Edition http://www.manning.com/tahchiev/ Spring Batch in Action http://www.manning.com/templier/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
Re: [ANNOUNCEMENT] HttpComponents HttpClient 4.3.2 Released
Thanks Gary there was nothing about performance improvements at least what I noticed. Just wanted to be sure. -Tony On Tuesday, January 21, 2014 9:33 AM, Tony Anecito adanec...@yahoo.com wrote: I am using 4.2.5. Have there been any performance improvements since then? Great job on the updates! -Tony On Tuesday, January 21, 2014 1:29 AM, Gary Gregory ggreg...@apache.org wrote: The Apache HttpComponents project is pleased to announce 4.3.2 GA release of HttpComponents HttpClient. [Sorry for the resend, I had the wrong component in the email subject] HttpClient 4.3.2 (GA) is a maintenance release that delivers a number of improvements as well as bug fixes for issues reported since 4.3.1 release. SNI support for Oracle JRE 1.7+ is being among the most notable improvements. Users of HttpClient 4.3 are encouraged to upgrade. Download: http://hc.apache.org/downloads.cgi Release notes: https://www.apache.org/dist/httpcomponents/httpclient/RELEASE_NOTES-4.3.x.txt HttpComponents site: http://hc.apache.org About HttpComponents HttpClient The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the Internet today. Web services, network-enabled appliances and the growth of network computing continue to expand the role of the HTTP protocol beyond user-driven web browsers, while increasing the number of applications that require HTTP support. Although the java.net package provides basic functionality for accessing resources via HTTP, it doesn't provide the full flexibility or functionality needed by many applications. HttpClient seeks to fill this void by providing an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations. Designed for extension while providing robust support for the base HTTP protocol, HttpClient may be of interest to anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or extend the HTTP protocol for distributed communication. Gary Gregory on behalf of the HttpComponents team. -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Editionhttp://www.manning.com/bauer3/ JUnit in Action, Second Edition http://www.manning.com/tahchiev/ Spring Batch in Action http://www.manning.com/templier/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
Re: [POLL] Minimal JRE level as of HttpClient 4.4
Real world still using 1.6. Until it is gone from the public if this compiled to 1.7 byte code it will break in clients using 1.6 jre. I want to switch to 1.7 but too many open source projects still using 1.6 bytecode also. --- [ ] keep Java 1.5 compatibility: no good reason to upgrade. [X ] upgrade to Java 1.6: one step at a time. [] upgrade to Java 1.7: new features are more important. --- From: Johannes Kienzle jkien...@salesforce.com To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Monday, September 16, 2013 12:30 PM Subject: Re: [POLL] Minimal JRE level as of HttpClient 4.4 --- [ ] keep Java 1.5 compatibility: no good reason to upgrade. [ ] upgrade to Java 1.6: one step at a time. [X] upgrade to Java 1.7: new features are more important. --- On Mon, Sep 16, 2013 at 1:19 PM, Erik Pilz e...@pilzner.com wrote: --- [ ] keep Java 1.5 compatibility: no good reason to upgrade. [ ] upgrade to Java 1.6: one step at a time. [X] upgrade to Java 1.7: new features are more important. --- On Mon, Sep 16, 2013 at 5:02 AM, Oleg Kalnichevski ol...@apache.org wrote: Folks, Java 1.5 compatibility has become increasing difficult to maintain and increasing pointless on top of that. We, as a project, have been thinking about upgrading minimal JRE level requirement for the HttpClient 4.4 branch to something newer. While Java 1.6 might be a reasonable and a conservative choice in terms of stability and adoption, it actually brings little in terms of new features we could make use of in HttpClient. Besides, Java 1.6 is officially end of life. So, we might as well consider upgrading to Java 1.7 which would give us NIO2, full support for 'try with resources', and probably some other features. Please let us know what you think and respond to this poll. All users of HttpClient are encouraged to participate. Every vote will count. --- [ ] keep Java 1.5 compatibility: no good reason to upgrade. [ ] upgrade to Java 1.6: one step at a time. [ ] upgrade to Java 1.7: new features are more important. --- - To unsubscribe, e-mail: mailto:httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: mailto:httpclient-users-h...@hc.apache.org
Re: Truning off Chunked Encoding...
Thanks I realized that but was trying to avoid doing that. I will stick with latest HttpClient since most my users do not use a proxy and those corps who have http 1.1 issues and chuncked encoding will need to fix thier infrastructure. Many Thanks, -Tony From: Oleg Kalnichevski ol...@apache.org To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Wednesday, May 22, 2013 1:58 AM Subject: Re: Truning off Chunked Encoding... On Mon, May 20, 2013 at 09:49:32AM -0400, David Motes wrote: Use the setChunked method on the entity which defines the content. There is a content size limit of around 2GB if you do not use chunked transfer. DefaultHttpClient cli = new DefaultHttpClient(); HttpPut method = new HttpPut(url); InputStreamEntity reqEntity = new InputStreamEntity(pmis, -1); reqEntity.setContentType(application/octet-stream); reqEntity.setChunked(false); method.setEntity(reqEntity); resp = cli.execute(method); Alternatively, one can make HttpClient use HTTP/1.0, which will automatically disable chunk content coding. Oleg On Sun, May 19, 2013 at 5:19 PM, Tony Anecito adanec...@yahoo.com wrote: Hi All, I recently upgraded from http client 3.1 to 4.2.5 and discovered that some http proxies (earlier version squid proxy does not supported it) will not work with 4.2.5 due to not supporting chunked encoding. So for now how do I tell 4.2.5 not to use chunked encoding? I do not have control over proxies to get them to upgrade that do not support chunked encoding. Thanks, -Tony - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: [ANNOUNCEMENT] HttpComponents HttpCore 4.3-beta1 Released
Hi Oleg, I googled for examples of Restful web service request/response and found maybe one or two references that may work. Seems having the headers of the request setup correctly is important which makes sense. I will look some more before I try coding something. Regards, -Tony Anecito JavaOne 2010 Dukes Award Winner Future of Java Founder MyUniPortal From: Tony Anecito adanec...@yahoo.com To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Tuesday, March 26, 2013 6:54 PM Subject: Re: [ANNOUNCEMENT] HttpComponents HttpCore 4.3-beta1 Released Hi Oleg, Looks like I can not use this. I use Jersey for Rest web services and do not see a way to use what you have. Maybe I am wrong? Thanks, -Tony From: Oleg Kalnichevski ol...@apache.org To: Tony Anecito adanec...@yahoo.com Cc: HttpClient User Discussion mailto:httpclient-users@hc.apache.org Sent: Tuesday, March 26, 2013 1:36 PM Subject: Re: [ANNOUNCEMENT] HttpComponents HttpCore 4.3-beta1 Released On Tue, 2013-03-26 at 11:56 -0700, Tony Anecito wrote: Hi Oleg, I am using commons-httpclient-3.1.jar. Is that needed for your example for 4.3-beta 1? No, it is not. Oleg Regards, -Tony From: Oleg Kalnichevski ol...@apache.org To: Tony Anecito adanec...@yahoo.com Cc: HttpClient User Discussion mailto:httpclient-users@hc.apache.org Sent: Monday, March 25, 2013 2:05 PM Subject: Re: [ANNOUNCEMENT] HttpComponents HttpCore 4.3-beta1 Released On Mon, 2013-03-25 at 12:14 -0700, Tony Anecito wrote: Hi, I have a couple of questions that center around migration to 4.3 beta 1. 1. Can I use a httpclient 4.1 front end with a 4.3 beta 1 server side code? Absolutely. Both sides simply talk HTTP to one another but otherwise are fully independent. 2. I am using http commons and wondering if I need to use that with this 4.3 beta release. I am not sure I understand what you are referring to by http commons 3. What version of jackson JSON works with this 4.3 beta 1? HttpCore is content agnostic. There are restrictions as to how the content of HTTP messages is generated and processed 4. I am using client side http connection pooling. What do you recommend and do you have an example using 4.3 beta 1? Please see this demo app as an example https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.3-beta1/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java Hope this helps Oleg - To unsubscribe, e-mail: mailto:httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: mailto:httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: mailto:httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: mailto:httpclient-users-h...@hc.apache.org
Re: [ANNOUNCEMENT] HttpComponents HttpCore 4.3-beta1 Released
Hi Oleg, I am using commons-httpclient-3.1.jar. Is that needed for your example for 4.3-beta 1? Regards, -Tony From: Oleg Kalnichevski ol...@apache.org To: Tony Anecito adanec...@yahoo.com Cc: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Monday, March 25, 2013 2:05 PM Subject: Re: [ANNOUNCEMENT] HttpComponents HttpCore 4.3-beta1 Released On Mon, 2013-03-25 at 12:14 -0700, Tony Anecito wrote: Hi, I have a couple of questions that center around migration to 4.3 beta 1. 1. Can I use a httpclient 4.1 front end with a 4.3 beta 1 server side code? Absolutely. Both sides simply talk HTTP to one another but otherwise are fully independent. 2. I am using http commons and wondering if I need to use that with this 4.3 beta release. I am not sure I understand what you are referring to by http commons 3. What version of jackson JSON works with this 4.3 beta 1? HttpCore is content agnostic. There are restrictions as to how the content of HTTP messages is generated and processed 4. I am using client side http connection pooling. What do you recommend and do you have an example using 4.3 beta 1? Please see this demo app as an example https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.3-beta1/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java Hope this helps Oleg - To unsubscribe, e-mail: mailto:httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: mailto:httpclient-users-h...@hc.apache.org
Re: [ANNOUNCEMENT] HttpComponents HttpCore 4.3-beta1 Released
Hi, I have a couple of questions that center around migration to 4.3 beta 1. 1. Can I use a httpclient 4.1 front end with a 4.3 beta 1 server side code? 2. I am using http commons and wondering if I need to use that with this 4.3 beta release. 3. What version of jackson JSON works with this 4.3 beta 1? 4. I am using client side http connection pooling. What do you recommend and do you have an example using 4.3 beta 1? Thanks, -Tony From: Oleg Kalnichevski ol...@apache.org To: annou...@apache.org; priv...@hc.apache.org; d...@hc.apache.org; httpclient-users@hc.apache.org Sent: Monday, March 25, 2013 11:55 AM Subject: [ANNOUNCEMENT] HttpComponents HttpCore 4.3-beta1 Released The Apache HttpComponents project is pleased to announce release 4.3-beta1 of HttpComponents HttpCore. This is the first BETA release from the 4.3 release branch. The main theme of the 4.3 release series is streamlining of component configuration and deprecation of the old configuration API based on HttpParams in favor of constructor-based dependency injection and plain objects for configuration parameters. This release also includes performance optimizations intended to reduce TCP packet fragmentation when writing out HTTP messages both in blocking and non-blocking I/O modes, which should result in up to 20% higher throughput for short entity enclosing messages. This release also includes all fixes from the stable 4.2.x release branch. Download - http://hc.apache.org/downloads.cgi Release notes - http://www.apache.org/dist/httpcomponents/httpcore/RELEASE_NOTES.txt HttpComponents site - http://hc.apache.org/ About HttpComponents Core - HttpCore is a set of low level HTTP transport components that can be used to build custom client and server side HTTP services with a minimal footprint. HttpCore supports two I/O models: a blocking I/O model based on the classic Java I/O and a non-blocking, event driven I/O model based on Java NIO. The blocking I/O model may be more appropriate for data intensive, low latency scenarios, whereas the non-blocking model may be more appropriate for high latency scenarios where raw data throughput is less important than the ability to handle thousands of simultaneous HTTP connections in a resource efficient manner. - To unsubscribe, e-mail: mailto:httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: mailto:httpclient-users-h...@hc.apache.org
Re: Almost there just need a little more help...
Ok maybe this is not about NTLM but instead finding the proxy. I get these connot connect then retry verbage when running from within a company. So maybe it can not find the proxy? I tried some solutions but none worked so far because I am using HttpClient(cm) in order to use the multithreaded connection manager but the examples I have found seem to want only DefaultHttpClient. Any suggestions? Thks, Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Re: Almost there just need a little more help... To: HttpClient User Discussion httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 9:17 PM Ok I found his example that might almost do what I need but I want the user id and password coming from a popup dialog like the one I have seen coming from Metro (JAX-WS). client.getParams().setAuthenticationPreemptive(true); client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(user.getUsername(), user.getPassword())); I will keep looking. -Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Re: Almost there just need a little more help... To: HttpClient User Discussion httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 8:58 PM I did find an example called ClientAuthentication but it looks like it assumes you always have to authenticate but I only want to do that if needed. So if in a coffee shop where NTLM is not needed for example I do not want to do that but if in a location where NTLM is needed I do want to do the call httpclient.getCredentialsProvider().setCredentials(). Thanks for the advice. -Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Almost there just need a little more help... To: httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 8:47 PM Hi All, I am currently using JAX-WS and have been working on using JAX-RS using Jersey and Apache Http Client. I have gotten requests to work between between my client and jax-rs service. When I tried in an environment where NTLM is used I could not get my http requests to go through the network. Now I remember having to work through this with JAX-WS but I am not sure what to get http client to work using NTLM. What I want to have happen is the first time I try to connect using apache http client I want a dialog to show asking for login/password and after that is done be able to create requests that go all the way through to my remote server running my web services. So how can I do that? Is there an example somewhere on how to make it work that way without a lot of coding? Thanks for the help. -Tony
Re: Almost there just need a little more help...
Problem solved. It turned out I needed to supply proxy name and port. Regards, -Tony --- On Tue, 1/1/13, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Re: Almost there just need a little more help... To: HttpClient User Discussion httpclient-users@hc.apache.org Date: Tuesday, January 1, 2013, 1:18 AM Ok maybe this is not about NTLM but instead finding the proxy. I get these connot connect then retry verbage when running from within a company. So maybe it can not find the proxy? I tried some solutions but none worked so far because I am using HttpClient(cm) in order to use the multithreaded connection manager but the examples I have found seem to want only DefaultHttpClient. Any suggestions? Thks, Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Re: Almost there just need a little more help... To: HttpClient User Discussion httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 9:17 PM Ok I found his example that might almost do what I need but I want the user id and password coming from a popup dialog like the one I have seen coming from Metro (JAX-WS). client.getParams().setAuthenticationPreemptive(true); client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(user.getUsername(), user.getPassword())); I will keep looking. -Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Re: Almost there just need a little more help... To: HttpClient User Discussion httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 8:58 PM I did find an example called ClientAuthentication but it looks like it assumes you always have to authenticate but I only want to do that if needed. So if in a coffee shop where NTLM is not needed for example I do not want to do that but if in a location where NTLM is needed I do want to do the call httpclient.getCredentialsProvider().setCredentials(). Thanks for the advice. -Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Almost there just need a little more help... To: httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 8:47 PM Hi All, I am currently using JAX-WS and have been working on using JAX-RS using Jersey and Apache Http Client. I have gotten requests to work between between my client and jax-rs service. When I tried in an environment where NTLM is used I could not get my http requests to go through the network. Now I remember having to work through this with JAX-WS but I am not sure what to get http client to work using NTLM. What I want to have happen is the first time I try to connect using apache http client I want a dialog to show asking for login/password and after that is done be able to create requests that go all the way through to my remote server running my web services. So how can I do that? Is there an example somewhere on how to make it work that way without a lot of coding? Thanks for the help. -Tony
Re: Almost there just need a little more help...
I did find an example called ClientAuthentication but it looks like it assumes you always have to authenticate but I only want to do that if needed. So if in a coffee shop where NTLM is not needed for example I do not want to do that but if in a location where NTLM is needed I do want to do the call httpclient.getCredentialsProvider().setCredentials(). Thanks for the advice. -Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Almost there just need a little more help... To: httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 8:47 PM Hi All, I am currently using JAX-WS and have been working on using JAX-RS using Jersey and Apache Http Client. I have gotten requests to work between between my client and jax-rs service. When I tried in an environment where NTLM is used I could not get my http requests to go through the network. Now I remember having to work through this with JAX-WS but I am not sure what to get http client to work using NTLM. What I want to have happen is the first time I try to connect using apache http client I want a dialog to show asking for login/password and after that is done be able to create requests that go all the way through to my remote server running my web services. So how can I do that? Is there an example somewhere on how to make it work that way without a lot of coding? Thanks for the help. -Tony
Re: Almost there just need a little more help...
Ok I found his example that might almost do what I need but I want the user id and password coming from a popup dialog like the one I have seen coming from Metro (JAX-WS). client.getParams().setAuthenticationPreemptive(true); client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(user.getUsername(), user.getPassword())); I will keep looking. -Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Re: Almost there just need a little more help... To: HttpClient User Discussion httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 8:58 PM I did find an example called ClientAuthentication but it looks like it assumes you always have to authenticate but I only want to do that if needed. So if in a coffee shop where NTLM is not needed for example I do not want to do that but if in a location where NTLM is needed I do want to do the call httpclient.getCredentialsProvider().setCredentials(). Thanks for the advice. -Tony --- On Mon, 12/31/12, Tony Anecito adanec...@yahoo.com wrote: From: Tony Anecito adanec...@yahoo.com Subject: Almost there just need a little more help... To: httpclient-users@hc.apache.org Date: Monday, December 31, 2012, 8:47 PM Hi All, I am currently using JAX-WS and have been working on using JAX-RS using Jersey and Apache Http Client. I have gotten requests to work between between my client and jax-rs service. When I tried in an environment where NTLM is used I could not get my http requests to go through the network. Now I remember having to work through this with JAX-WS but I am not sure what to get http client to work using NTLM. What I want to have happen is the first time I try to connect using apache http client I want a dialog to show asking for login/password and after that is done be able to create requests that go all the way through to my remote server running my web services. So how can I do that? Is there an example somewhere on how to make it work that way without a lot of coding? Thanks for the help. -Tony
ApacheHttp and Tomcat 7 tests...
Hi Oleg, Summary The following test results show me that using the localhost as the server name and the ApacheHttp client running on the server as done with the ApacheHttp tests by Apache components group gets close to or bettter than expected. Using localhost I am guessing bypasses using the network and running 500,000 requests over 20 threads gets a low average. I still need to have the servlet setup to send data but I am wondering if the Apache component tests used Tomcat at all and instand just read a file from Apache Web Server. I will look further into this also to make sure I get closer to what the tests did. Since I think I am getting closer to how Tomcat responds for a bare servlet with no code in it and maybe no network component I am more comfortable in understanding what Tomcat can truely do from a performance perspective. If I go back to my 6 core server and run the same test (client running on the server where Tomcat is as the I did previously on my old laptop I get: httpClient execute time in nanoseconds: 209391137 httpClient execute time in nanoseconds: 1595734 httpClient execute time in nanoseconds: 1298489 httpClient execute time in nanoseconds: 1238355 httpClient execute time in nanoseconds: 1262800 httpClient execute time in nanoseconds: 1196312 httpClient execute time in nanoseconds: 1253512 httpClient execute time in nanoseconds: 1457866 httpClient execute time in nanoseconds: 1215867 httpClient execute time in nanoseconds: 1254000 Concurrency level: 1 Time taken for tests: 0.234 seconds Complete requests: 10 Failed requests: 0 Content transferred: 0 bytes Requests per second: 42.735043 [#/sec] (mean) Time per request: 23.4 [ms] (mean) If I run next with the server name set to localhost instead of a internet url as done on the Apache tests I get (This should cause the network to be bypassed perhaps even the TCP/IP Stack? note the much lower response times): httpClient execute time in nanoseconds: 100221746 httpClient execute time in nanoseconds: 890756 httpClient execute time in nanoseconds: 688845 httpClient execute time in nanoseconds: 688844 httpClient execute time in nanoseconds: 689823 httpClient execute time in nanoseconds: 614044 httpClient execute time in nanoseconds: 585200 httpClient execute time in nanoseconds: 604266 httpClient execute time in nanoseconds: 657066 httpClient execute time in nanoseconds: 408223 Concurrency level: 1 Time taken for tests: 0.109 seconds Complete requests: 10 Failed requests: 0 Content transferred: 0 bytes Requests per second: 91.74312 [#/sec] (mean) Time per request: 10.9 [ms] (mean) If I now run a 500,000 request thread over 20 sockets (localhost and running the client app on the Tomcat serverI get: Concurrency level: 20 Time taken for tests: 14.549 seconds Complete requests: 50 Failed requests: 0 Content transferred: 0 bytes Requests per second: 34366.625 [#/sec] (mean) Time per request: 0.029098 [ms] (mean) - Original Message From: Tony Anecito adanec...@yahoo.com To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Thu, March 3, 2011 10:49:53 PM Subject: Re: Slowness of 4.1 Hi Oleg, Here is some numbers when running TestHttpClient4. I am running from Eclipse using jdk 1. 6.0.22 and a Aspire 5670 which has Intel Core Duo T2300 (1.66 GHz, 667 MHz FSB, 2MB L2 cache) and 2GB of DDR2 memory. Note how for a single thread running 10 requests the response time starts out very slow at 150msec then gets to 1.43msec at the end. httpClient execute time in nanoseconds: 150181377 httpClient execute time in nanoseconds: 2180445 httpClient execute time in nanoseconds: 1540419 httpClient execute time in nanoseconds: 1757207 httpClient execute time in nanoseconds: 1759721 httpClient execute time in nanoseconds: 1492368 httpClient execute time in nanoseconds: 1493765 httpClient execute time in nanoseconds: 1474489 httpClient execute time in nanoseconds: 1456610 httpClient execute time in nanoseconds: 1437613 Document URI: xxx Document Length: 0 bytes Concurrency level: 1 Time taken for tests: 0.187 seconds Complete requests: 10 Failed requests: 0 Content transferred: 0 bytes Requests per second: 53.475933 [#/sec] (mean) Time per request: 18.7 [ms] (mean) When I increase the number of threads to 50 and requests to 50 I get a max req of 2.2K per second and around 400microseconds. The CPU utilization is between 50-60% on the laptop and around 5-7% on my 6 core server with Tomcat 7. Tommow I will setup the test to run from a faster client and see the results. - Original Message From: Tony Anecito adanec...@yahoo.com To: HttpClient User Discussion mailto:httpclient-users@hc.apache.org Sent: Thu, March 3, 2011 1:06:41 PM Subject: Re: Slowness of 4.1 Thanks Oleg for your explanation about comparitive vs real life. Most of the testing I do is for real life since the end goal is user experience thus my comments. I can understand what Apache goals are better now and adjust
Slowness of 4.1
Hi All, I downloaded httpclient 4.1 and noticed it is significantly slower than 3.1. I even used the threadsafe connection manager hoping for better performance. I used to get below 3msec and now it is above 150msec. Is keepalive used by default? If not where can I find an example that sets it using either a scheme, connection manager httpclient instance or the httpget object? What kind of response time should I expect hitting a servlet with no code in the method on a 2.8Ghz 6 core AMD server? Any ideas on what it might be? I used code sample from the site and it works just very slow. Thanks, -Tony - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: Slowness of 4.1
Hi, Where can I find the client side code for this test? I think I found it once before and discovered the way the response times were calculated were incorrect. What I saw indicated your test results were divideing the number of requests into the time it took for all of them to complete when the tests were run in parallel so it made it look like the requests were faster than they really were. It was like taking ten 100ms requests run in parallel and getting 10ms per request when in reality it was 100ms. In either case I will see what if I can find again the client side code soemwhere and compare it to what I have unless you have a link to it. Thanks, -Tony - Original Message From: Oleg Kalnichevski ol...@apache.org To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Thu, March 3, 2011 2:46:03 AM Subject: Re: Slowness of 4.1 On Thu, 2011-03-03 at 01:38 -0800, Tony Anecito wrote: Hi All, I downloaded httpclient 4.1 and noticed it is significantly slower than 3.1. I even used the threadsafe connection manager hoping for better performance. I used to get below 3msec and now it is above 150msec. Is keepalive used by default? If not where can I find an example that sets it using either a scheme, connection manager httpclient instance or the httpget object? What kind of response time should I expect hitting a servlet with no code in the method on a 2.8Ghz 6 core AMD server? Any ideas on what it might be? I used code sample from the site and it works just very slow. Thanks, -Tony HttpClient 4.1 is known to be comfortably faster than 3.1. There is likely to be a problem with how you are measuring performance / response time. http://wiki.apache.org/HttpComponents/HttpClient3vsHttpClient4vsHttpCore Oleg - To unsubscribe, e-mail: mailto:httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: mailto:httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: Slowness of 4.1
Hi Oleg, I think I found the test client code for 4.x it is: http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient-benchmark/src/main/java/org/apache/http/client/benchmark/TestHttpClient4.java Thanks for the help I will let you know how things turn out. -Tony - Original Message From: Tony Anecito adanec...@yahoo.com To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Thu, March 3, 2011 10:20:18 AM Subject: Re: Slowness of 4.1 Hi, Where can I find the client side code for this test? I think I found it once before and discovered the way the response times were calculated were incorrect. What I saw indicated your test results were divideing the number of requests into the time it took for all of them to complete when the tests were run in parallel so it made it look like the requests were faster than they really were. It was like taking ten 100ms requests run in parallel and getting 10ms per request when in reality it was 100ms. In either case I will see what if I can find again the client side code soemwhere and compare it to what I have unless you have a link to it. Thanks, -Tony - Original Message From: Oleg Kalnichevski ol...@apache.org To: HttpClient User Discussion mailto:httpclient-users@hc.apache.org Sent: Thu, March 3, 2011 2:46:03 AM Subject: Re: Slowness of 4.1 On Thu, 2011-03-03 at 01:38 -0800, Tony Anecito wrote: Hi All, I downloaded httpclient 4.1 and noticed it is significantly slower than 3.1. I even used the threadsafe connection manager hoping for better performance. I used to get below 3msec and now it is above 150msec. Is keepalive used by default? If not where can I find an example that sets it using either a scheme, connection manager httpclient instance or the httpget object? What kind of response time should I expect hitting a servlet with no code in the method on a 2.8Ghz 6 core AMD server? Any ideas on what it might be? I used code sample from the site and it works just very slow. Thanks, -Tony HttpClient 4.1 is known to be comfortably faster than 3.1. There is likely to be a problem with how you are measuring performance / response time. http://wiki.apache.org/HttpComponents/HttpClient3vsHttpClient4vsHttpCore Oleg - To unsubscribe, e-mail: mailto:mailto:httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: mailto:mailto:httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: Slowness of 4.1
Thanks Oleg for your explanation about comparitive vs real life. Most of the testing I do is for real life since the end goal is user experience thus my comments. I can understand what Apache goals are better now and adjust my expectations accordingly. I did find what I needed as far as examples and hope to get back to response time numbers I have seen with other client side libraries and configurations. I will look at the links you provided to better understand what Apache hopes to do. The only recommendation for stats I would make is have a time measurement for how long each thread takes to execute a request. And show three new stats. One for average time based on that measurement, a 90% of measurements measurement (Gives indication of distribution) and average response time over load for each average. Just some thoughts you and the team can decide how if at all those suggestions might fit your testing goals. Regards, -Tony - Original Message From: Oleg Kalnichevski ol...@apache.org To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Thu, March 3, 2011 1:52:37 PM Subject: Re: Slowness of 4.1 On Thu, 2011-03-03 at 09:20 -0800, Tony Anecito wrote: Hi, Where can I find the client side code for this test? I think I found it once before and discovered the way the response times were calculated were incorrect. What I saw indicated your test results were divideing the number of requests into the time it took for all of them to complete when the tests were run in parallel so it made it look like the requests were faster than they really were. It was like taking ten 100ms requests run in parallel and getting 10ms per request when in reality it was 100ms. I did see your remarks about the benchmark on the tomcat user list. (1) the benchmark tries to closely simulate Apache Bench (ab), which is a well established and widely used tool for performance measurement. http://en.wikipedia.org/wiki/ApacheBench (2) the benchmark is not intended to calculate 'real-life' or 'accurate' response time, whatever that means. The purpose of the benchmark is to provide a _baseline_ for a comparative performance analysis and is intended to give a _rough_ indication as to whether an HTTP client A faster than an client HTTP, or whether data throughput increased or decreased after particular set of changes. That is it. Having said all that you are very welcome to suggest improvements to the benchmark or a more accurate algorithm for calculating performance numbers. Oleg In either case I will see what if I can find again the client side code soemwhere and compare it to what I have unless you have a link to it. Thanks, -Tony - Original Message From: Oleg Kalnichevski ol...@apache.org To: HttpClient User Discussion mailto:httpclient-users@hc.apache.org Sent: Thu, March 3, 2011 2:46:03 AM Subject: Re: Slowness of 4.1 On Thu, 2011-03-03 at 01:38 -0800, Tony Anecito wrote: Hi All, I downloaded httpclient 4.1 and noticed it is significantly slower than 3.1. I even used the threadsafe connection manager hoping for better performance. I used to get below 3msec and now it is above 150msec. Is keepalive used by default? If not where can I find an example that sets it using either a scheme, connection manager httpclient instance or the httpget object? What kind of response time should I expect hitting a servlet with no code in the method on a 2.8Ghz 6 core AMD server? Any ideas on what it might be? I used code sample from the site and it works just very slow. Thanks, -Tony HttpClient 4.1 is known to be comfortably faster than 3.1. There is likely to be a problem with how you are measuring performance / response time. http://wiki.apache.org/HttpComponents/HttpClient3vsHttpClient4vsHttpCore Oleg - To unsubscribe, e-mail: mailto:mailto:httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: mailto:mailto:httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org