<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>28002</bug_id>
          
          <creation_ts>2015-02-12 15:38:55 +0000</creation_ts>
          <short_desc>Define maximum number of allowed sessions to facilitate intermediary nodes</short_desc>
          <delta_ts>2015-10-26 05:27:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Browser Test/Tools WG</product>
          <component>WebDriver</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>20860</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Tolfsen">ato</reporter>
          <assigned_to name="Browser Testing and Tools WG">public-browser-tools-testing</assigned_to>
          <cc>fisherii</cc>
    
    <cc>james</cc>
    
    <cc>mike</cc>
    
    <cc>vlotoshnikov</cc>
          
          <qa_contact name="Browser Testing and Tools WG">public-browser-tools-testing</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117866</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Tolfsen">ato</who>
    <bug_when>2015-02-12 15:38:55 +0000</bug_when>
    <thetext>Intermediary nodes will be allowed to accept more than a single session to be stored, and they consequently need to keep a list of currently active sessions.  Final remote ends may only support a single session at a time and thus needs a concept of &quot;maximum number of sessions&quot;, which we can check against the length of &quot;known sessions&quot; to see if we can start a session or not.

This spun out of the discussion in https://github.com/w3c/webdriver/pull/9#discussion_r24584781.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117872</commentid>
    <comment_count>1</comment_count>
    <who name="Marc Fisher">fisherii</who>
    <bug_when>2015-02-12 18:58:01 +0000</bug_when>
    <thetext>I thought we had decided not discuss/consider intermediary nodes at all in this spec.

Additionally, do the intermediate nodes need to be able to query this? If the maximum number of sessions for a remote end has been reached, then an attempt to create a session will fail, which should just propagate back through all intermediates (with them acting appropriately).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117873</commentid>
    <comment_count>2</comment_count>
    <who name="Andreas Tolfsen">ato</who>
    <bug_when>2015-02-12 19:27:02 +0000</bug_when>
    <thetext>(In reply to Marc Fisher from comment #1)
&gt; I thought we had decided not discuss/consider intermediary nodes at all in
&gt; this spec.

Well, intermediary nodes should be conforming implementations of the specification.

If you interact with a remote that you know is compliant you can make assumptions about its behaviour, and if it doesn&apos;t behave as expected it&apos;s clear it has bugs.

In terms of the external API an intermediary has to be indistinguishable from a “furthest remote”.  But that means that in order to allow us to specify that API in detail we have to allow for cases that apply to intermediaries but not to furthest remotes, or vice-versa.

E.g. a single browser will only have a single active session, so there has to be an error if you try to create a new session when one is already active.  But 
since intermediaries may have multiple active sessions they don&apos;t need to produce the same error.
 
&gt; Additionally, do the intermediate nodes need to be able to query this?

This would be a state associated with the intermediary remote node itself.  For intermediaries the value might be &quot;unlimited&quot;, whereas for the final remote (the driver implementation) it might be 1.

&gt; If the maximum number of sessions for a remote end has been reached, then
&gt; an attempt to create a session will fail, which should just propagate back
&gt; through all intermediates (with them acting appropriately).

Exactly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117874</commentid>
    <comment_count>3</comment_count>
    <who name="James Graham">james</who>
    <bug_when>2015-02-12 19:40:59 +0000</bug_when>
    <thetext>Right. I was a proponent of saying &quot;an intermediary is just a thing that implements both the local end and the remote end of a specification&quot;. But I&apos;m now not sure that works in detail. For example, as in this bug, you need a way to explain the fact that a browser can only have one active session, but a proxy system might be able to fire up an unlimited number of browsers, so in the first case you have to fail if there&apos;s already a session, but in the second you don&apos;t. Even with a browser isn&apos;t not impossible that you want to allow more than one connection at a time for some reason.

In the longer term we may have to have some specific text to point out that if you are an intermediary node you don&apos;t need to actually perform the steps for each command in the spec, but can proxy to another node that does perform the specs in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118150</commentid>
    <comment_count>4</comment_count>
    <who name="seva">vlotoshnikov</who>
    <bug_when>2015-02-25 04:51:22 +0000</bug_when>
    <thetext>Some real life &quot;furthest remote&quot; servers allow more than one session: chromedriver.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>