Please look into real world, not idealistic.

Servers have sometimes long timeouts (nobody says they can't), don't do
any sort of pings (nobody says they must) and many people have unstable
connections, even on ADSL, but much more on wireless, especially when
moving aroud.

It's a common things to loose messages on Jabber for people with bad
connectins. The good thing is that when one comes back, the old
resource is kicked (with reason: reconnected) and the user is
notified... and after some time, users learn that after other party's
"reconnect", they must re-send what they have posted.

If this is not the case, users become confused and will start to think
Jabber is unreliable. And what more, they will rightly do so.

Pavel

On Sat, 4 Oct 2008 23:56:28 -0400
"Eric Will" <[EMAIL PROTECTED]> wrote:

> On Sat, Oct 4, 2008 at 8:48 PM, Jonathan Schleifer
> <[EMAIL PROTECTED]> wrote:
> > Which is IMO a painfully bad idea for users with instable
> > connections. They will have thousands of resources online after a
> > short while and you don't know which to msg. Very, very bad idea,
> > IMO. Makes it totally unusable with an unstable conenction. You
> > *WANT* a static resource then, so you can replace the old, dead
> > connection.
> 
> Why? Do no servers do ping timeouts or something? Thousands of
> resources, seriously?
> 
> How does replacing the resource work? I thought <conflict/> was issued
> if the resource was in use.
> 
> I've changed my code to accept a client-generated resource as-is.
> 
> +++ xmpp/client_iq.rb (working copy)
> @@ -122,12 +122,14 @@
>      #
>      # If it's empty they want us to generate one for them, if not
>      # they've supplied a string to use. The new draft RFC says we
> should
> -    # add random text onto that anyhow, so we do.
> +    # add random text onto that anyhow, but apparently no one likes
> +    # that. We'll go ahead and accept theirs if they supply it,
> +    # which they shouldn't.
>      #
>      unless elem.has_elements?
> -        resource = @jid.split('@')[0] + rand(rand(100000)).to_s
> +        resource = @jid.split('@')[0]
>      else
> -        resource = elem.elements['resource'].text +
> rand(rand(10000)).to_s
> +        resource = elem.elements['resource'].text + Stream.gen_id
> 
> 
> > --
> > Jonathan
> >
> 
> -- Eric Will


-- 

Pavel Šimerda
Freelancer v oblasti počítačových sítí, komunikace a bezpečnosti
Web: http://www.pavlix.net/
Jabber & Mail: pavlix(at)pavlix.net
OpenID: pavlix.net

Reply via email to