From c4dbec1e30cc8508c256ad1f5f1df211c3d7bf1d Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Wed, 4 Apr 2012 18:03:13 -0400 Subject: [PATCH] MergedParallelBuffer -> Merge, ParallelBuffer -> Feed --- zipline/component.py | 12 ++++++------ zipline/messaging.py | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/zipline/component.py b/zipline/component.py index 13b852b9..7f947ee9 100644 --- a/zipline/component.py +++ b/zipline/component.py @@ -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 diff --git a/zipline/messaging.py b/zipline/messaging.py index 749006d0..2c4caebc 100644 --- a/zipline/messaging.py +++ b/zipline/messaging.py @@ -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()