Upload
eren-avsarogullari
View
285
Download
2
Embed Size (px)
Citation preview
SPRINGONE2GXWASHINGTON, DC
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and l icensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Spring Integration Hazelcast Extension
By Eren Avşaroğullarıerenavsarogullari @eavsarogullari
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 2
About Me
Work :Senior Software Engineer @ Worked in telecomunication, finance domains last ten years
Open Source / Tech Community : Spring Integration Committer erenavsarogullari Blog => onlinetechvision.com /
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 3
Agenda
What is Hazelcast? Spring Integration(SI) Hazelcast(HZ) Inbound Channel Adapter Continuous Query(CQ) Inbound Channel Adapter Cluster Monitor(CM) Inbound Channel Adapter Distributed SQL(DS) Inbound Channel Adapter Outbound Channel Adapter Summary
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 4
What is Hazelcast?
In-Memory Data Grid - JCache Provider - Apache 2 License - Small jar(7 MB) Distributed Data Structures Distributed Events Distributed Query JCache Provider Spring Support Client API
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 5
Agenda What is Hazelcast? Spring Integration(SI) Hazelcast(HZ) Inbound Channel
Adapter Continuous Query(CQ) Inbound Channel Adapter Cluster Monitor(CM) Inbound Channel Adapter Distributed SQL(DS) Inbound Channel Adapter Outbound Channel Adapter Summary
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
SI - HZ Inbound Channel Adapter
SI App I
Hz Instance II
Hazelcast
Instance I
Hz Inbound Channel AdapterSI App II
Hz Instance IIIHz Inbound Channel Adapter
Hazelcast Cluster
6
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
SI - HZ Inbound Channel Adapter
SI App I
Hz Instance II
External(Non-SI) HZ Events
distributedMap.put("key1", "value1"); Hazelca
stInstanc
e I
Hz Inbound Channel AdapterSI App II
Hz Instance IIIHz Inbound Channel Adapter
Hazelcast Cluster
7
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
SI - HZ Inbound Channel Adapter
SI App I
Hz Instance II
External(Non-SI) HZ Events
distributedMap.put("key1", "value1"); Hazelca
stInstanc
e I
Hz Inbound Channel AdapterSI App II
Hz Instance IIIHz Inbound Channel Adapter
Hazelcast Cluster
Internal HZ Events
distributedMap.put("key2", "value2");
8
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 9
SI - HZ Inbound Channel Adapter
Supported Cache Types : IMap, MultiMap, ReplicatedMap, IList, ISet, IQueue, ITopic.
Supported Cache Event Types :
IMap and MultiMap => ADDED, REMOVED, UPDATED, EVICTED, EVICT_ALL and CLEAR_ALL.ReplicatedMap => ADDED, REMOVED, UPDATED, EVICTED.IList, ISet and IQueue => ADDED, REMOVED / ITopic => Not required
Xml based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 10
SI - HZ Inbound Channel AdapterJavaConfig based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 11
Agenda
What is Hazelcast? Spring Integration(SI) Hazelcast(HZ) Inbound Channel Adapter Continuous Query(CQ) Inbound Channel Adapter Cluster Monitor(CM) Inbound Channel Adapter Distributed SQL(DS) Inbound Channel Adapter Outbound Channel Adapter Summary
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 12
CQ Inbound Channel Adapter
Supported Cache Types : IMapSupported Cache Event Types :
ADDED, REMOVED, UPDATED, EVICTED, EVICT_ALL and CLEAR_ALL.
Xml based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 13
CQ Inbound Channel AdapterJavaConfig based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 14
Agenda
What is Hazelcast? Spring Integration(SI) Hazelcast(HZ) Inbound Channel Adapter Continuous Query(CQ) Inbound Channel Adapter Cluster Monitor(CM) Inbound Channel Adapter Distributed SQL(DS) Inbound Channel Adapter Outbound Channel Adapter Summary
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 15
CM Inbound Channel Adapter
Supported Monitor Types :
MEMBERSHIP, DISTRIBUTED_OBJECT, MIGRATION, LIFECYCLE, CLIENT
Xml based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 16
CM Inbound Channel Adapter
JavaConfig based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 17
Agenda
What is Hazelcast? Spring Integration(SI) Hazelcast(HZ) Inbound Channel Adapter Continuous Query(CQ) Inbound Channel Adapter Cluster Monitor(CM) Inbound Channel Adapter Distributed SQL(DS) Inbound Channel Adapter Outbound Channel Adapter Summary
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 18
DS Inbound Channel Adapter
Supported Cache Types : IMap
Supported Iteration Types : ENTRY, KEY, LOCAL_KEY, VALUE.
Xml based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 19
DS Inbound Channel AdapterJavaConfig based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 20
Agenda
What is Hazelcast? Spring Integration(SI) Hazelcast(HZ) Inbound Channel Adapter Continuous Query(CQ) Inbound Channel Adapter Cluster Monitor(CM) Inbound Channel Adapter Distributed SQL(DS) Inbound Channel Adapter Outbound Channel Adapter Summary
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 21
Outbound Channel Adapter
Supported Cache Types :
IMap, MultiMap, ReplicatedMap, IList, ISet, IQueue, ITopic.
Xml based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 22
Outbound Channel Adapter
JavaConfig based configuration
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 23
Agenda
What is Hazelcast? Spring Integration(SI) Hazelcast(HZ) Inbound Channel Adapter Continuous Query(CQ) Inbound Channel Adapter Cluster Monitor(CM) Inbound Channel Adapter Distributed SQL(DS) Inbound Channel Adapter Outbound Channel Adapter Summary
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 24
SummaryIf we need to :
listen Hazelcast distributed objects events => Hazelcast Inbound Channel Adapter
listen Hazelcast cluster events => Cluster Monitor(CM) Inbound Channel Adapter
listen modifications on specific map entries => Continues Query(CQ) Inbound Channel Adapter
run distributed sql on specific map entries => Distributed Sql(DS) Inbound Channel Adapter
distribute SI messages through Hazelcast distributed objects=> Outbound Channel Adapter
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 25
Github => https://github.com/spring-projects/spring-integration-extensions/tree/master/spring-integration-hazelcast
SI Reference Manual => http://docs.spring.io/spring-integration/reference/htmlsingle/
Hazelcast Reference Manual => http://docs.hazelcast.org/docs/3.5/manual/html/
References
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 26
THANKS Applied Spring Integration, Spring AMQP and RabbitMQ in Spring XD
Spring Integration Java DSL
Learn More. Stay Connected.
@springcentral Spring.io/video