1 / 28

İleri Seviyede Oracle Ön Bellek Mekanizması ( Oracle Coherence )

İleri Seviyede Oracle Ön Bellek Mekanizması ( Oracle Coherence ). Ahmet Fuat SUNGUR afsungur@gmail.com @ afsungur 11.10.2012 – Bahçeşehir University. Who am i. Y.T.U – Computer Engineering I.T.U – Computer Engineering , not completed Since 2008, Turkcell Technology.

cheng
Download Presentation

İleri Seviyede Oracle Ön Bellek Mekanizması ( Oracle Coherence )

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. İleri Seviyede Oracle Ön Bellek Mekanizması(OracleCoherence) Ahmet Fuat SUNGUR afsungur@gmail.com @afsungur 11.10.2012 – BahçeşehirUniversity

  2. Who am i • Y.T.U – ComputerEngineering • I.T.U – ComputerEngineering, not completed • Since 2008, TurkcellTechnology afsungur@gmail.com @afsungur

  3. Agenda • What is thecacheandbuffer? • Whyweusecachesin designingprogramming? • OracleCoherence • Features • Demos • Final

  4. Buffer Memory • Abuffer is a region of a physical memory storage used to temporarily hold data while it is being moved from one place to another. • Itis a temporary memory location that is traditionally used because CPU instructions cannot directly address data stored in peripheral devices.

  5. Caching • Acacheis a component that transparently stores data so that future requests for that data can be served faster.

  6. Caching • CPU Cache • TLB ( TranslationLookasideBuffer ) • Disk Cache • Web Cache • DNS Cache

  7. Cache in Programming APPLICATION request response response request DB

  8. OracleCoherence • A variety of cachingstrategies • Reportingandadministratorsupportvia JMX andassociatedtools • RichlanguagesupportviaCoherence*Extend • Has nosinglepoint of failure • Automaticallyandtransparentlyfailsoverandredistributesitsclustered data managementsservices. • Automaticallyscaleupyourapplicationwhen a server added

  9. What is Coherence Cluster Node • A Coherence Cluster node • Sometimesreferredto as a memberorclustermember • Is a javaprocess • Joins a cluster • Is an instance of Coherence server • Can contain data, runprocessingandserveevents • Is oftendefinedby a cacheconfiguration • localstorage.enabled = true => nodecontains data JVM 1 PID : 5654 NODE 1 JVM 2 PID : 5655 NODE 2 JVM 3 PID : 5656 NODE 3

  10. Clustering in Coherence • Using a conference room model • -Dtangosol.coherence.cluster=name • Listening • Discovery • WorkingGroupsandPrivateConversation • Deathdetection • FailedServers • Failover • Failback

  11. CoherenceCacheTopologyExamples • LocalCache • ReplicatedCache JVM LocalCache JVM JVM JVM ReplicatedCache ReplicatedCache ReplicatedCache

  12. CoherenceCacheTopologyExamples • PartitionedCache ( Distributed Cache ) • NearCache JVM JVM JVM PartitionedCache Back Front JVM JVM JVM LocalCache PartitionedCache

  13. ReplicatedCacheAnimation Cache Data Grid Seamlesslygetallcache data and put into in itsowncache Add a customer 1,2 1,2 1,2 3 3 3

  14. PartitonedCacheAnimation Cache Data Grid Add a customer 3 1 2

  15. NearCacheAnimation Generally, LocalCache is used forfrontcache, because of ~0 cost returns 2 toapp Fromfrontcache returns 2 from backcacheand write it tofrontcache returns 1 from frontcache requests 1 from Front cache requests 2 from Front cache Front Cache 3 2 4 1 2 noneedtoaccess backcache it’sneedtoaccess backcache BackCache Generally, PartitionedCache is used forbackcache, because of accessing muchmore data. 3 4 1 2

  16. NearCacheAnimation • NearCacheinvalidationstrategies • Listen None • Listen Present • Listen All • Listen Auto Updates 2 to Front cache Front Cache 3 2 4 1 2 BackCache 3 4 1 2

  17. Failover

  18. When data source is involved • Read-Through • Write-Through • Write-Behind • Refresh-AheadCaching

  19. Read Through Caching

  20. Write Through Caching

  21. Write-BehindCaching • Improvesapplicationperformance • Reducesdatabaseload • Insulatedfromdatabasefailures • LinearScalibility

  22. Refresh-Ahead • Twoparameters • Expiration time • Refresh-aheadfactor Expiration time:60 seconds RefreshAheadfactor :0.5 Request «1» @13:45:10 Database 48-10>60*05, Sononeedtoreload 24-15<60*05 Soweneedtoreload Getobject 2 fromdb put intothecache Request «2» @13:45:15 Gotfreshobjectfromdb ( obj 2 ) 13:46:15

  23. EventandParallelProcessing • Coherencesupportstwo background processingmodels • ParallelProcessing • Events • Maplistenerswhicharecalledasynchronouslyafter data changes • Maptriggerswhicharecalledsynchronouslybefore data changes

  24. QueriesandFilters • Coherencesupportstwoquerymechanism • A filtermechanism, usefulforeventsandeventfilters • MapEventFilter • AndFilter, OrFilter • … • A SQL-Likemechanismknown as theCoherence Query Language usefulforqueriesagainstcaches • SELECT result-set | * FROM cache-name WHERE conditional-expression • Select * fromcustomerswhere name like ‘%ap%’ • Select max(price) fromstockswherelastupdatedate • Select avg(price) fromstocks • Insert, update, delete…

  25. Demo Time • Oracle Virtual Box 4.1 • Oracle Enterprise Linux • OEPE ( Oracle Enterprise PackageforEclipse ) • OracleCoherence 3.7.1

  26. Other • Coherence Security • Coherence Management • Managingandmonitoringvia JMX • CoherenceReporter • Coherence*Extend • Coherence*Web

  27. Summary

More Related