3 Replies Latest reply: Sep 27, 2013 1:56 PM by Branchbird - Pat RSS

    How does REST find the right MDEX

    Amethyste

      Starting from the Discover sample application, I get a home page by launching:

       

      http:/<server>:8006/assembler/json/pages/browse

       

      OK, but I don't understand how this can work. How REST know hat the MDEX is on port 17000 and not 15000?

       

      Thanks

        • 1. Re: How does REST find the right MDEX
          Branchbird - Pat

          It's still in your configuration in the properties files. 

           

          Depending on your configuration (I have an out of the box 3.1.1 assembler service locally), the assembler service runs out of the following folder:

           

          ToolsAndFrameworks\3.1.1\reference\discover-service

           

          ...which has a WEB-INF folder containing a number of configuration files.  For the MDEX Host and Port, you can open assembler.properties and see it right down towards the bottom.

           

          Hope that helps,

           

          Patrick Rafferty

          http://branchbird.com

          • 2. Re: How does REST find the right MDEX
            Amethyste

            thanks

             

            I have seen this. But What happend if I have several endeca site on the same server?

            The url has no relations with a particular Mdex ou application

            • 3. Re: How does REST find the right MDEX
              Branchbird - Pat

              Lots of options here.  Two off the top of my head:

               

              1) Separate instances of the Assembler service per Application.  If your sites are very different (different cartridges deployed, different URL structures, different SEO strategies), this would be the way to go.


              2) Front the assembler with a servlet and extract something from the request (a key, a name, the host and port itself) and use that information to initialize the MDEX Request.


              You also might be able to declare multiple mdexResource beans and use Spring configuration to get what you need.


              HTH,


              Patrick Rafferty

              http://branchbird.com



              Note: I'm assuming you mean that you have different web apps here.  If you're talking about N MDEX Engines that serve 1 site for load purposes, use a load balancer and point the properties file at the load balancer and you're done.