Commit Graph

3 Commits

Author SHA1 Message Date
Jon Cox
edfc87cc55 Modified DNS hostname mangling scheme, URL generator logic,
and automatic virtualization server registration so that
  now we virtualize on URLs like this:

     http://mysite.www--sandbox.ip.localdomain.lan:8180/
     http://alice.mysite.www--sandbox.ip.localdomain.lan:8180/
     http://preview.alice.mysite.www--sandbox.ip.localdomain.lan:8180/

  Or if you're using EchDNS at ip.alfrescodemo.net (the default):

     http://mysite.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/
     http://alice.mysite.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/
     http://preview.alice.mysite.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/

  The reasons behind this change have to do with:
  
    [1] Allowing wildcard cookies to be shared with subdomains, if desired.
        The scenario is that if you have an elaborate webapp that
        needs a cookie to function (or some auth), the user "alice"
        does not want to have to re-log in to the app just to get
        preview functions to work. 

    [2] Making the mangling scheme compatible with I18N-encoded URLs
        See:  IDNA  (Internationalizing Domain Names In Applications)
        RFCs: 3490,3492.   The problem with the old scheme was that
        relied on the string "--" as a delimiter within host labels,
        but IDNA uses "xn--" as a prefix to indicate that a label
        was I18N-encoded (and that the app should un-mangle in the
        presentation layer).  Ugh.

   The names of the stores was also rationalized to match the new URL 
   scheme.   The "." delimiting host lables becomes "--" in the
   repo's dir name, and the ordering of labels is reversed.

   Reasons:

    [1]  It's nicer to see project-first ordering in the 
         file system because it's more tab-complete friendly.
         It's also prettier visually with "ls -l" because
         logically related dirs line-up visually.

    [2]  It's dangerous to use "." as a character in directory names
         because a fully-patched version of IIS might refuse to
         serve content off such a path.  Weird, huh?
   
   It's too bad that the repo's dir name can't just be exactly
   the same as the fqdn (or a portion of it), but this reverse
   ordering ended up being the lesser of the available evils,
   because it optimizes the user's experience in each relm at 
   the expense of a small amont of URL <--> file system funkines.
   Note that they can't be the same in any case because of the
   "--" vs "." issue... so the "identity" mapping was already
   a lost cause.




git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4688 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-12-22 03:07:43 +00:00
Jon Cox
ed741873e5 Preserving caps in mangling for prettier autogenerated URLs.
TODO: Even with this change, the mangler still isn't quite right 
       because if we adopt the convention:

             o  Default mangled names approximate 
                the navigation path, when possible

        Then if you're on the Moo website, and you're in the main layer 
        of the "guest" sandbox viewing /my_webapp/xxx.jsp,  then the url 
        should look like this:

           http://www-Moo--guest.avm.localdomain.lan:8180/my_webapp/xxx.jsp

        Not like this:
             http://www-Moo--guest--main.avm.localdomain.lan:8180/my_webapp/xxx.jsp
 
        Put another way, if the "main" layer is imlicit for the user, 
        it should not appear in the mangled name (note, the 'preview' layer
        is non-default, thus explicit).
        
        Therefore 'guest' on Moo should have the following name-mangled urls 
        accessible:
        
          http://www-Moo--guest.avm.localdomain.lan:8180/my_webapp/xxx.jsp
          http://www-Moo--guest--preview.avm.localdomain.lan:8180/my_webapp/xxx.jsp


 NOTE: Consider how this would work with more complicated overlays.  

   Example 1:

       Suppose we had a website named   "Moo",
       and an author            name    "Alice"
       wanted to see template preview.

       We could autogenerate something like this:
           http://www-Moo--Alice--Preview.avm.localdomain.lan:8180/my_webapp/...

       The non-preview version would be in:
           http://www-Moo--Alice.avm.localdomain.lan:8180/my_webapp/...


       In the advanced GUI, just like you can see the Alice sandbox
       hanging off the Moo website, you'd be able to see/navigate 
       to the "Preview" layer  (though we would not expose such a thing
       by default in the simple gui).


   Example 2:

       Suppose we had a website named   "Moo",
       and a content reviewer   named   "John Smith"
       wanted to see a submission from  "Alice"

       We could autogenerate something like this:

           http://www-Moo--John-Smith--SUB-Alice.avm.localdomain.lan:8180/my_webapp/...

       (i.e.: autogenerated sumission layers could just be
              "SUB-" + DNS name of layer tha did the submit).
       



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3909 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-09-24 21:51:39 +00:00
Britt Park
798ed97aef Sandbox store to dns name mangler. It's hooked into the website creation wizard.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3880 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-09-22 01:56:38 +00:00