Landis - Mumps

803 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
803
On SlideShare
0
From Embeds
0
Number of Embeds
35
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Landis - Mumps

  1. 1. Intermediate M[UMPS] <ul><ul><li>WorldVistA Community Meeting </li></ul></ul><ul><ul><li>June 14-17, 2007 </li></ul></ul><ul><ul><li>Seattle, WA </li></ul></ul>
  2. 2. Presentation Overview <ul><li>Overview of Presentation </li></ul><ul><li>History of M[UMPS] </li></ul><ul><li>The M[UMPS] Vendors Today </li></ul><ul><ul><li>GT.M </li></ul></ul><ul><ul><li>InterSystems Cache </li></ul></ul><ul><li>Distinctives of the M[UMPS] Language </li></ul><ul><li>The M[UMPS] Language </li></ul><ul><li>Review of Presentation </li></ul><ul><li>Q&A </li></ul>
  3. 3. History of M[UMPS] <ul><li>1960's Began at Mass General Hostpital </li></ul><ul><li>1972 First X11.1ANSI Standard </li></ul><ul><li>1984 ANSI Standard </li></ul><ul><li>1990 ANSI Standard </li></ul><ul><li>1992 ISO Standard 11756 </li></ul><ul><li>1995 ANSI Standard </li></ul><ul><li>2005 ISO Standard (re-affirmed) </li></ul>
  4. 4. Current 2005 ISO Standard <ul><li>On 6 January 2005, ISO re-affirmed its MUMPS-related standards: </li></ul><ul><li>ISO/IEC 11756:1999 language standard </li></ul><ul><li>ISO/IEC 15851:1999 Open MUMPS Interconnect and </li></ul><ul><li>ISO/IEC 15852:1999, MUMPS Windowing Application Programmers Interface. </li></ul><ul><li>http://www.iso.org </li></ul>
  5. 5. M Platforms for WorldVistA-EHR Fidelity National Financial GT.M InterSystems Corporation Cach é
  6. 6. The M[UMPS] Vendors Today - 1 <ul><li>Fidelity National Financial GT.M </li></ul><ul><ul><li>Formerly Greystone Technology MUMPS </li></ul></ul><ul><ul><li>2000 Release under the GPL for Linux </li></ul></ul><ul><ul><li>2005 Release under the GPL for OpenVMS and Tru64 </li></ul></ul><ul><ul><li>Available on many UNIX systems </li></ul></ul><ul><ul><li>Commercial support available </li></ul></ul><ul><ul><li>http://sf.net/projects/sanchez-gtm </li></ul></ul>
  7. 7. The M[UMPS] Vendors Today - 2 <ul><li>InterSystems Corporation Cach é </li></ul><ul><ul><li>1995 acquired DSM from DEC </li></ul></ul><ul><ul><li>1997 released Cach é </li></ul></ul><ul><ul><li>1998 acquired Micronetics Design Corp </li></ul></ul><ul><ul><li>Commercial support available </li></ul></ul><ul><ul><li>http://www.intersystems.com/ </li></ul></ul>
  8. 8. Distinctives of M <ul><li>A Joy to program in: </li></ul><ul><ul><li>Good for thinking in front of the machine </li></ul></ul><ul><ul><li>Intrinsic database capability </li></ul></ul><ul><ul><li>Efficiently turn ideas into programs </li></ul></ul><ul><ul><li>Simplicity and cleanness of language make it easy to use </li></ul></ul><ul><ul><li>Not having to be interrupted to look up details </li></ul></ul>
  9. 9. Distinctives of M - 2 <ul><li>Compactness of Notation </li></ul><ul><ul><li>Command abbreviations allow short code </li></ul></ul><ul><ul><li>Command postconditions simplify logic </li></ul></ul><ul><ul><li>Language level LOCK support allows multi-user access control </li></ul></ul><ul><ul><li>Data shared in multi-user </li></ul></ul>
  10. 10. Distinctives of M - 3 <ul><li>Uses sophisticated “hardened” technology that is “invisible” to programmer </li></ul><ul><ul><li>Transactions </li></ul></ul><ul><ul><li>Journalling </li></ul></ul><ul><ul><li>Database rollback / recovery </li></ul></ul><ul><ul><li>Replication / Reliability </li></ul></ul><ul><ul><li>Mapping of names to physical storage </li></ul></ul>
  11. 11. Distinctives of M - 4 <ul><li>Immediacy of feedback </li></ul><ul><ul><li>Facilitates “agile” processes </li></ul></ul><ul><ul><li>Iterative approach </li></ul></ul><ul><ul><li>Make mistakes quickly and fix mistakes quickly </li></ul></ul>
  12. 12. Distinctive - M Array <ul><li>VAR(key1,...,key n ) </li></ul><ul><ul><li>First normal form “The record is known by the key, the whole key and only the key” </li></ul></ul><ul><ul><li>Do not think “rectangular” </li></ul></ul><ul><ul><li>Data is arranged sorted by key, within key </li></ul></ul><ul><ul><li>The key identifies a data “cell” </li></ul></ul><ul><ul><li>Data in the cell stays in the cell until specifically changed or deleted </li></ul></ul>
  13. 13. Distinctive – M Array NAME(“Sam”)=1 NAME(“Bill”)=2 DATA(1,”ADDR”)=”123 Main Street” DATA(1,”ADDR”,0)=1 DATA(1,”ADDR”,1)=”321 Front Street” DATA(1,”NAME”)=”Sam” DATA(2,”NAME”)=”Bill” DATA(2,”STATE”)=”WA”
  14. 14. Distinctive - M Storage Discovery <ul><li>$ D ATA (VAR) </li></ul><ul><ul><li>Discovers the “shape” of a data store </li></ul></ul><ul><ul><li>VAR is a variable with or without subscripts </li></ul></ul><ul><li>Possible Return Values of $DATA </li></ul><ul><ul><li>0 VAR has no subscripts nor value </li></ul></ul><ul><ul><li>1 VAR has a value no subscripts </li></ul></ul><ul><ul><li>10 VAR has subscripts no value </li></ul></ul><ul><ul><li>11 VAR has subscripts and value </li></ul></ul>
  15. 15. Distinctive - M Storage Discovery <ul><ul><li>Example: </li></ul></ul><ul><ul><ul><li>A=1 </li></ul></ul></ul><ul><ul><ul><li>$ D ATA (A) = 1 </li></ul></ul></ul><ul><ul><ul><li>$ D ATA (B) = 0 </li></ul></ul></ul><ul><ul><ul><li>$ D ATA (A(1)) = 0 </li></ul></ul></ul>
  16. 16. Distinctive - M Storage Discovery <ul><ul><li>Example: </li></ul></ul><ul><ul><ul><li>B=1 </li></ul></ul></ul><ul><ul><ul><li>B(1)=1 </li></ul></ul></ul><ul><ul><ul><li>B(2,1)=1 </li></ul></ul></ul><ul><ul><ul><li>$ D ATA (B) = 11 </li></ul></ul></ul><ul><ul><ul><li>$ D ATA (B(1)) = 1 </li></ul></ul></ul><ul><ul><ul><li>$ D ATA (B(2)) = 10 </li></ul></ul></ul><ul><ul><ul><li>$ D ATA (B(2,1)) = 1 </li></ul></ul></ul>
  17. 17. Disctinctive - M Storage Discovery <ul><li>$ O RDER (VAR[,DIR]) </li></ul><ul><ul><li>Abbreviated $O() </li></ul></ul><ul><li>$ Q UERY (VAR[,DIR]) </li></ul><ul><ul><li>Abbreviated $Q() </li></ul></ul><ul><li>$ QL ENGTH (VAR) </li></ul><ul><ul><li>Abbreviated $QL() </li></ul></ul><ul><li>$ QS UBSCRIPT (VAR,[DIR]) </li></ul><ul><ul><li>Abbreviated $QS() </li></ul></ul>
  18. 18. Disctinctive - M Storage Discovery <ul><li>$ O RDER (VAR[,DIR]) </li></ul><ul><ul><li>If DIR is absent, act as though DIR=1 </li></ul></ul><ul><ul><li>If DIR is 1 next (sort “higher”) </li></ul></ul><ul><ul><li>If DIR is -1 previous (sort “lower”) </li></ul></ul><ul><ul><li>Gets the “next” key of the array at the “same level” </li></ul></ul>
  19. 19. Distinctive – M Storage Discovery A(1)=”ABC” A(2)=”DEF” A(3)=”GHI” $O(A(“”)) 1 $O(A(1)) 2 $O(A(3)) “” $O(A(“”),-1) -3
  20. 20. Distinctive – M Storage Discovery <ul><li>$ Q UERY(@VAR[,DIR)) </li></ul><ul><ul><li>If DIR is absent, act as though DIR=1 </li></ul></ul><ul><ul><li>If DIR is 1 next (sort “higher”) </li></ul></ul><ul><ul><li>If DIR is -1 previous (sort “lower”) </li></ul></ul><ul><ul><li>Gets the “next” key of the array “depth first” </li></ul></ul>
  21. 21. Distinctive – M Storage Discovery A(1)=123 A(1,”NAME”)=”Goody,Sam” A(1,”NAME”,”LAST”)=”Goody” A(2)=456 A(2,”ADDR”)=”200 Main” $Q(“A(1)”) A(1,”NAME”) $Q(“A(2)”,-1) A(1,”NAME”,”LAST”)
  22. 22. <ul><li>$QL ENGTH() </li></ul>
  23. 23. <ul><li>$ QS UBSCRIPT () </li></ul>
  24. 24. Distinctive - M Locking <ul><li>LOCK </li></ul>
  25. 26. Distinctives of M[UMPS] <ul><ul><li>Globals, </li></ul></ul><ul><ul><li>Arrays </li></ul></ul><ul><ul><li>Introspection of data </li></ul></ul><ul><ul><li>Indirection </li></ul></ul><ul><ul><li>Execution of data </li></ul></ul><ul><ul><li>Block structure statements </li></ul></ul><ul><ul><li>Pass by value vs. pass by reference on functions </li></ul></ul><ul><ul><li>Distinct vender alternatives implementations </li></ul></ul><ul><ul><li>Expression evaluation order left to right, use ( ) </li></ul></ul><ul><ul><li>Logical shortcutting for conditional expressions </li></ul></ul><ul><ul><li>Many commands have post conditionals inhibiting command from occurrence </li></ul></ul><ul><ul><li>Line orientated </li></ul></ul>

×