A way to solve this is open an issue on the repository. You'll get one
concrete answer.

On Mon, Sep 3, 2012 at 9:29 PM, Mike Nichols <[email protected]>wrote:

> Thanks for your response.
> I guess my question is whether to emit a 'data' event when there isn't any
> "raw data", but the underlying reply from redis is considered to be an
> 'empty list'. The zen semantic in me asks 'is the absence of data....data'
> . :)
> But seriously, it just feels like a subscriber would always want to know
> that 'empty', not nil, was the reply.
>
>
> On Monday, September 3, 2012 8:26:20 PM UTC-7, tjholowaychuk wrote:
>>
>> IMO if the idea behind streams are to act like pipes then "data" events
>> should only be "raw" data aka Buffers (strings too I guess),
>> if it's a non-stream then whatever I guess
>>
>> On Monday, 3 September 2012 15:44:55 UTC-7, Mike Nichols wrote:
>>>
>>> When issuing a redis command which expects a multi-bulk reply but the
>>> key does not exist, one may receive the following:
>>> +OK
>>> *0
>>>
>>> The redis docs say "If the specified key does not exist, the key is
>>> considered to hold an empty list and the value 0 is sent as multi bulk
>>> count."
>>>
>>> It seems like it is proper to emit a 'data' event in a client library
>>> with the 'empty list' redis implies so that consuming code can use it in a
>>> pipeline and let the consumer handle the `empty list` there.
>>>
>>> This came from looking at 
>>> 'https://github.com/tblobaum/**redis-stream<https://github.com/tblobaum/redis-stream>'
>>> where this sort of reply drops the data, thus breaking the pipeline.
>>>
>>> This leads me to the greater question on whether or not to emit 'data'
>>> for a empty value. My gut says low level libs like these _should_ emit the
>>> event with empty data but I wonder what other authors are preferring.
>>>
>>> Any opinions would be appreciated on this.
>>>
>>>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to