Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Atomix & Distributed Fighters

423 vues

Publié le

How is it difficult to create a robust distributed system in our time? Do we really need to develop own communication protocols and take care about fault tolerance? With such frameworks as Atomix an answer is NO. Atomix are already taking care of all the necessary parts of distributed systems, you just need to use it correctly. In this talk you will get acquainted with Atomix Framework and will see how easy it is to build non-blocking distributed system.

Publié dans : Ingénierie
  • Soyez le premier à commenter

Atomix & Distributed Fighters

  1. 1. Atomix Distributed Fighters
  2. 2. Me !2 Senior Software Engineer Program Committee Member andriyrav@gmail.com Andriy Rymar @AndriyRymar Morning@Lohika Lviv Java Club Co-founder https://github.com/lvivJavaClub
  3. 3. Content !3 Cluster Intro Demo Testing Primitives
  4. 4. #jeeconf_atomix !4 #jeeconf_atomix
  5. 5. !5 #jeeconf_atomix Intro
  6. 6. !6 #jeeconf_atomix Atomix A reactive Java framework for building fault-tolerant distributed systems What?
  7. 7. !7 #jeeconf_atomix Analogy Spring MVC Spring Web Services GWT MVC SOAP UI
  8. 8. !8 #jeeconf_atomix Atomix systems Build distributed
  9. 9. !9 #jeeconf_atomix Distributed System What?
  10. 10. !10 #jeeconf_atomix Examples Yes Yes No
  11. 11. MS vs DS !11 #jeeconf_atomix S1 S2 S3 Micro-Services Distributed System Node Node Node Node Node S1 S2 S3 Apache Spark APIGateway
  12. 12. Distributed System !12 #jeeconf_atomix Why? Scalability Speed Reliability
  13. 13. Distributed System !13 #jeeconf_atomix Examples? Big Data processing Multi-task execution
  14. 14. Distributed System !14 #jeeconf_atomix How? What is the first letter in English alphabet? A: C C: A B: D D: B
  15. 15. Distributed System !15 #jeeconf_atomix
  16. 16. Distributed System !16 https://giphy.com/gifs/filmeditor-interested-airplane-movie-l4FARHkIFJReGSy2c #jeeconf_atomix
  17. 17. Distributed System !17 https://giphy.com/gifs/jNcGVJueKi51u #jeeconf_atomix
  18. 18. Issues !18 #jeeconf_atomix Scalability Fault tolerance Coordination etc.
  19. 19. !19 #jeeconf_atomix Atomix
  20. 20. !20 #jeeconf_atomix Cluster
  21. 21. Ephemeral Member !21 #jeeconf_atomix Id Type Address Persistent Local Remote
  22. 22. Member !22 #jeeconf_atomix Member.builder("member1") .build(); .withAddress("localhost",5000) .withType(Member.Type.EPHEMERAL)
  23. 23. Atomix Instance !23 #jeeconf_atomix Member 1 Member 2 Member 3 Configuration
  24. 24. Atomix Instance !24 #jeeconf_atomix .withMembers(member1, member2) Atomix.builder() .withLocalMember(localMember) .withManagementGroup(systemGroup) .withPartitionGroups(dataGroup) .build();
  25. 25. Management Group !25 #jeeconf_atomix
  26. 26. Partition Groups !26 #jeeconf_atomix
  27. 27. Groups !27 #jeeconf_atomix Raft RAFT The Raft protocol is a consensus protocol developed in 2013. Consensus protocols are partition tolerant and provide strong consistency guarantees (linearizability, sequential consistency) that can be useful for coordination. However, strong consistency comes with a cost in terms of configuration and performance. Critically, Raft partition groups require explicitly defined membership. Each Raft group must identify the cluster members on which the group’s partitions will be replicated at startup. Without explicitly defined membership, Raft partitions may experience split brain when a network partition occurs while bootstrapping the cluster. The Raft partition group’s members must be PERSISTENT. This constraint exists because the semantics of persistent members accurately reflect the semantics of Raft cluster members: even after a Raft node crashes, the quorum size remains the same and the node still counts towards vote tallies. PB Even with sharding, Raft partition groups can be limited in their scalability. Writes to Raft partitions must be synchronously replicated to a majority of the cluster and must be flushed to disk prior to completion of a write operation. Primary-backup partition groups are a more efficient alternative to Raft partitions. Primary- backup replication works by electing a leader through which writes are replicated. The leader replicates to n backups based on the primitive configuration. Primary-backup partitions are Primary-Backup
  28. 28. !28 #jeeconf_atomix Primitives
  29. 29. Primitives !29 #jeeconf_atomix Consistent Map Consistent Multimap Distributed Set Atomic Value etc. Distributed Lock Work Queue etc. Data Coordination
  30. 30. Sync API !30 #jeeconf_atomix ConsistentMap<String, String> map = atomix.consistentMapBuilder("my-map") .withNullValues() .withCacheEnabled() .withCacheSize(100) .build();
  31. 31. Async API !31 #jeeconf_atomix AsyncConsistentMap<String, String> map = atomix.consistentMapBuilder("my-map") .withNullValues() .withCacheEnabled() .withCacheSize(100) .build().async();
  32. 32. Custom Primitives !32 #jeeconf_atomix
  33. 33. !33 #jeeconf_atomix Demo
  34. 34. !34 #jeeconf_atomix Fight http://www.pngmart.com/image/10875 http://ru.mortalkombat.wikia.com/wiki/Файл:MKX_Sub-Zero.png Member 1 Member 2
  35. 35. Description !35 http://www.mortalkombatwarehouse.com/mk/scorpion/http://www.mortalkombatwarehouse.com/mk/subzero/ https://www.toyshow.com.br/colecionaveis/action-figures/boneco-shao-kahn-mortal-kombat-classic-special-edition-112-storm-collectibles 3 1 2 Module : Judge Module : Fighter 1 Module : Fighter 2 #jeeconf_atomix
  36. 36. Description !36 http://www.mortalkombatwarehouse.com/mk/scorpion/http://www.mortalkombatwarehouse.com/mk/subzero/ https://www.toyshow.com.br/colecionaveis/action-figures/boneco-shao-kahn-mortal-kombat-classic-special-edition-112-storm-collectibles https://orig00.deviantart.net/18ef/f/2015/108/b/3/fire_and_ice__mortal_kombat_and_dota_2__by_mfp189-d8q8l2p.png 3 1 2 Module : Judge Module : Fighter 1 Module : Fighter 2 UI #jeeconf_atomix 4
  37. 37. Architecture !37 http://www.mortalkombatwarehouse.com/mk/scorpion/http://www.mortalkombatwarehouse.com/mk/subzero/ https://www.toyshow.com.br/colecionaveis/action-figures/boneco-shao-kahn-mortal-kombat-classic-special-edition-112-storm-collectibles https://orig00.deviantart.net/18ef/f/2015/108/b/3/fire_and_ice__mortal_kombat_and_dota_2__by_mfp189-d8q8l2p.png Judge UI Fighter Atomix Instance Atomix Instance 2 x Registration Set Health Map Attack Map #jeeconf_atomix AtomixInstance
  38. 38. Lets GO! !38 http://www.mortalkombatwarehouse.com/mk/scorpion/http://www.mortalkombatwarehouse.com/mk/subzero/ #jeeconf_atomix
  39. 39. !39 #jeeconf_atomix Hope it was interesting https://www.catersnews.com/wp-content/uploads/2014/12/CATERS_Puss_In_Boots_03-457x773.jpeg
  40. 40. !40 #jeeconf_atomix https://www.catersnews.com/wp-content/uploads/2014/12/CATERS_Puss_In_Boots_03-457x773.jpeg
  41. 41. !41 #jeeconf_atomix https://www.catersnews.com/wp-content/uploads/2014/12/CATERS_Puss_In_Boots_03-457x773.jpeg
  42. 42. !42 #jeeconf_atomix КОжен раз коли робите Коміт / Пуш https://www.catersnews.com/wp-content/uploads/2014/12/CATERS_Puss_In_Boots_03-457x773.jpeg
  43. 43. !43 #jeeconf_atomix Testing
  44. 44. Testing !44 #jeeconf_atomix Write synchronous code Use workarounds Wait for Atomix-Tests
  45. 45. !45 #jeeconf_atomix Out of scope
  46. 46. Out of scope !46 #jeeconf_atomix Standalone agent REST API Messaging Profiles
  47. 47. !47 #jeeconf_atomix Summary
  48. 48. Summary !48 #jeeconf_atomix Easy Flexible Young
  49. 49. Meet !49 #jeeconf_atomix Jordan Halterman 2) How Atomix resolve conflicts?  1) Which parts of CAP theorem Atomix supports 4) Who use Atomix in production 5) Atomix best-practices 3) What are the closest competitors to Atomix? Atomix Founder
  50. 50. Interview !50 #jeeconf_atomix Jordan Halterman Atomix Founder https://youtu.be/qJ4DOuLLryc
  51. 51. !51 Thank You! https://thumbs.gfycat.com/DefiantGrandEmeraldtreeskink-size_restricted.gif
  52. 52. Questions !52 #jeeconf_atomix andriyrav@gmail.com Andriy Rymar @AndriyRymar Become a speakerContacts Morning@Lohika

×