Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-25

Create a JsonRpc Servlet to make pure js containers more viable and to improve library usability.

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • Java
    • None

    Description

      Currently, there's no way to get the gadget meta data without implementing a full container that uses the core java libraries directly. To rectify this situation, we should introduce a JsonRpcServlet class that will take requests in the form:

      var request = {
      "requestContext":

      { "language": "en", "country": "US", .. other per-request fields... }

      ,
      "gadgets": [ // index should be module id based
      {"specUrl": "url-of-gadget-spec.xml", "userPrefs": {"up_name":"up_value"}},
      ...more gadgets...
      ]
      };

      and responds with:

      var response = {
      "libs": ["setprefs", "analytics"],
      "gadgets": [ // guaranteed to be the same order as inputs.
      {"specUrl":"same-as-input",
      "prefSpec": {"up_name":{"display":"Localized, user-friendly name for the pref", "type:"string", "default":"", "value":"same-as-input, or default"}},
      "contentType":"url, iframe, or caja",
      "content":"iframe url, url for type=url gadgets, or cajoled content",
      "token":"gadget token, produced by a GadgetSigner implementation",
      },
      ...more gadgets...
      ]
      };

      This RPC mechanism should be designed in such a way that it can easily be used as a reference mechanism for anyone that wants to build an rpc system using shindig using alternative rpc mechanisms (SOAP, XML-RPC, various proprietary solutions).

      Attachments

        Activity

          People

            etnu Kevin Brown
            etnu Kevin Brown
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: