MergedParallelBuffer -> Merge, ParallelBuffer -> Feed

This commit is contained in:
Stephen Diehl
2012-04-04 18:03:13 -04:00
parent f3035c5739
commit c4dbec1e30
2 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -42,9 +42,9 @@ class Component(object):
:param data_address: socket address used for data sources to stream
their records. Will be used in PUSH/PULL sockets
between data sources and a ParallelBuffer (aka
the Feed). Bind will always be on the PULL side
(we always have N producers and 1 consumer)
between data sources and a Feed. Bind will always
be on the PULL side (we always have N producers and
1 consumer)
:param feed_address: socket address used to publish consolidated feed
from serialization of data sources
@@ -53,9 +53,9 @@ class Component(object):
:param merge_address: socket address used to publish transformed
values. will be used in PUSH/PULL from many
transforms to one MergedParallelBuffer (aka the
Merge). Bind will always be on the PULL side (we
always have N producers and 1 consumer)
transforms to one Merge Bind will always be on
the PULL side (we always have N producers and
1 consumer)
:param result_address: socket address used to publish merged data
source feed and transforms to clients will be
+5 -5
View File
@@ -39,8 +39,8 @@ class ComponentHost(Component):
self.sync_register = {}
self.timeout = datetime.timedelta(seconds=5)
self.feed = ParallelBuffer()
self.merge = MergedParallelBuffer()
self.feed = Feed()
self.merge = Merge()
self.passthrough = PassthroughTransform()
self.controller = None
@@ -173,7 +173,7 @@ class ComponentHost(Component):
raise NotImplementedError
class ParallelBuffer(Component):
class Feed(Component):
"""
Connects to N PULL sockets, publishing all messages received to a PUB
socket. Published messages are guaranteed to be in chronological order
@@ -367,13 +367,13 @@ class ParallelBuffer(Component):
return len(self.data_buffer)
class MergedParallelBuffer(ParallelBuffer):
class Merge(Feed):
"""
Merges multiple streams of events into single messages.
"""
def __init__(self):
ParallelBuffer.__init__(self)
Feed.__init__(self)
self.init()