Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
181 lines (117 sloc) 3.95 KB

Workshop outline

Modules and labs for a JGroups workshop. The different modules can be combined into a custom workshop.

Requirements

Disclaimer

Red Hat supports the JGroups versions packaged in Red Hat JBoss Enterprise Application Platform and Red Hat JBoss Data Grid for clustering use cases in these products.

For supported JGroups configurations, please refer to the documentation for these products or ask GSS.

Red Hat does not support use of JGroups directly from application code or as a standalone module. The objective of this workshop/training is to provide deeper knowledge of JGroups internals, it does not imply Red Hat support for this material.

Day 1: Overview, architecture, API, protocols

  • Overview of JGroups

  • Architecture

  • API

    • JChannel, Message, View

    • Creating a channel

    • Joining a cluster

    • Sending and receiving messages

    • Handling view changes

    • State transfer

    • Leaving a cluster

    • Closing a channel

  • Protocols

    • What do the most frequently used protocols do ?

      • UDP/TCP/TCP_NIO2, PING/TCPPING, FD_SOCK/FD_ALL, NAKACK2, UNICAST3, STABLE, GMS, UFC/MFC, FRAG3, STATE_TRANSFER

    • What are the configuration options ?

Day 1: Building blocks

  • Remote procedure calls across a cluster

    • Asynchronous invocation API

    • Non-blocking RPCs

  • Distributed locks

  • Distributed atomic counters

Day 2: A closer look at protocols

  • Transports

    • UDP, TCP, TCP_NIO2

  • Discovery

    • PING, TCPPING

    • Cloud based discovery: Kubernetes, AWS, Google Compute Platform Azure

  • Merging

    • MERGE3

  • Failure detection

    • FD_ALL, FD_SOCK, FD_HOST

  • Reliable message transmission and ordering

    • NAKACK2, UNICAST3, SEQUENCER

  • Message stability

    • STABLE

  • Cluster membership

    • GMS

  • Flow control

    • MFC, UFC

    • Non-blocking flow control (UFC_NB, MFC_NB)

  • State transfer

    • STATE, STATE_SOCK

  • Security

    • AUTH, SYM_ENCRYPT, ASYM_ENCRYPT, SSL_KEY_EXCHANGE

  • Misc

    • FRAG3, COMPRESS, STOMP

Day 2-3: Advanced

  • Message flags (OOB, DONT_BUNDLE, NO_FC etc)

  • The transport

    • Thread pools: configuration and sizing

    • Customizations (replacing thread pool, thread and socket factories)

  • Message bundling and message batching

  • Generating custom addresses

  • Control over view generation (pinning down a coordinator)

  • Asynchronous invocation API

  • Fork channels: light weight channels over the same protocol stack

  • Writing a simple protocol

    • Callbacks

    • Headers

      • Marshalling, magic numbers, protocol IDs and header registration

    • Writing your own protocol

  • Debugging

    • What breakpoints can do (FD_ALL)

    • Byteman: installing rules into a running JVM (and removing them again)

      • A look at a unit test black-box style

  • Simulation

    • Network partitions with DISCARD

    • Message drops

    • Duplicate messages

    • Reordering of messages

Day 3-4: Handling network partitions (split brain)

  • Network partitions (split brain)

    • What causes partitions?

    • Strategies to handle them (CAP)

    • Primary partition, merging data

    • jgroups-raft, eventual consistency

  • Examples: distributed counters in JGroups and jgroups-raft

Day 4: Admin

  • Best practices for configuration

    • UDP versus TCP

    • Buffers and thread pools

    • Failure detection

  • The top ten problems

  • Diagnostics

  • Logging

  • JMX and jconsole

  • probe.sh