Date post: | 31-Mar-2015 |
Category: |
Documents |
Upload: | zavier-worthen |
View: | 221 times |
Download: | 1 times |
InterSystems Caché bij de TU/e
Marleen Vandervelden, Johan KenensInterSystems Corporation
AgendaAgenda
InleidingInleiding HistoriekHistoriek Post-relational database CachéPost-relational database Caché Applicatie-ontwikkeling met CachéApplicatie-ontwikkeling met Caché Demo’sDemo’s Q&AQ&A
Historiek = M(UMPS)Historiek = M(UMPS)
M(UMPS) (mid ’60)M(UMPS) (mid ’60) ( (MMasschusetts general hospitalasschusetts general hospital MMulti ulti UUtility tility PProgramming rogramming SSystem)ystem) ANSI standaard (einde ’70)ANSI standaard (einde ’70) Ontstaan van M implementaties (DSM, DTM)Ontstaan van M implementaties (DSM, DTM) Enkel nog gecommercialiseerd en geevolueerd doorEnkel nog gecommercialiseerd en geevolueerd door InterSystems InterSystems-------------------------------------------------------------------------------------------------------------------------------------------------- ProgrammeertaalProgrammeertaal Data opslag in Globals (boomstructuur)Data opslag in Globals (boomstructuur)
Post-relational database CachéDeel 1
1. De storage manager1. De storage manager
Multi-DimensionalMulti-DimensionalStorage ManagerStorage ManagerMulti-DimensionalMulti-DimensionalStorage ManagerStorage Manager
= Geoptimaliseerd voor performantie= Geoptimaliseerd voor performantie= Opslag van complexe datastructuren= Opslag van complexe datastructuren
Complexe data-structuur: ^GlobalsComplexe data-structuur: ^Globals
Set ^Global = “fruit”Set ^Global = “fruit”
fruitfruit^Global =^Global =
^Global gedraagt zich als een gewone type-less ^Global gedraagt zich als een gewone type-less variable…variable…
(2)(2) peer peer
Complexe data-structuur: ^GlobalsComplexe data-structuur: ^Globals
Set ^Global(1) = “appel”Set ^Global(1) = “appel”
Set ^Global(2) = “peer”Set ^Global(2) = “peer”
^Global =^Global = (1)(1) appel appel
^Global =^Global = (1)(1) appel appel
(aantal) (aantal) 4545
set ^Global(2, “aantal”) = 45set ^Global(2, “aantal”) = 45
Subscripts zijn eveneens untyped, Subscripts zijn eveneens untyped, en kunnen ook tekst (en dus data !) zijn …en kunnen ook tekst (en dus data !) zijn …
^Global =^Global = (1)(1) appel appel(2)(2) peer peer
set ^Global(2, “naam”) = “Jefke”set ^Global(2, “naam”) = “Jefke”
Subscripts zijn eveneens untyped, Subscripts zijn eveneens untyped, en kunnen ook tekst (en dus data !) zijn …en kunnen ook tekst (en dus data !) zijn …
^Global =^Global =(aantal) (aantal) 4545
(1)(1) appel appel(2)(2) peer peer (naam) (naam) JefkeJefke
vb. Set ^Global(2, “leverancier”) = “Fruit&co”vb. Set ^Global(2, “leverancier”) = “Fruit&co”
^Global =^Global =(leveranc.) (leveranc.) Fruit&coFruit&co……
(1)(1) appel appel(2)(2) peer peer ……
Global subscripts zijn ook sparse…Global subscripts zijn ook sparse…
Set ^Global(Set ^Global(22, “, “leverancierleverancier”, “”, “adresadres”, “”, “straat”straat”) = ) = ““perziklaanperziklaan””
Global subscripts zijn ook sparse…Global subscripts zijn ook sparse…
( )( ) … …((adr.adr.))
(abc)(abc)
( )( ) … …((lev...lev...))( )( ) … …( )( ) … …
^Global =^Global = ( )( ) … … ((22)) … … ( ) …( ) …
( )( ) … … ((str.str.) = ) = perziklaanperziklaan
$Data($Data(22, “, “leverancierleverancier) = 11) = 11$Data($Data(22, “, “leverancierleverancier”, “”, “adresadres”) = 10”) = 10
Global subscripts zijn ook sparse…Global subscripts zijn ook sparse…
( )( ) … …((adr.adr.))
(abc)(abc)
( )( ) … …((lev...lev...))( )( ) … …( )( ) … …
^Global =^Global = ( )( ) … … ((22)) … … ( ) …( ) …
( )( ) … … ((str.str.) = ) = perziklaanperziklaan
^Globals: een n-dimensionele ruimte^Globals: een n-dimensionele ruimte
^Global^Global
naamnaam
adresadres
aantalaantal leverancierleverancier
1 1 2 2
straatstraat
= “appel”= “appel” = “peer”= “peer”
= 45= 45 =“Fruit&co”=“Fruit&co” = “Jefke”= “Jefke”
= Ø= Ø
= “perziklaan”= “perziklaan”
2. Unified Data Architecture (UDA)2. Unified Data Architecture (UDA)
Multi-DimensionalMulti-DimensionalStorage ManagerStorage ManagerMulti-DimensionalMulti-DimensionalStorage ManagerStorage Manager
CachéObject interface
CachéObject interface
1 dictionary voor 2 access paths1 dictionary voor 2 access paths Automatische projectie van definities in beide richtingen.Automatische projectie van definities in beide richtingen. Geen supplementaire laag voor O/R mappingGeen supplementaire laag voor O/R mapping
CachéSQL interface
CachéSQL interface
DictionaryDictionary
3. Platforms3. Platforms
Multi-DimensionalMulti-DimensionalStorage ManagerStorage ManagerMulti-DimensionalMulti-DimensionalStorage ManagerStorage Manager
CachéCachéObject interfaceObject interface
CachéCachéObject interfaceObject interface
CachéCachéSQL interfaceSQL interface
CachéCachéSQL interfaceSQL interface
DictionaryDictionaryDictionaryDictionary
PlatformsPlatforms
Database = 1 uitwisselbaar physisch bestand
Caché PlatformsCaché PlatformsPlatform 32-Bit 64-BitAlpha / OpenVMS Alpha / Tru64 Unix AViiON HP IBM P Series Linux (Red Hat & SuSE) Sun Solaris (SPARC) Sun Solaris (Intel) Windows 95, 98, ME, NT, 2000, XP Apple MACOS X (aangekondigd)
4. Tools and standaarden4. Tools and standaarden
Multi-DimensionalMulti-DimensionalStorage ManagerStorage ManagerMulti-DimensionalMulti-DimensionalStorage ManagerStorage Manager
CachéCachéObjectsObjectsCachéCachéObjectsObjects
CachéCachéSQL interfaceSQL interface
CachéCachéSQL interfaceSQL interface
DictionaryDictionaryDictionaryDictionary
PlatformsPlatformsPlatformsPlatforms
Tools en standaarden (zie RAD)Tools en standaarden (zie RAD)Tools en standaarden (zie RAD)Tools en standaarden (zie RAD)
5. Integratie mogelijkheden5. Integratie mogelijkheden
InterSystems CachéInterSystems CachéInterSystems CachéInterSystems Caché
COM GatewayCOM GatewayCOM GatewayCOM Gateway SQL GatewaySQL GatewaySQL GatewaySQL Gateway MQ Series GatewayMQ Series GatewayMQ Series GatewayMQ Series Gateway
Bestaande Bestaande Windows Windows applicaties (Word, applicaties (Word, Excel,...)Excel,...)
Bestaande DBBestaande DB• InformixInformix• SybaseSybase• OracleOracle• Elke ODBCElke ODBC
Bericht gebaseerdeBericht gebaseerdeapplicatiesapplicaties
Ensemble
InterSystems EnsembleInterSystems Ensemble
Business Service Business Process Business Operation
Business Operation
Business Operation
Business Operation
Modeling (Studio)
Adapter Adapter
Adapter
Adapter
Adapter
Message Queue (Caché)
Message Transformation
SAP – SIEB
EL – FILE - ....
SAP – SIEB
EL – FILE - ....
Divided World of DatabaseDivided World of Database
TransactionTransactionProcessingProcessingTransactionTransactionProcessingProcessing
BusinessBusinessIntelligenceIntelligenceBusinessBusiness
IntelligenceIntelligence
Optimized forOptimized for RepetitiveRepetitive“simple” requests“simple” requests
InfrequentInfrequentcomplex queriescomplex queries
UsersUsers ManyMany FewFew
DatabaseDatabase DynamicDynamic StaticStaticThe WallThe Wall
Caché Bit Map IndicesCaché Bit Map Indices• In a bit-map index, a property of a class is In a bit-map index, a property of a class is
described by a string of bitsdescribed by a string of bits
Applicatie-ontwikkeling met CachéDeel 2
Object georienteerde omgevingObject georienteerde omgeving
PolymorphismPolymorphismEncapsulationEncapsulationInheritanceInheritance
Objects / Relational MismatchObjects / Relational Mismatch
UserUserInterfaceInterface LogicLogic TraditionalTraditional
DatabaseDatabase
ObjectsObjects ObjectsObjects TablesTables
Expensive TransformationExpensive TransformationExpensive TransformationExpensive Transformation
Objects in the DatabaseObjects in the Database
UserUserInterfaceInterface LogicLogic CachéCaché
DatabaseDatabase
ObjectsObjects ObjectsObjects ObjectsObjects
Consistent Representation End to EndConsistent Representation End to EndConsistent Representation End to EndConsistent Representation End to End
Database ScriptingDatabase Scripting
CachéCachéObjectObjectScriptScript
CachéCachéObjectObjectScriptScript
BasicBasicBasicBasic
Virtual MachineVirtual MachineVirtual MachineVirtual Machine
Data & ObjectsData & ObjectsData & ObjectsData & Objects
Any developer Any developer that knows VB that knows VB knows Cachéknows Caché
UML Composition (One to One)UML Composition (One to One)
/// This is the contained class in the composition/// This is the contained class in the composition/// and should be of type "serial"/// and should be of type "serial"Class Address Extends %SerialObject Class Address Extends %SerialObject [ [ ClassType = serialClassType = serial, ProcedureBlock ], ProcedureBlock ]{{Property city As %String;Property city As %String;Property number As %String;Property number As %String;Property street As %String;Property street As %String;Property zip As %String;Property zip As %String;}}
/// This is the container class in the composition/// This is the container class in the composition Class Person Extends %Persistent [ Class Person Extends %Persistent [ ClassType = ClassType = persistentpersistent, ProcedureBlock,], ProcedureBlock,]{{Property firstName As %String;Property firstName As %String;Property lastName As %String;Property lastName As %String;/// The container contains an Address, the Address/// The container contains an Address, the Address/// class in embedded in the Person class/// class in embedded in the Person classProperty personAddress As Address;Property personAddress As Address;}}
Serial embedded in %PersistentSerial embedded in %Persistent
set adr = ##class(Address).%New()set adr = ##class(Address).%New() // Create an Address object// Create an Address objectset adr.street = “Kippenlaan“set adr.street = “Kippenlaan“ // Populate street// Populate streetset adr.number = “24“set adr.number = “24“ // Populate number// Populate numberset adr.city = “Vilvoorde“set adr.city = “Vilvoorde“ // Populate city// Populate cityset adr.zip = “1800“set adr.zip = “1800“ // Populate zip// Populate zipset per = ##class(Person).%New()set per = ##class(Person).%New() // Create a Person object// Create a Person objectset per.firstName = “Jean-luc“set per.firstName = “Jean-luc“ // Populate firstName// Populate firstNameset per.lastName = “Dehaene” set per.lastName = “Dehaene” // Populate lastName// Populate lastNameset per.personAddress = adrset per.personAddress = adr // Populate personAddress// Populate personAddressdo per.%Save()do per.%Save() // Save the Person object// Save the Person object
UML Composition (One to Many)UML Composition (One to Many)
/// This is the contained class in the composition/// This is the contained class in the composition/// and should be of type "serial"/// and should be of type "serial"Class Address Extends %SerialObject Class Address Extends %SerialObject [ [ ClassType = serialClassType = serial, ProcedureBlock ], ProcedureBlock ]{{Property city As %String;Property city As %String;Property number As %String;Property number As %String;Property street As %String;Property street As %String;Property zip As %String;Property zip As %String;}}
/// This is the container class in the composition/// This is the container class in the composition Class Person Extends %Persistent [ ClassType = Class Person Extends %Persistent [ ClassType = persistent, ProcedureBlock ]persistent, ProcedureBlock ]{{Property firstName As %String;Property firstName As %String;Property lastName As %String;Property lastName As %String;/// The container contains Addresses, the Addresses/// The container contains Addresses, the Addresses/// are embedded in the Person class as a/// are embedded in the Person class as a/// ListOfObjects class/// ListOfObjects classProperty personAddresses As Address [ Collection Property personAddresses As Address [ Collection = list ];= list ];}}
Collection embedded in %PersistentCollection embedded in %Persistentset list = ##class(%Library.ListOfObjects).%New()set list = ##class(%Library.ListOfObjects).%New() // Create a collection of objects// Create a collection of objectsset adr1 = ##class(Address).%New()set adr1 = ##class(Address).%New() // Create a first new Address object// Create a first new Address objectset adr2 = ##class(Address).%New()set adr2 = ##class(Address).%New() // Create a second new Address object// Create a second new Address objectset adr1.street = "Acaciastraat“set adr1.street = "Acaciastraat“ // Populate first Address object// Populate first Address objectset adr1.number = "20“set adr1.number = "20“ // …// …set adr1.city = "Brussel“set adr1.city = "Brussel“ // …// …set adr1.zip = "1000“set adr1.zip = "1000“ // …// …set adr2.street = "Jozef Plateaustraat“set adr2.street = "Jozef Plateaustraat“ // Populate second Address object// Populate second Address objectset adr2.number = "24“set adr2.number = "24“ // …// …set adr2.city = "Gent“set adr2.city = "Gent“ // …// …set adr2.zip = "9000“set adr2.zip = "9000“ // …// …do list.Insert(adr1)do list.Insert(adr1) // Insert first Address in the collection// Insert first Address in the collection do list.Insert(adr2)do list.Insert(adr2) // Insert first Address in the collection// Insert first Address in the collection set per = ##class(Composition0toN.Person).%New()set per = ##class(Composition0toN.Person).%New() // Create a new Person object// Create a new Person objectset per.firstName = "Freya“set per.firstName = "Freya“ // Populate the Person object// Populate the Person objectset per.lastName = "Vandenbossche“set per.lastName = "Vandenbossche“ // …// …set per.personAddresses = listset per.personAddresses = list // Populate the collection// Populate the collectiondo per.%Save() do per.%Save() // Save the person object// Save the person object
UML Association (Relations = RI) (1)UML Association (Relations = RI) (1)(One to Many = Restrict delete)(One to Many = Restrict delete)
Class Employee Extends %Persistent [ ClassType = Class Employee Extends %Persistent [ ClassType = persistent, ProcedureBlock ]persistent, ProcedureBlock ]{{Relationship Department As Department Relationship Department As Department [ Cardinality = one, Inverse = Employees ];[ Cardinality = one, Inverse = Employees ];Index employeeDepartmentIndex On Department;Index employeeDepartmentIndex On Department;Property firstName As %String;Property firstName As %String;Property hireDate As %Library.Date;Property hireDate As %Library.Date;Property lastName As %String;Property lastName As %String;}}
Class Department Extends %Persistent Class Department Extends %Persistent [ ClassType = persistent, ProcedureBlock ][ ClassType = persistent, ProcedureBlock ]{{Relationship Employees As Employee Relationship Employees As Employee [ Cardinality = many, Inverse = Department ];[ Cardinality = many, Inverse = Department ];Property deptCode As %String;Property deptCode As %String;Property deptName As %String;Property deptName As %String;}}
UML Association (Relations = RI) (2)UML Association (Relations = RI) (2)(Parent - Children = Cascaded delete)(Parent - Children = Cascaded delete)
Class ParentChild.InvoiceLine Extends Class ParentChild.InvoiceLine Extends %Persistent [ ClassType = persistent, %Persistent [ ClassType = persistent, ProcedureBlock ]ProcedureBlock ]{{Relationship invoice As ParentChild.Invoice Relationship invoice As ParentChild.Invoice [ Cardinality = parent, Inverse = invoiceLines ];[ Cardinality = parent, Inverse = invoiceLines ];Property taxRate As %Float;Property taxRate As %Float;Property units As %Integer;Property units As %Integer;}}
Class Invoice Extends %Persistent [ ClassType = Class Invoice Extends %Persistent [ ClassType = persistent, ProcedureBlock ]persistent, ProcedureBlock ]{{Relationship invoiceLines As Relationship invoiceLines As ParentChild.InvoiceLine [ Cardinality = children, ParentChild.InvoiceLine [ Cardinality = children, Inverse = invoice ];Inverse = invoice ];Property invoiceDate As %Date;Property invoiceDate As %Date;Property invoiceDescription As %String;Property invoiceDescription As %String;Property invoiceNr As %String;Property invoiceNr As %String;}}
4. Tools and standaarden4. Tools and standaarden
Multi-DimensionalMulti-DimensionalStorage ManagerStorage ManagerMulti-DimensionalMulti-DimensionalStorage ManagerStorage Manager
CachéCachéObjectsObjectsCachéCachéObjectsObjects
CachéCachéSQL interfaceSQL interface
CachéCachéSQL interfaceSQL interface
DictionaryDictionaryDictionaryDictionary
PlatformsPlatformsPlatformsPlatforms
Tools en standaardenTools en standaardenTools en standaardenTools en standaarden
Caché Object ConnectivityCaché Object Connectivity
C++
C++
C++
C++
Java
Java
Java
Java
COM
COM
COM
COM
CachéCachéObjectsObjectsCachéCachéObjectsObjects
Multi-DimensionalMulti-DimensionalStorage ManagerStorage ManagerMulti-DimensionalMulti-DimensionalStorage ManagerStorage Manager
.. NETNE
T.. N
ETNETHigh-performance High-performance
links to all major links to all major object architecturesobject architectures
Caché for Web ApplicationsCaché for Web Applications
• Native connectivity to all Native connectivity to all major Web development major Web development technologiestechnologies
• CSP for optimized CSP for optimized development speed and development speed and scalabilityscalability
ASPASP.Net.NetASPASP.Net.Net
JSPJSPJ2EEJ2EEJSPJSP
J2EEJ2EE
CachéCachéCachéCaché CSPCSPCSPCSP
Web ServerWeb ServerWeb ServerWeb Server
++
WebWebPagePage
ObjectsObjects
WebWebPagePage
ObjectsObjectsCom
pile
rC
om
pile
rC
om
pile
rC
om
pile
r
Caché Server PagesCaché Server Pages
• High performance compiled objectsHigh performance compiled objects
• Single box to n-tier deployment Single box to n-tier deployment withwithnono modification modification
Code { BasedCode { Based
Development }Development }
Code { BasedCode { Based
Development }Development }
< Tag Based< Tag BasedDevelopment Development
>>
< Tag Based< Tag BasedDevelopment Development
>>
Caché & JavaCaché & Java
CachéCachéCachéCaché
JavaJavaApp.App.JavaJavaApp.App.
App.App.ServerServerApp.App.
ServerServer
EJBEJBEJBEJB
Object + SQLObject + SQL
• ““Classic” Java and Classic” Java and J2EEJ2EE
• Simultaneous object Simultaneous object and relational accessand relational access
Caché XMLCaché XML
XML
XML
XML
XML
CachéCachéObjectsObjectsCachéCachéObjectsObjects
Multi-DimensionalMulti-DimensionalStorage ManagerStorage ManagerMulti-DimensionalMulti-DimensionalStorage ManagerStorage Manager
EJB
EJB
EJB
EJB
C++
C++
C++
C++
Java
Java
Java
Java
COM
COM
COM
COMBi-directional conversionBi-directional conversion
between objects andbetween objects andmultiple XML formatsmultiple XML formats
Caché Web ServicesCaché Web Services
• High performance High performance Web Service for any Web Service for any Caché methodCaché method
• No middlewareNo middleware
CachéCachéCachéCaché
Any Caché ClassAny Caché ClassAny Caché ClassAny Caché Class
Web Service AdaptorWeb Service AdaptorWeb Service AdaptorWeb Service Adaptor
Web ServerWeb ServerWeb ServerWeb ServerSO
AP
WSD
L
CachéCaché
Multi-DimensionalMulti-DimensionalStorage ManagerStorage ManagerMulti-DimensionalMulti-DimensionalStorage ManagerStorage Manager
CachéCachéSQL interfaceSQL interface
CachéCachéSQL interfaceSQL interface
Your applicationsYour applicationsYour applicationsYour applications
CachéCachéObjectsObjectsCachéCachéObjectsObjects
DictionaryDictionaryDictionaryDictionary
XML
XML
XML
XML
EJB
EJB
EJB
EJB
C++
C++
C++
C++
Java
Java
Java
Java
COM
COM
COM
COM
ODB
CO
DBC
ODB
CO
DBC
JDBC
JDBC
JDBC
JDBC
Nativ
eNa
tive
link
link
Nativ
eNa
tive
link
link .Net.Net.Net.Net
J2EEJ2EEJ2EEJ2EE
CSPCSPCSPCSP
Web
Ser
ver
Web
Ser
ver
Web
Ser
ver
Web
Ser
ver
SOAPSOAPSOAPSOAP Others’Others’ Applications Applications
Others’Others’ Applications Applications
Your Web Your Web applicationsapplicationsYour Web Your Web
applicationsapplications
COM GatewayCOM GatewayCOM GatewayCOM Gateway SQL GatewaySQL GatewaySQL GatewaySQL Gateway MQ Series GatewayMQ Series GatewayMQ Series GatewayMQ Series Gateway
Demo’sDeel 3
Demo’sDemo’s
PopulatePopulate XMLXML SOAPSOAP Documentatie generatieDocumentatie generatie Bitmap indexenBitmap indexen ...(op aanvraag)......(op aanvraag)...
Q&A
UML Association (Zonder RI)UML Association (Zonder RI)(Referentiële integriteit via callback methods/methods)(Referentiële integriteit via callback methods/methods)
Class Department Extends %Persistent Class Department Extends %Persistent [ ClassType = persistent, ProcedureBlock ][ ClassType = persistent, ProcedureBlock ]{{Property manager As Employee [ Required ];Property manager As Employee [ Required ];Property deptCode As %String;Property deptCode As %String;Property deptName As %String;Property deptName As %String;}}
Class Employee Extends %Persistent [ ClassType = Class Employee Extends %Persistent [ ClassType = persistent, ProcedureBlock ]persistent, ProcedureBlock ]{{
Property manages As Department [ Required ]Property manages As Department [ Required ]Property firstName As %String;Property firstName As %String;Property hireDate As %Library.Date;Property hireDate As %Library.Date;Property lastName As %String;Property lastName As %String;}}
• Deel 4