Storm和Akka的比较

阅读更多
1.【Storm】==>tuple || bolt || spout || topology
Storm is a distributed, real-time computation system. On a Storm cluster, you execute topologies, which process streams of tuples (data).
  Each topology is a graph consisting of spouts (which produce tuples) and bolts (which transform tuples).
  Storm takes care of cluster communication, fail-over and distributing topologies across cluster nodes.
2.【Akka】==>message || actor ||
Akka is a toolkit for building distributed, concurrent, fault-tolerant applications. In an Akka application, the basic construct is an actor;
actors process messages asynchronously, and each actor instance is guaranteed to be run using at most one thread at a time,
making concurrency much easier. Actors can also be deployed remotely. There’s a clustering module coming,
which will handle automatic fail-over and distribution of actors across cluster nodes.
3.compare ==>
共同点:对象都需要序列化,Storm中基本单元是tuple,也就是data,其中包括的对象必须是可序列化的;Akka中基本单元是message,其中包括的对象必须是可序列化的;
不同点:
>>>Storm必须发送消息到指定的channel,即单向的,one-way,而Akka可以发送给任意的Actor,即可以是双向的,
>>>Akka可以有上百万的actor,Storm中bolts数量期望尽量小;设计原因:Actor是共享线程的,而每个一个bolt使用的是专有线程,
   这也正说明了actor可以很多,而bolt要尽量少;
>>>Storm具备out-of-the-box,保证消息的分发,
==>If all tuples aren’t acknowledged, the tuple will be replayed.==>如果所有的tuple都没有应答,则tuple将会重发;
>>>Storm的集群管理更高级,自动fail-over,自动在整个集群上对worker进行负载,基于zookeeper,而akka的集群模块正在开发中;
>>>Storm中的通讯层,topology,是一个静态的、预定义的;而在Akka中,通讯模式可以随时改变,整体上是动态的,actor可以发送消息到其他actor,发送到任何地址(ActorRefs)

【小结】:So overall, Storm implements a specific range of usages very well, while Akka is more of a general-purpose toolkit.
总体而言,Storm是一个很好的实现了指定的使用范围的系统,而Akka更是一个一般意义上的工具,你可以在Akka上构建一个类似Storm的系统。

你可能感兴趣的:(Storm,Akka)