1 / 15

Canonical Producer

Canonical Producer. CreateTable, Port, Protocol, Security, SQL Support, Multiple Query Support. Register. CP API. CP Servlet. Security. Insert. User Code. Query. Port. Files. To Consumer Servlet. Canonical Producer. Stuart Kenny Brian Coghlan Trinity College Dublin.

bayle
Download Presentation

Canonical Producer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Canonical Producer Stuart Kenny Brian Coghlan Trinity College Dublin

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

  4. 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.

  5. 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

  6. 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.

  7. 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.

  8. 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.

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

  10. 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!

  11. 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.

  12. User Code Structure CP API Authentication Query Parser Authorisation Search Engine

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

  14. 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.

  15. 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.

More Related