intro
-
distributed messaging
-
any language on any platform
-
pub-sub, push-pull, router-dealer
pattern
-
high-speed aio engines in a tiny
library
-
any
architecture
centralized, distributed, small, large -
brokerless
doesnot store
messages on disk
-
internal messaging within storm worker processes
-
from understanding storm internal message buffers
-
intra-worker (inter-thread on same storm node)
lmax disruptor
-
inter-worker (node-to-node across the network)
zeromq
ornetty
-
inter-topology nothing built into storm
# you must take care of this yourself # e.g. kafka/rabbitmq/database etc.
-
-
illustration
+---------------------------------------------------------------------+ | worker process | | +-----------------------------------+ | | | executor m of n | | | | +---------+ +---------+ | | | | | user | | | | | | +------------+ | | logic |→→→ | send |→→→→ +------------+ | | | worker | | | thread | ↓ | thread | |↓| worker | | | | receive | | +---------+ ↓ +---------+ |↓| send | | | | thread | | ↑ ↓ ↑ |↓| thread | | | | __________ | | ___________ ↓ ___________ |↓| __________ | | | | RX QUEUE →→→→→→ INC QUEUE →→ OUT QUEUE | → TX QUEUE | | | | __________ |↓| ___________ ___________ |↑| __________ | | | +------↑-----+↓+-----------------------------------+↑+------↓-----+ | | ↑ →→→ to other executors from other →→→ ↓ | +--------↑----------------------------------------------------↓-------+ ↑ topology.receiver.buffer.size(8) ↓ ↑ topology.transfer.buffer.size(1024) ↓ ---------□--------------------network-layer-------------------□-------- incoming tcp port(6700/tcp) outgoing tcp port(random)
-
incoming tcp port(6700/tcp)
one of the ports defined by `supervisor.slots.ports`
-
outgoing tcp port(random)
-
worker receive thread
each worker has a single receive thread that listens on the `worker port` it puts incoming msgs from the network on the executors' `incoming queues`
-
inc queue
each element of the disruptor receive queue is a list of tuples here tuples are appended in batch topology.executor.receive.buffer.size(1024)
-
send thread
takes msgs from its `outgoing queue` and puts them on the shared `transfer queue`
-
out queue
each element of this disruptor `send queue` contains a `single` tuple topology.executor.send.buffer.size(1024)
-
worker send thread
reads from the disruptor `transfer queue` to send tuples over the network queue is a list of tuple
-