/
POJO Scalability and Large Workloads with TerracottaJonas BonrTerraco POJO Scalability and Large Workloads with TerracottaJonas BonrTerraco

POJO Scalability and Large Workloads with TerracottaJonas BonrTerraco - PDF document

sophia2
sophia2 . @sophia2
Follow
344 views
Uploaded On 2021-06-30

POJO Scalability and Large Workloads with TerracottaJonas BonrTerraco - PPT Presentation

Hacker OSS evangelist Agile PractitionerFounder of AspectWerkzCommitter to Eclipse AspectJCommitter to TerracottaSki and Jazz fanaticCurrently learningHaskell ErlangHow to become a better ID: 850105

app jvm master terracotta jvm app terracotta master server web worker data frameworks workeventwe objects clustering grid serverclustering scale

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "POJO Scalability and Large Workloads wit..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1 POJO Scalability and Large Workloads wit
POJO Scalability and Large Workloads with TerracottaJonas BonérTerracotta, Inc.jonas@terracottatech.com -Hacker, OSS evangelist, Agile

2 Practitioner-Founder of AspectWerkz-Com
Practitioner-Founder of AspectWerkz-Committer to Eclipse AspectJ-Committer to Terracotta-Ski and Jazz fanatic-Currently learning:-Has

3 kell, Erlang-How to become a better dad
kell, Erlang-How to become a better dad Goal of this sessionLearn how JVM-level clusteringand works at a high levelLearn how use it to

4 scale-out POJO-basedapplications using
scale-out POJO-basedapplications using Master/WorkerLocality of Reference Grids -What’s Behind the Buzz?Case-study –Distributed Web S

5 pider:Cluster It Using JVM-level Cluster
pider:Cluster It Using JVM-level ClusteringRun It as a Grid What is a Grid?Here is one definition: “A is a set of servers data an

6 d operationscan move seamlessly across
d operationscan move seamlessly across the grid in order to optimize the performance and scalability of the computing tasks submitted

7 to the grid.” Ultimate: Work is “Embarr
to the grid.” Ultimate: Work is “Embarrassingly Parallel”- In contrast to “traditional”distributed computing in Grids: Master/Worke

8 r in a Box? Master/Worker pattern •1 Mas
r in a Box? Master/Worker pattern •1 Master•1-N Workers•1 Shared Memory Space•Common applications•Financial Risk Analysis and other Si

9 mulationsSearching / aggregation on larg
mulationsSearching / aggregation on large datasets•Sales Order pipeline processing wait/notify –synchronized How can we implement Mast

10 er/Worker in Java?lHighly tuned, high-le
er/Worker in Java?lHighly tuned, high-level abstractions•Direct support for Master/WorkerDoes not separate MasterProvides no informati

11 on about Work CommonJWorkManager CommonJ
on about Work CommonJWorkManager CommonJWorkManager Yes, clustering is a solution -but we want: Preservation of Object Identity -no se

12 rialization, infrastructure service -a
rialization, infrastructure service -a deployment artifact Scale-out Scale independentlyTerracotta ServerClustering the JVM Terracott

13 a ServerClustering the JVM App Server We
a ServerClustering the JVM App Server Web App JVM Frameworks Frameworks Business Logic App Server Web App JVM Frameworks Frameworks Bu

14 siness Logic App Server Web App JVM Fram
siness Logic App Server Web App JVM Frameworks Frameworks Business Logic JMS Terracotta Use Cases eTail-HA for Shopping CartTelco -HA

15 for User SessionsSAAS -Online Testing Se
for User SessionsSAAS -Online Testing Services Mobile -Mobile Search ContentMedia -Content AggregationPublication -Content CachingFin

16 ancial Services -Matching EngineFinancia
ancial Services -Matching EngineFinancial Services -Trading ApplicationLogistics -Reporting ApplicationsEtail-CatalogHealthcare -Avail

17 ability of Patient InformationOnline Gam
ability of Patient InformationOnline Gaming -Customer Account BalancePublishing -Reference DataManufacturing -Dealership Inventory eTa

18 il-Ticketing and Seating AvailabilityCon
il-Ticketing and Seating AvailabilityConstruction -Financial ReportingeTail-Order ProcessingFinancial Service -Order ProcessingFinanci

19 al Services / Telco -Data GridOnline Gam
al Services / Telco -Data GridOnline Gaming -Game Table Coordination Clustering POJO’sClustering SpringCoordination / Eventing Cluster

20 ing the JVM Clustering the JVM Scale-out
ing the JVM Clustering the JVM Scale-outTerracotta Server (ACTIVE)Clustering the JVM Terracotta Server (ACTIVE)Clustering the JVM App

21 Server Web App JVM Any Java Objects Any
Server Web App JVM Any Java Objects Any Framework Sessions Objects App Server Web App JVM Any Java Objects Any Framework Sessions Obje

22 cts App Server Web App JVM Any Java Obje
cts App Server Web App JVM Any Java Objects Any Framework Sessions Objects Terracotta Library Terracotta Library Terracotta LibraryHA

23 Active / Passive PairTerracotta ServerCl
Active / Passive PairTerracotta ServerClustering the JVM Terracotta ServerClustering the JVM Local JVM Client Terracotta Server Distri

24 buted Synchronized Dynamicpaging Scale-
buted Synchronized Dynamicpaging Scale-out App Server Web App JVM TC Libraries Shared Terracotta ServerClustering the JVM Terracotta

25 ServerClustering the JVM App Server Web
ServerClustering the JVM App Server Web App JVM TC Libraries Shared App Server Web App JVM TC Libraries Shared Terracotta Features Man

26 agementConsole ManagementConsole Eclipse
agementConsole ManagementConsole Eclipse IntegrationError ReportingApplication Analyzer (upcoming)Cache Hits POJOs-Standard JDK 1.5 co

27 de Data resides on the “network”-fail-ov
de Data resides on the “network”-fail-over to any Demo: Master/Worker Case study1.Implement a Master/Worker “container”2.Implement a

28 Web Crawler that uses our “container”Cl
Web Crawler that uses our “container”Cluster it with Terracotta4. CommonJWorkManagerspecification 1extends Runnable{ intgetStatus();

29 CommonJWorkManagerspecification 2WorkIte
CommonJWorkManagerspecification 2WorkItemschedule(Workwork);WorkItemschedule(Workwork, WorkListenerlistener);booleanwaitForAll(Collect

30 ionworkItems, CommonJWorkManagerspecifi
ionworkItems, CommonJWorkManagerspecification 3void workAccepted(WorkEventwe);void workRejected(WorkEventwe);void workStarted(WorkEve

31 ntwe);void workCompleted(WorkEventwe); C
ntwe);void workCompleted(WorkEventwe); CommonJWorkManagerspecification 4intWORK_ACCEPTED = 1;intWORK_REJECTED = 2;intWORK_STARTED

32 = 3;intWORK_COMPLETED = 4;public intgetT
= 3;intWORK_COMPLETED = 4;public intgetType();public WorkItemgetWorkItem();public WorkExceptiongetException(); 1. Let’s look at the co

33 de for Master/Worker Grabs the page from
de for Master/Worker Grabs the page from a URLDoes something with it –for example indexes it using Parses them and…so on…you get the i

34 deafor a URLto apage to parsegathers all
deafor a URLto apage to parsegathers all its URLsFor each new URL: GOTO 1.We are using the Master/Worker “container”to application th

35 at needs it –in the whole grid Terracott
at needs it –in the whole grid Terracotta configuration&#xroot;&#xs000;&#xroot;org.tc.workmanager..*&#x/cla;&#xss-e;&#xxpre;&#xssio;&#

36 xn000;&#x/inc;&#xlude;org.tc.spider..*&#
xn000;&#x/inc;&#xlude;org.tc.spider..*&#x/cla;&#xss-e;&#xxpre;&#xssio;&#xn000;&#x/inc;&#xlude;&#x/ins;&#xtrum;nte; -cl; sse;

37 &#xs000; Master and Worker are operating
&#xs000; Master and Worker are operating on the exact same butstill localWorkItemMemory (NAM) Network-Attached Memory (NAM) Master Wor

38 kItemwi= new MyWorkItem();WorkItemwi= q.
kItemwi= new MyWorkItem();WorkItemwi= q.poll(); Ordering matters? –no state in publicclass work, WorkListenerlistener);Data affinity -

39 “Sticky routing” WorkListenerpublic void
“Sticky routing” WorkListenerpublic void WorkListener#workRejected(WorkEventwe);public void workRejected(WorkEventwe) {Expectioncause

40 = we.getException();WorkItemwi= we.getWo
= we.getException();WorkItemwi= we.getWorkItem(); (instead of a &#xT000;LinkedBlockingQueue)2.Let your Workimplement Comparable3.Creat

41 e a custom &#xT000;ComparatorComparator
e a custom &#xT000;ComparatorComparator c = new&#xID00;&#xID00;Comparator()publicint Work timestamp –Master checks for timeoutWorker h

42 olds an “is-alive-lock”that Master Has
olds an “is-alive-lock”that Master Has 2 queues -pending and result Very high volumes of data –Result 1 Very high volumes of data -Ba

43 tching Very high volumes of data –Result
tching Very high volumes of data –Result 2 Wrap up: developer benefitsWork with plain POJOsEvent-driven development•Does not require e

44 xplicit threading and guardingTest on a
xplicit threading and guardingTest on a single JVM, deploy on multiple JVMsWhite box implementation•Freedom to design Master, Worker,

45 routing algorithms, fail-over schemes et
routing algorithms, fail-over schemes etc. the way you need Learn moreCheckout the source:• http://terracotta.org http://jonasboner.co

46 m/2007/01/29/how-to-build-a-pojo-based-d
m/2007/01/29/how-to-build-a-pojo-based-data-grid- Documentation and blogs:•http://terracotta.org • http://jonasboner.com Questions? Th