Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3189 > unrolled thread
| Started by | "Stephen.Wu" <54wutong@gmail.com> |
|---|---|
| First post | 2011-04-14 01:43 -0700 |
| Last post | 2011-04-15 12:01 +1000 |
| Articles | 6 — 2 participants |
Back to article view | Back to comp.lang.python
about soaplib demo's time latency "Stephen.Wu" <54wutong@gmail.com> - 2011-04-14 01:43 -0700
Re: about soaplib demo's time latency Chris Angelico <rosuav@gmail.com> - 2011-04-14 19:18 +1000
Re: about soaplib demo's time latency "Stephen.Wu" <54wutong@gmail.com> - 2011-04-14 06:30 -0700
Re: about soaplib demo's time latency Chris Angelico <rosuav@gmail.com> - 2011-04-14 23:39 +1000
Re: about soaplib demo's time latency "Stephen.Wu" <54wutong@gmail.com> - 2011-04-14 18:14 -0700
Re: about soaplib demo's time latency Chris Angelico <rosuav@gmail.com> - 2011-04-15 12:01 +1000
| From | "Stephen.Wu" <54wutong@gmail.com> |
|---|---|
| Date | 2011-04-14 01:43 -0700 |
| Subject | about soaplib demo's time latency |
| Message-ID | <bf5cd550-a417-419d-932a-4458b1f8a1d6@hd10g2000vbb.googlegroups.com> |
I just follow the instructions below - http://soaplib.github.com/soaplib/2_0/pages/helloworld.html to establish a soap server. After starting the server, everytime I run the client script, I fetch the response nearly 20 seconds afterward. Why this happen? I just want the server send response asap then the client will show the result to me immediately. please give some hints. thanks
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-04-14 19:18 +1000 |
| Message-ID | <mailman.354.1302772742.9059.python-list@python.org> |
| In reply to | #3189 |
On Thu, Apr 14, 2011 at 6:43 PM, Stephen.Wu <54wutong@gmail.com> wrote: > I just follow the instructions below - http://soaplib.github.com/soaplib/2_0/pages/helloworld.html > to establish a soap server. After starting the server, everytime I run > the client script, I fetch the response nearly 20 seconds afterward. > Why this happen? > I just want the server send response asap then the client will show > the result to me immediately. > > please give some hints. thanks Not sure if it's what you're seeing, but you might have an issue with reverse DNS. When the client connects, the server tries to look up its PTR record for its log. You can speed this up by either having such a record, or having an authoritative DNS server that returns an immediate failure; either option is fairly easy if you run BIND, but you might be able to do it with your hosts file (/etc/hosts or c:\windows\system32\drivers\etc\hosts) instead - just put in an entry for your client computer and some hostname. Hope that helps! Chris Angelico
[toc] | [prev] | [next] | [standalone]
| From | "Stephen.Wu" <54wutong@gmail.com> |
|---|---|
| Date | 2011-04-14 06:30 -0700 |
| Message-ID | <74ed4581-6b56-4743-9708-978f653fb9d7@n2g2000prj.googlegroups.com> |
| In reply to | #3191 |
On Apr 14, 5:18 pm, Chris Angelico <ros...@gmail.com> wrote:
> On Thu, Apr 14, 2011 at 6:43 PM, Stephen.Wu <54wut...@gmail.com> wrote:
> > I just follow the instructions below -http://soaplib.github.com/soaplib/2_0/pages/helloworld.html
> > to establish a soap server. After starting the server, everytime I run
> > the client script, I fetch the response nearly 20 seconds afterward.
> > Why this happen?
> > I just want the server send response asap then the client will show
> > the result to me immediately.
>
> > please give some hints. thanks
>
> Not sure if it's what you're seeing, but you might have an issue with
> reverse DNS. When the client connects, the server tries to look up its
> PTR record for its log. You can speed this up by either having such a
> record, or having an authoritative DNS server that returns an
> immediate failure; either option is fairly easy if you run BIND, but
> you might be able to do it with your hosts file (/etc/hosts or
> c:\windows\system32\drivers\etc\hosts) instead - just put in an entry
> for your client computer and some hostname.
>
> Hope that helps!
>
> Chris Angelico
Thanks Chris.
I recheck the logic line by line and I find it is this sentence drag
speed down : hello_client = Client('http://localhost:7789/?wsdl').
To initialize a suds.client.Client instance need that long lasting 20
seconds?
On your suggestion, if I just want to run the server localhost, how
should I set up the local \etc\hosts file?
thanks
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-04-14 23:39 +1000 |
| Message-ID | <mailman.358.1302788357.9059.python-list@python.org> |
| In reply to | #3195 |
On Thu, Apr 14, 2011 at 11:30 PM, Stephen.Wu <54wutong@gmail.com> wrote:
> Thanks Chris.
> I recheck the logic line by line and I find it is this sentence drag
> speed down : hello_client = Client('http://localhost:7789/?wsdl').
> To initialize a suds.client.Client instance need that long lasting 20
> seconds?
> On your suggestion, if I just want to run the server localhost, how
> should I set up the local \etc\hosts file?
It's probably already there for localhost; check the file I named and
see if there's a line looking like:
127.0.0.1 localhost
If there is, you should be able to get reverse DNS for 127.0.0.1. The
other possibility there is that it's the _forward_ DNS that's slow
(although I don't know why it would be). Try the IP instead:
hello_client = Client('http://127.0.0.1:7789/?wsdl')
Chris Angelico
[toc] | [prev] | [next] | [standalone]
| From | "Stephen.Wu" <54wutong@gmail.com> |
|---|---|
| Date | 2011-04-14 18:14 -0700 |
| Message-ID | <857f83f9-20a6-4708-a189-4a0dd4e99f5b@e21g2000vbz.googlegroups.com> |
| In reply to | #3196 |
On Apr 14, 9:39 pm, Chris Angelico <ros...@gmail.com> wrote:
> On Thu, Apr 14, 2011 at 11:30 PM, Stephen.Wu <54wut...@gmail.com> wrote:
> > Thanks Chris.
> > I recheck the logic line by line and I find it is this sentence drag
> > speed down : hello_client = Client('http://localhost:7789/?wsdl').
> > To initialize a suds.client.Client instance need that long lasting 20
> > seconds?
> > On your suggestion, if I just want to run the server localhost, how
> > should I set up the local \etc\hosts file?
>
> It's probably already there for localhost; check the file I named and
> see if there's a line looking like:
>
> 127.0.0.1 localhost
>
> If there is, you should be able to get reverse DNS for 127.0.0.1. The
> other possibility there is that it's the _forward_ DNS that's slow
> (although I don't know why it would be). Try the IP instead:
>
> hello_client = Client('http://127.0.0.1:7789/?wsdl')
>
> Chris Angelico
It works. Seems the DNS server will exchange localhost and 127.0.0.1,
taking nearly 15 seconds. Anyway, I got to know the exactly reason let
the initialized procedures down, which is the most important thing.
Thanks again.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-04-15 12:01 +1000 |
| Message-ID | <mailman.376.1302832916.9059.python-list@python.org> |
| In reply to | #3225 |
On Fri, Apr 15, 2011 at 11:14 AM, Stephen.Wu <54wutong@gmail.com> wrote: > It works. Seems the DNS server will exchange localhost and 127.0.0.1, > taking nearly 15 seconds. Anyway, I got to know the exactly reason let > the initialized procedures down, which is the most important thing. Generally BIND, on install, is configured to be authoritative for the .localhost domain (little-known trivia fact: localhost isn't a machine name, it's a top-level domain - on par with .com or .uk), which should mean you get fast responses. May want to check your DNS server's config. I don't know if other DNS software comes nicely preconfigured like that, but it should, since nobody ever assigns localhost to be anything else (imagine the confusion THAT would cause - even if you set it to something relatively innocuous like 127.0.0.2). Chris Angelico
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web