1 / 55

Saving the world through the wonder that is >>> CQL <<< Mike Taylor < mike@indexdata >

Saving the world through the wonder that is >>> CQL <<< Mike Taylor < mike@indexdata.com > Index Data – http://www.indexdata.com With a little help from BMNH R5937 “The Archbishop”. Overview. Where we're headed: Why OpenSearch rules so much. Saving the world through CQL.

tino
Download Presentation

Saving the world through the wonder that is >>> CQL <<< Mike Taylor < mike@indexdata >

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. Saving the world through the wonder that is >>> CQL <<< Mike Taylor <mike@indexdata.com> Index Data – http://www.indexdata.com With a little help from BMNH R5937 “The Archbishop”

  2. Overview Where we're headed: Why OpenSearch rules so much Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  3. Overview Where we're headed: Why OpenSearch rules so much Why OpenSearch sucks so hard Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  4. Overview Where we're headed: Why OpenSearch rules so much Why OpenSearch sucks so hard CQL saves the world! Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  5. Overview Where we're headed: Why OpenSearch rules so much Why OpenSearch sucks so hard CQL saves the world! Why CQL is hard to implement Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  6. Overview Where we're headed: Why OpenSearch rules so much Why OpenSearch sucks so hard CQL saves the world! Why CQL is hard to implement Why CQL is easy to implement Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  7. Overview Where we're headed: Why OpenSearch rules so much Why OpenSearch sucks so hard CQL saves the world! Why CQL is hard to implement Why CQL is easy to implement Now what? Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  8. Why OpenSearch rules so much OpenSearch is great because: It gives clients a well-defined way to request searches It returns data in a well-known format OpenSearch Metasearcher Nice, coherent XML OpenSearch Server 1 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  9. Why OpenSearch rules so much OpenSearch is great because: It gives clients a well-defined way to request searches It returns data in a well-known format OpenSearch Metasearcher Nice, coherent XML Same XML OpenSearch Server 1 OpenSearch Server 2 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  10. Why OpenSearch rules so much OpenSearch is great because: It gives clients a well-defined way to request searches It returns data in a well-known format OpenSearch Metasearcher Nice, coherent XML Same XML Same XML again! OpenSearch Server 1 OpenSearch Server 2 OpenSearch Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  11. Why OpenSearch sucks so hard OpenSearch Metasearcher Ghasty proprietary query language #1 OpenSearch Server 1 OpenSearch Server 2 OpenSearch Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  12. Why OpenSearch sucks so hard OpenSearch Metasearcher Ghasty proprietary query language #1 Revolting proprietary query language #2 OpenSearch Server 1 OpenSearch Server 2 OpenSearch Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  13. Why OpenSearch sucks so hard OpenSearch Metasearcher Ghasty proprietary query language #1 Ethically horrifying, foul and totally incomprehensible query language #3 Revolting proprietary query language #2 OpenSearch Server 1 OpenSearch Server 2 OpenSearch Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  14. Why OpenSearch sucks so hard !!! Aaaargh! !!! OpenSearch Metasearcher Ghasty proprietary query language #1 Ethically horrifying, foul and totally incomprehensible query language #3 Revolting proprietary query language #2 OpenSearch Server 1 OpenSearch Server 2 OpenSearch Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  15. CQL saves the world! OpenSearchSRU Metasearcher Lovely CQL SRU Server 1 SRU Server 2 SRU Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  16. CQL saves the world! OpenSearchSRU Metasearcher Lovely CQL Lovely CQL SRU Server 1 SRU Server 2 SRU Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  17. CQL saves the world! OpenSearchSRU Metasearcher Lovely CQL Lovely CQL Lovely CQL SRU Server 1 SRU Server 2 SRU Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  18. CQL saves the world! OpenSearchSRU Metasearcher : –) Lovely CQL Lovely CQL Lovely CQL SRU Server 1 SRU Server 2 SRU Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  19. CQL saves the world: see for yourself European Library Talk to Theo about this http://www.### Lovely CQL Lovely CQL Lovely CQL SRU Server 1 SRU Server 2 SRU Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  20. What if ... OpenSearch Metasearcher Even more lovely CQL! Yum! Lovely CQL Lovely CQL OpenSearch Server 1 OpenSearch Server 2 OpenSearch Server 3 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  21. OK, what actually is CQL? dinosaur Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  22. OK, what actually is CQL? dinosaur dinosaur and vertebra Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  23. OK, what actually is CQL? dinosaur dinosaur and vertebra dinosaur or pterosaur Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  24. OK, what actually is CQL? dinosaur dinosaur and vertebra dinosaur or pterosaur vertebra not dorsal Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  25. OK, what actually is CQL? dinosaur dinosaur and vertebra dinosaur or pterosaur vertebra not dorsal (dinosaur or pterosaur) and (vertebra not dorsal) Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  26. OK, what actually is CQL? dinosaur dinosaur and vertebra dinosaur or pterosaur vertebra not dorsal (dinosaur or pterosaur) and (vertebra not dorsal) title=churchill Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  27. OK, what actually is CQL? dinosaur dinosaur and vertebra dinosaur or pterosaur vertebra not dorsal (dinosaur or pterosaur) and (vertebra not dorsal) title=churchill creator=churchill Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  28. OK, what actually is CQL? dinosaur dinosaur and vertebra dinosaur or pterosaur vertebra not dorsal (dinosaur or pterosaur) and (vertebra not dorsal) title=churchill creator=churchill subject = (dinosaurs and biomechanics) Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  29. OK, what actually is CQL? dinosaur dinosaur and vertebra dinosaur or pterosaur vertebra not dorsal (dinosaur or pterosaur) and (vertebra not dorsal) title=churchill creator=churchill subject = (dinosaurs and biomechanics) Hey! What's the big deal? This is easy! Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  30. OK, what actually is CQL? People of a faint disposition might like to look away now. Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  31. OK, what actually is CQL? People of a faint disposition might like to look away now. dc.author=(kern* or ritchie) and (bath.title exact "the c programming language" or dc.title=elements prox/distance=4 dc.title=programming) and subject any/relevant "style design analysis" (Yes, that's all one query.) Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  32. OK, what actually is CQL? People of a faint disposition might like to look away now. dc.author=(kern* or ritchie) and (bath.title exact "the c programming language" or dc.title=elements prox/distance=4 dc.title=programming) and subject any/relevant "style design analysis" (Yes, that's all one query.) Don't try this at home, kids. Get JavaScript to build it for you. Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  33. The CQL learning curve SQL Effort in learning query language Power of query that can be expressed Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  34. The CQL learning curve SQL Effort in learning query language Google Power of query that can be expressed Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  35. The CQL learning curve SQL CQL Effort in learning query language Google Power of query that can be expressed Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  36. Why CQL is hard to implement Are you kidding? Just look at all that power: multi-word terms with wildcards and anchoring indexes (creator, title, subject ...) index prefixes (dc for Dublin Core, rec for Record Metadata) relations (< <= => > = <> exact all any) relation modifiers booleans (and, or, not, prox) boolean modifiers (ouch, ouch, ouch) prefix mapping ... and much, much more! Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  37. Why CQL is easy to implement How do you decode CGI parameters? – use a library! How do you parse XML? – use a library! How do you send an HTTP request and get the response? – use a library! Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  38. Why CQL is easy to implement How do you decode CGI parameters? – use a library! How do you parse XML? – use a library! How do you send an HTTP request and get the response? – use a library! Now, who can guess how to parse CQL? Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  39. Why CQL is easy to implement (Java) import org.z3950.zing.cql; CQLParser parser = new CQLParser(); CQLNode root; try { root = parser.parse(cql); } catch (CQLParseException ex) { System.err.println("Syntax error: " + ex.getMessage()); } Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  40. Why CQL is easy to implement (Java) import org.z3950.zing.cql; CQLParser parser = new CQLParser(); CQLNode root; try { root = parser.parse(cql); } catch (CQLParseException ex) { System.err.println("Syntax error: " + ex.getMessage()); } Super-easy! Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  41. Why CQL is easy to implement (Perl) use CQL::Parser; my $parser = new CQL::Parser(); my $node; eval { $node = $parser->parse($query); }; if ($@) { die "CQL syntax error: $@"; } Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  42. Why CQL is easy to implement (Perl) use CQL::Parser; my $parser = new CQL::Parser(); my $node; eval { $node = $parser->parse($query); }; if ($@) { die "CQL syntax error: $@"; } Embarrassingly Trivial! Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  43. Why CQL is easy to implement (C) #include <yaz/cql.h> CQL_parser cp = cql_parser_create(); struct cql_node *root; r = cql_parser_string(cp, query); if (r) { fprintf(stderr, "Syntax error\n"); } else { root = cql_parser_result(cp); } Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  44. Why CQL is easy to implement (C) #include <yaz/cql.h> CQL_parser cp = cql_parser_create(); struct cql_node *root; r = cql_parser_string(cp, query); if (r) { fprintf(stderr, "Syntax error\n"); } else { root = cql_parser_result(cp); } A child of three could do it! Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  45. Why CQL is easy to implement (Intercal) DO (5) NEXT (5) DO FORGET #1 PLEASE WRITE IN :1 DO .1 <- 'V-":1~'#32768c/#0'"c/#1'~#3 DO (1) NEXT DO :1 <- "'V-":1~'#65535c/#0'"c/#65535' ~'#0c/#65535'"c/"'V-":1~'#0c/#65535'" c/#65535'~'#0c/#65535'" DO :2 <- #1 PLEASE DO (4) NEXT (4) DO FORGET #1 DO .1 <- "V-':1~:2'c/#1"~#3 DO :1 <- "'V-":1~'#65535c/#0'"c/":2~'#65535 c/#0'"'~'#0c/#65535'"c/"'V-":1~'#0 Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  46. Why CQL is easy to implement (Intercal) DO (5) NEXT (5) DO FORGET #1 PLEASE WRITE IN :1 DO .1 <- 'V-":1~'#32768c/#0'"c/#1'~#3 DO (1) NEXT DO :1 <- "'V-":1~'#65535c/#0'"c/#65535' ~'#0c/#65535'"c/"'V-":1~'#0c/#65535'" c/#65535'~'#0c/#65535'" DO :2 <- #1 PLEASE DO (4) NEXT (4) DO FORGET #1 DO .1 <- "V-':1~:2'c/#1"~#3 DO :1 <- "'V-":1~'#65535c/#0'"c/":2~'#65535 c/#0'"'~'#0c/#65535'"c/"'V-":1~'#0 So easy, it hurts! Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  47. Now what? Once you've got your CQL parse tree ... Walk the tree Convert it to your database's local query language If a CQL construct is unsupported, throw a diagnostic Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  48. Now what? Once you've got your CQL parse tree ... Walk the tree Conv ert it to your database's local query language If a CQL construct is unsupported, throw a diagnostic It doesn't matter if you don't implement the whole language (No-one does that.) The goal is: “if you can say it in your DB, you can say it in CQL.” Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  49. Boldly facing a bright new dawn It really and truly is not that big a deal to implement CQL. Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

  50. Boldly facing a bright new dawn It really and truly is not that big a deal to implement CQL. Winners: Content providers: their databases get used Saving the world through CQL Mike Taylor, Index Data <mike@indexdata.com>

More Related