Presentation is loading. Please wait.

Presentation is loading. Please wait.

Saving the world through the wonder that is >>> CQL <<< Mike Taylor Index Data – With.

Similar presentations


Presentation on theme: "Saving the world through the wonder that is >>> CQL <<< Mike Taylor Index Data – With."— Presentation transcript:

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

2 Saving the world through CQLMike Taylor, Index Data Overview Where we're headed: Why OpenSearch rules so much

3 Saving the world through CQLMike Taylor, Index Data Overview Where we're headed: Why OpenSearch rules so much Why OpenSearch sucks so hard

4 Saving the world through CQLMike Taylor, Index Data Overview Where we're headed: Why OpenSearch rules so much Why OpenSearch sucks so hard CQL saves the world!

5 Saving the world through CQLMike Taylor, Index Data 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

6 Saving the world through CQLMike Taylor, Index Data 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

7 Saving the world through CQLMike Taylor, Index Data 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?

8 Saving the world through CQLMike Taylor, Index Data 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 OpenSearch Server 1 Nice, coherent XML

9 Saving the world through CQLMike Taylor, Index Data 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 OpenSearch Server 1 OpenSearch Server 2 Nice, coherent XMLSame XML

10 Saving the world through CQLMike Taylor, Index Data 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 OpenSearch Server 1 OpenSearch Server 3 OpenSearch Server 2 Nice, coherent XMLSame XMLSame XML again!

11 Saving the world through CQLMike Taylor, Index Data Why OpenSearch sucks so hard OpenSearch Metasearcher OpenSearch Server 1 OpenSearch Server 3 OpenSearch Server 2 Ghasty proprietary query language #1

12 Saving the world through CQLMike Taylor, Index Data Why OpenSearch sucks so hard OpenSearch Metasearcher OpenSearch Server 1 OpenSearch Server 3 OpenSearch Server 2 Ghasty proprietary query language #1 Revolting proprietary query language #2

13 Saving the world through CQLMike Taylor, Index Data Why OpenSearch sucks so hard OpenSearch Metasearcher OpenSearch Server 1 OpenSearch Server 3 OpenSearch Server 2 Ghasty proprietary query language #1 Revolting proprietary query language #2 Ethically horrifying, foul and totally incomprehensible query language #3

14 Saving the world through CQLMike Taylor, Index Data Why OpenSearch sucks so hard OpenSearch Metasearcher OpenSearch Server 1 OpenSearch Server 3 OpenSearch Server 2 Ghasty proprietary query language #1 Revolting proprietary query language #2 Ethically horrifying, foul and totally incomprehensible query language #3 !!!Aaaargh!!!!

15 Mike Taylor, Index Data CQL saves the world! Saving the world through CQL OpenSearchSRU Metasearcher SRU Server 1 SRU Server 3 SRU Server 2 Lovely CQL

16 Mike Taylor, Index Data CQL saves the world! Saving the world through CQL OpenSearchSRU Metasearcher SRU Server 1 SRU Server 3 SRU Server 2 Lovely CQL

17 Mike Taylor, Index Data CQL saves the world! Saving the world through CQL OpenSearchSRU Metasearcher SRU Server 1 SRU Server 3 SRU Server 2 Lovely CQL

18 Mike Taylor, Index Data CQL saves the world! Saving the world through CQL OpenSearchSRU Metasearcher SRU Server 1 SRU Server 3 SRU Server 2 Lovely CQL : –)

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

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

21 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through CQL dinosaur

22 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through CQL dinosaur dinosaur and vertebra

23 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through CQL dinosaur dinosaur and vertebra dinosaur or pterosaur

24 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through CQL dinosaur dinosaur and vertebra dinosaur or pterosaur vertebra not dorsal

25 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through CQL dinosaur dinosaur and vertebra dinosaur or pterosaur vertebra not dorsal (dinosaur or pterosaur) and (vertebra not dorsal)

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

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

28 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through 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)

29 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through 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!

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

31 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through 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.)

32 Mike Taylor, Index Data OK, what actually is CQL? Saving the world through 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.

33 Mike Taylor, Index Data The CQL learning curve Saving the world through CQL Power of query that can be expressed Effort in learning query language SQL

34 Mike Taylor, Index Data The CQL learning curve Saving the world through CQL Power of query that can be expressed Effort in learning query language SQL Google

35 Mike Taylor, Index Data The CQL learning curve Saving the world through CQL Power of query that can be expressed Effort in learning query language SQL Google CQL

36 Mike Taylor, Index Data Why CQL is hard to implement Saving the world through CQL 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!

37 Mike Taylor, Index Data Why CQL is easy to implement Saving the world through CQL 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!

38 Mike Taylor, Index Data Why CQL is easy to implement Saving the world through CQL 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?

39 Mike Taylor, Index Data Why CQL is easy to implement (Java) Saving the world through CQL 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()); }

40 Mike Taylor, Index Data Why CQL is easy to implement (Java) Saving the world through CQL 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!

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

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

43 Mike Taylor, Index Data Why CQL is easy to implement (C) Saving the world through CQL #include 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); }

44 Mike Taylor, Index Data Why CQL is easy to implement (C) Saving the world through CQL #include 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!

45 Mike Taylor, Index Data Why CQL is easy to implement (Intercal) Saving the world through CQL 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

46 Mike Taylor, Index Data Why CQL is easy to implement (Intercal) Saving the world through CQL 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!

47 Mike Taylor, Index Data Now what? Saving the world through CQL 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

48 Mike Taylor, Index Data Now what? Saving the world through CQL 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.”

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

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

51 Mike Taylor, Index Data Boldly facing a bright new dawn Saving the world through CQL It really and truly is not that big a deal to implement CQL. Winners: Content providers: their databases get used Vendors: they can concentrate on the interesting problems

52 Mike Taylor, Index Data Boldly facing a bright new dawn Saving the world through CQL It really and truly is not that big a deal to implement CQL. Winners: Content providers: their databases get used Vendors: they can concentrate on the interesting problems Libraries: they don't need expensive metasearch solutions

53 Mike Taylor, Index Data Boldly facing a bright new dawn Saving the world through CQL It really and truly is not that big a deal to implement CQL. Winners: Content providers: their databases get used Vendors: they can concentrate on the interesting problems Libraries: they don't need expensive metasearch solutions Users: they find more good stuff!

54 Mike Taylor, Index Data Boldly facing a bright new dawn Saving the world through CQL It really and truly is not that big a deal to implement CQL. Winners: Content providers: their databases get used Vendors: they can concentrate on the interesting problems Libraries: they don't need expensive metasearch solutions Users: they find more good stuff! Losers: No-one!

55 Saving the world through the wonder that is >>> CQL <<< Mike Taylor mike@indexdata.com Index Data – http://www.indexdata.comhttp://www.indexdata.com With a little help from BMNH R5937 “The Archbishop”, an as-yet undescribed brachiosaurid sauropod from the Upper Jurassic of the Tendaguru formation, Tanzania, Africa.


Download ppt "Saving the world through the wonder that is >>> CQL <<< Mike Taylor Index Data – With."

Similar presentations


Ads by Google