SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
abcdefg
Gemstone Notifications
Implementation of an abstract Gemstone
notification mechanism
presented by
Alfred Wullschleger
Swiss National Bank
abcdefg
awu060710 2
The Author
● Smalltalker since 1992
● Project OVID at Fides Informatik (1992-1999)
– OVID currently in production more than 11 years
● Project OASE at Swiss National Bank (since
1999 in production)
– Financial Statistics from Swiss Banks and
Companies
– based on Gemstone/S and VisualWorks
– ongoing development under full production
abcdefg
awu060710 3
Gemstone Notification Basics
● a GS session declares interest in change
notification for anObject by:
– System addToNotifySet: anObject
● whenever anObject changes and is commited (typically
by another session), execution of
– System signaledObjects
● returns an array including anObject and the
signaledObjects are cleared by this operation
● by this you can poll for changed objects if you like
abcdefg
awu060710 4
Gemstone Notification Handler
● using
– System enableSignaledObjectsError
● allows for the following Gemstone exception:
– Exception installStaticException:
[:theException :cat :num :args |
„... do here whatever is interesting... „
System enableSignaledObjectsError]
category: GemStoneError
number: (ErrorSymbols at: #rtErrSignalCommit).
abcdefg
awu060710 5
Goal: Abstract Notification
● We want to have a highly standardized way of
notification
– do not use the objects, that are just there from
application perspective
● it has to be fully conflict free
– any session can commit independently
– there can be as many notifiers as you like
abcdefg
awu060710 6
Mechanisms
„Event Side“:
Objects that are committed
and want to inform
other Objects
about this
„Event Handler Side“:
a Session, that wants to
know, when certain Objects
are changed and commited
use tpzNotify as an „Event“
mediated by a TpzNotification
uses a TpzNotificationReceiver
as „Event handler“
to execute the necessary actions
complete separation of
Generation and Handling
abcdefg
awu060710 7
Event Side: 2 Classes
● TpzNotification
– notifierSymbol: defines a notification by a symbol
– sessionValues:
● an array of size System maxSessionId.
● containing a TpzNotificationElement for each possible
session
● TpzNotificationElement
– has a value (anInteger) and a sessionId. The
sessionId is used for quick lookup in the
sessionValues
abcdefg
awu060710 8
Event Side: Notification
● TpzNotification>>tpzNotify
– (sessionValues at: System session) tpzNotify
● TpzNotificationElement>>tpzNotify
– value := value + 1
● could also use value := value not
● since all parallel GS sessions have different
sessionIds, there cannot occur any collision
● since index lookup in the array is fast, no
problem even for 1000 sessions
abcdefg
awu060710 9
Handler Side: 2 Classes
● Where do we put TpzNotificationReceivers (the
handlers for the notifications)?
– into session state
– can use index 20 (user slot in session state)
● define a holder for all notificationReceivers:
TpzNotificationReceiverCollection
– collects all notification receivers
– implements the notification exception
– dispatches notifications to the corresponding
receivers
abcdefg
awu060710 10
TpzNotificationReceiver
● Defines a process loop, which is activated by its
corresponding TpzNotification
– registerForNotification: aSymbol
● gets the corresponding TpzNotification
● inits the process loop
● inserts itself into the TpzNotificationReceiverCollection
● executes the first update
abcdefg
awu060710 11
TpzNotificationReceiverCollection
● main Methods:
– addNotificationReceiver: aNotificationReceiver
receivers at: aNotificationReceiver class
put: aNotificationReceiver
– notifierSignaled
| notelems |
notelems := System signaledObjects.
receivers do: [:each |
each notifierSignaled: notelems].
● called from the exception
abcdefg
awu060710 12
Dispatch of signaledObjects
● in TpzNotificationReceiver:
● notifierSignaled: signaledObjects
(tpzNotification hasSignaledObjects: signaledObjects)
ifFalse: [signalingInformation := nil. ^self].
signalingInformation := signaledObjects.
processSemaphore signal
● in TpzNotification:
● hasSignaledObjects: signaledObjects
signaledObjects detect: [ :elem |
(sessionValues at: elem sessionId ) == elem ]
ifNone: [ ^false ].
^true
● is quick, since typically few signaledObjects
abcdefg
awu060710 13
Receivers for specific Notifications
● each specific receiver is a subclass of
TpzNotificationReceiver
– must implement 2 methods:
● class side: notifierSymbol
– to declare, which Notification is accepted by this receiver
● instance side: executeUpdateFromNotification
– the activation of the code for which the notification is all about
abcdefg
awu060710 14
Demo
● We have two Handlers for the same
notifierSymbol #SimpleNotification:
– SimpleNotificationHandler
● waits 15 seconds, then returns a string
– SecondSimpleNotificationHandler
● waits 5 seconds, then returns some other string
– during the waiting, the results of the handlers are nil
abcdefg
awu060710 15
Thank you for listening
Questions?

Contenu connexe

En vedette

Migration from VSE to VW with Pollock
Migration from VSE to VW with PollockMigration from VSE to VW with Pollock
Migration from VSE to VW with PollockESUG
 
Forward Chaining in HALO
Forward Chaining in HALOForward Chaining in HALO
Forward Chaining in HALOESUG
 
Google Summer of Code & Summertalk
Google Summer of Code & SummertalkGoogle Summer of Code & Summertalk
Google Summer of Code & SummertalkESUG
 
AIDA/Scribo
AIDA/ScriboAIDA/Scribo
AIDA/ScriboESUG
 
Helvetia
HelvetiaHelvetia
HelvetiaESUG
 
Promoting Smalltalk
Promoting SmalltalkPromoting Smalltalk
Promoting SmalltalkESUG
 
Vg 2007 catalog 11 20
Vg 2007 catalog 11 20Vg 2007 catalog 11 20
Vg 2007 catalog 11 20wldbil
 

En vedette (8)

Migration from VSE to VW with Pollock
Migration from VSE to VW with PollockMigration from VSE to VW with Pollock
Migration from VSE to VW with Pollock
 
Forward Chaining in HALO
Forward Chaining in HALOForward Chaining in HALO
Forward Chaining in HALO
 
Google Summer of Code & Summertalk
Google Summer of Code & SummertalkGoogle Summer of Code & Summertalk
Google Summer of Code & Summertalk
 
AIDA/Scribo
AIDA/ScriboAIDA/Scribo
AIDA/Scribo
 
Helvetia
HelvetiaHelvetia
Helvetia
 
Promoting Smalltalk
Promoting SmalltalkPromoting Smalltalk
Promoting Smalltalk
 
Vg 2007 catalog 11 20
Vg 2007 catalog 11 20Vg 2007 catalog 11 20
Vg 2007 catalog 11 20
 
Vg 2007 catalog 90 99
Vg 2007 catalog 90 99Vg 2007 catalog 90 99
Vg 2007 catalog 90 99
 

Similaire à Gemstone Notifications

Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Sylvain Hallé
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationWayne Jones Jnr
 
Contiki Operating system tutorial
Contiki Operating system tutorialContiki Operating system tutorial
Contiki Operating system tutorialSalah Amean
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OSC.U
 
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)Sylvain Hallé
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyAnne Nicolas
 
Running a Scalable And Reliable Symfony2 Application in Cloud (Symfony Sweden...
Running a Scalable And Reliable Symfony2 Application in Cloud (Symfony Sweden...Running a Scalable And Reliable Symfony2 Application in Cloud (Symfony Sweden...
Running a Scalable And Reliable Symfony2 Application in Cloud (Symfony Sweden...Ville Mattila
 
Introduction to Reactive programming
Introduction to Reactive programmingIntroduction to Reactive programming
Introduction to Reactive programmingDwi Randy Herdinanto
 
A Presentation on Automatic conveyor belt system
A Presentation on Automatic conveyor belt systemA Presentation on Automatic conveyor belt system
A Presentation on Automatic conveyor belt systemDHRUVIT KHARADI
 
Didactum SNMP Manual
Didactum SNMP ManualDidactum SNMP Manual
Didactum SNMP ManualDidactum
 
K-ODonnel_UPS-DICOM-Unified-Procedure-Step-Draft-V2.ppt
K-ODonnel_UPS-DICOM-Unified-Procedure-Step-Draft-V2.pptK-ODonnel_UPS-DICOM-Unified-Procedure-Step-Draft-V2.ppt
K-ODonnel_UPS-DICOM-Unified-Procedure-Step-Draft-V2.pptAliDoostmohammadi3
 
Angular change detection - Dakar Promise JS meetup
Angular change  detection - Dakar Promise JS meetupAngular change  detection - Dakar Promise JS meetup
Angular change detection - Dakar Promise JS meetupCheikh Omar SOW
 
RxJava 2 Reactive extensions for the JVM
RxJava 2  Reactive extensions for the JVMRxJava 2  Reactive extensions for the JVM
RxJava 2 Reactive extensions for the JVMNetesh Kumar
 
Taming event-driven software via formal verification
Taming event-driven software via formal verificationTaming event-driven software via formal verification
Taming event-driven software via formal verificationAdaCore
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonfNataliya Patsovska
 
Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingGabor Paller
 
Concurrency 2010
Concurrency 2010Concurrency 2010
Concurrency 2010敬倫 林
 
Qt Framework Events Signals Threads
Qt Framework Events Signals ThreadsQt Framework Events Signals Threads
Qt Framework Events Signals ThreadsNeera Mital
 

Similaire à Gemstone Notifications (20)

Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3
 
Chapter 6 - Process Synchronization
Chapter 6 - Process SynchronizationChapter 6 - Process Synchronization
Chapter 6 - Process Synchronization
 
Contiki Operating system tutorial
Contiki Operating system tutorialContiki Operating system tutorial
Contiki Operating system tutorial
 
OSCh7
OSCh7OSCh7
OSCh7
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OS
 
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
 
Running a Scalable And Reliable Symfony2 Application in Cloud (Symfony Sweden...
Running a Scalable And Reliable Symfony2 Application in Cloud (Symfony Sweden...Running a Scalable And Reliable Symfony2 Application in Cloud (Symfony Sweden...
Running a Scalable And Reliable Symfony2 Application in Cloud (Symfony Sweden...
 
Introduction to Reactive programming
Introduction to Reactive programmingIntroduction to Reactive programming
Introduction to Reactive programming
 
A Presentation on Automatic conveyor belt system
A Presentation on Automatic conveyor belt systemA Presentation on Automatic conveyor belt system
A Presentation on Automatic conveyor belt system
 
Didactum SNMP Manual
Didactum SNMP ManualDidactum SNMP Manual
Didactum SNMP Manual
 
K-ODonnel_UPS-DICOM-Unified-Procedure-Step-Draft-V2.ppt
K-ODonnel_UPS-DICOM-Unified-Procedure-Step-Draft-V2.pptK-ODonnel_UPS-DICOM-Unified-Procedure-Step-Draft-V2.ppt
K-ODonnel_UPS-DICOM-Unified-Procedure-Step-Draft-V2.ppt
 
Angular change detection - Dakar Promise JS meetup
Angular change  detection - Dakar Promise JS meetupAngular change  detection - Dakar Promise JS meetup
Angular change detection - Dakar Promise JS meetup
 
RxJava 2 Reactive extensions for the JVM
RxJava 2  Reactive extensions for the JVMRxJava 2  Reactive extensions for the JVM
RxJava 2 Reactive extensions for the JVM
 
Taming event-driven software via formal verification
Taming event-driven software via formal verificationTaming event-driven software via formal verification
Taming event-driven software via formal verification
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonf
 
Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processing
 
Concurrency 2010
Concurrency 2010Concurrency 2010
Concurrency 2010
 
Qt Framework Events Signals Threads
Qt Framework Events Signals ThreadsQt Framework Events Signals Threads
Qt Framework Events Signals Threads
 
Apache flink
Apache flinkApache flink
Apache flink
 

Plus de ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

Plus de ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Dernier

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Gemstone Notifications

  • 1. abcdefg Gemstone Notifications Implementation of an abstract Gemstone notification mechanism presented by Alfred Wullschleger Swiss National Bank
  • 2. abcdefg awu060710 2 The Author ● Smalltalker since 1992 ● Project OVID at Fides Informatik (1992-1999) – OVID currently in production more than 11 years ● Project OASE at Swiss National Bank (since 1999 in production) – Financial Statistics from Swiss Banks and Companies – based on Gemstone/S and VisualWorks – ongoing development under full production
  • 3. abcdefg awu060710 3 Gemstone Notification Basics ● a GS session declares interest in change notification for anObject by: – System addToNotifySet: anObject ● whenever anObject changes and is commited (typically by another session), execution of – System signaledObjects ● returns an array including anObject and the signaledObjects are cleared by this operation ● by this you can poll for changed objects if you like
  • 4. abcdefg awu060710 4 Gemstone Notification Handler ● using – System enableSignaledObjectsError ● allows for the following Gemstone exception: – Exception installStaticException: [:theException :cat :num :args | „... do here whatever is interesting... „ System enableSignaledObjectsError] category: GemStoneError number: (ErrorSymbols at: #rtErrSignalCommit).
  • 5. abcdefg awu060710 5 Goal: Abstract Notification ● We want to have a highly standardized way of notification – do not use the objects, that are just there from application perspective ● it has to be fully conflict free – any session can commit independently – there can be as many notifiers as you like
  • 6. abcdefg awu060710 6 Mechanisms „Event Side“: Objects that are committed and want to inform other Objects about this „Event Handler Side“: a Session, that wants to know, when certain Objects are changed and commited use tpzNotify as an „Event“ mediated by a TpzNotification uses a TpzNotificationReceiver as „Event handler“ to execute the necessary actions complete separation of Generation and Handling
  • 7. abcdefg awu060710 7 Event Side: 2 Classes ● TpzNotification – notifierSymbol: defines a notification by a symbol – sessionValues: ● an array of size System maxSessionId. ● containing a TpzNotificationElement for each possible session ● TpzNotificationElement – has a value (anInteger) and a sessionId. The sessionId is used for quick lookup in the sessionValues
  • 8. abcdefg awu060710 8 Event Side: Notification ● TpzNotification>>tpzNotify – (sessionValues at: System session) tpzNotify ● TpzNotificationElement>>tpzNotify – value := value + 1 ● could also use value := value not ● since all parallel GS sessions have different sessionIds, there cannot occur any collision ● since index lookup in the array is fast, no problem even for 1000 sessions
  • 9. abcdefg awu060710 9 Handler Side: 2 Classes ● Where do we put TpzNotificationReceivers (the handlers for the notifications)? – into session state – can use index 20 (user slot in session state) ● define a holder for all notificationReceivers: TpzNotificationReceiverCollection – collects all notification receivers – implements the notification exception – dispatches notifications to the corresponding receivers
  • 10. abcdefg awu060710 10 TpzNotificationReceiver ● Defines a process loop, which is activated by its corresponding TpzNotification – registerForNotification: aSymbol ● gets the corresponding TpzNotification ● inits the process loop ● inserts itself into the TpzNotificationReceiverCollection ● executes the first update
  • 11. abcdefg awu060710 11 TpzNotificationReceiverCollection ● main Methods: – addNotificationReceiver: aNotificationReceiver receivers at: aNotificationReceiver class put: aNotificationReceiver – notifierSignaled | notelems | notelems := System signaledObjects. receivers do: [:each | each notifierSignaled: notelems]. ● called from the exception
  • 12. abcdefg awu060710 12 Dispatch of signaledObjects ● in TpzNotificationReceiver: ● notifierSignaled: signaledObjects (tpzNotification hasSignaledObjects: signaledObjects) ifFalse: [signalingInformation := nil. ^self]. signalingInformation := signaledObjects. processSemaphore signal ● in TpzNotification: ● hasSignaledObjects: signaledObjects signaledObjects detect: [ :elem | (sessionValues at: elem sessionId ) == elem ] ifNone: [ ^false ]. ^true ● is quick, since typically few signaledObjects
  • 13. abcdefg awu060710 13 Receivers for specific Notifications ● each specific receiver is a subclass of TpzNotificationReceiver – must implement 2 methods: ● class side: notifierSymbol – to declare, which Notification is accepted by this receiver ● instance side: executeUpdateFromNotification – the activation of the code for which the notification is all about
  • 14. abcdefg awu060710 14 Demo ● We have two Handlers for the same notifierSymbol #SimpleNotification: – SimpleNotificationHandler ● waits 15 seconds, then returns a string – SecondSimpleNotificationHandler ● waits 5 seconds, then returns some other string – during the waiting, the results of the handlers are nil
  • 15. abcdefg awu060710 15 Thank you for listening Questions?