Presentation is loading. Please wait.

Presentation is loading. Please wait.

Canonical Producer CP API User Code CP Servlet Files CreateTable, Port, Protocol, Security, SQL Support, Multiple Query Support Security Insert Query Port.

Similar presentations


Presentation on theme: "Canonical Producer CP API User Code CP Servlet Files CreateTable, Port, Protocol, Security, SQL Support, Multiple Query Support Security Insert Query Port."— Presentation transcript:

1 Canonical Producer CP API User Code CP Servlet Files CreateTable, Port, Protocol, Security, SQL Support, Multiple Query Support Security Insert Query Port To Consumer Servlet Register

2 Canonical Producer Flow 2 cases: Simple Case: Single consumer Harder Case 2 consumers querying same producer

3 Single Consumer User Code Registers with CanonicalProducer Servlet Existing code but requires extra information: Port- Port the user code listens on to receive queries. Protocol- Protocol to use to connect to port. Security- Security information required by Servlet for authentication. SQL Support - Level of SQL which the user code supports. Multiple Queries- Whether or not the user code supports multiple queries. Declares the tables which it provides Existing code.

4 Single Consumer CanonicalProducer Servlet Accepts connection from the Consumer Servlet and creates a new instance for the connection Uses existing code! Parses the SQL query: Has to check that query is supported by User Code. Forwards the query to the User Code: Sends it to specified port using required protocol Can either send parsed query (XML) or SQL string as received from Consumer Servlet. Waits for the response from the User Code

5 Single Consumer User Code Carries out the query Returns data using RGMA Insert as per current API CanonicalProducer Servlet Receives data from User Code Sends it to the Consumer Servlet as per existing code.

6 Multiple Queries Problem arises if the User Code cannot handle multiple queries at the same time. User Code informs servlet on registration as to whether it can support parallel queries or not. If the User Code cannot, and the Servlet receives a query whilst another query is currently running, the Servlet must queue the connection instance until the producer is available.

7 Multiple Queries Consumer can specify how long to wait for results to the query. If the Producer does not become available before this time has elapsed then the Servlet can remove the instance from the queue and dispose of it.

8 2 Consumers, Same Producer! CanonicalProducer Servlet To Producer Query 1Query 2 Queue Connection instances

9 Keep Alive Normally it is known how often a Producer will be queried. This is not the case with a CanonicalProducer! Will have to make use of GRRP. Has to inform Servlet that it is still alive. Otherwise it will be removed from the registry!

10 Security Authentication 2 way communication between User Code and Servlet Requires authentication Authorisation Servlet can provide some authorisation, will need to be passed security information by User Code User Code will need to provide authorisation also, Servlet must send security information to the User Code.

11 User Code Structure CP API Authentication Query Parser Authorisation Search Engine

12 User Code Structure Although the User Code can essentially be anything, certain components will almost always be present: Authentication Query Parser Authorisation Seach Engine

13 User Code Structure Authentication Communication between the User Code and Servlet will always require authentication. This will be a standard piece of code. Query Parser If a user chooses not to allow the Servlet to parse the query and return a parse tree they will need to provide a component to parse the SQL string.

14 User Code Structure Authorisation In order to allow authorisation on the user side the User code will have to receive security information from the Servlet, e.g. DN, VO, Certificate etc. Search Engine This will be code that actually takes the parsed SQL query and carries out the search on the information source.


Download ppt "Canonical Producer CP API User Code CP Servlet Files CreateTable, Port, Protocol, Security, SQL Support, Multiple Query Support Security Insert Query Port."

Similar presentations


Ads by Google