crystal-redis icon indicating copy to clipboard operation
crystal-redis copied to clipboard

Feature/streams

Open aemadrid opened this issue 6 years ago • 8 comments
trafficstars

Adds support for all stream related commands in value mode. Mostly porting the code from the ruby driver.

Note: Still need to investigate how to support futures for pipelining.

aemadrid avatar Jan 29 '19 01:01 aemadrid

I tried the very basics and it's looking good so far. All as expected/known from its Ruby counterpart.

And built a tiny first project based on it: https://github.com/larskluge/rsone

Will report if I find anything down the road.

Thanks for your work @aemadrid !

larskluge avatar Feb 11 '19 22:02 larskluge

@larskluge thx! I've looked at implementing 1hashify1/etc for pipelines/futures but I cannot seem to get it to work. Not sure how you feel about having streams not working there.

aemadrid avatar Feb 13 '19 23:02 aemadrid

@aemadrid thanks for the PR. This looks like good start.

If you can get away with using the builtin commands primitives such as string_command(), there is a good chance that your implementation works with pipelines/futures too.

I see the spec fails in CI. Is it green for you in local development?

stefanwille avatar Feb 21 '19 08:02 stefanwille

@stefanwille it does pass locally. I think the problem is that travis doesn't have the right redis version (>= 5). BTW I figured out a solution to the pipeline issue but it will be a much bigger PR. My idea is to command(args, unwrapper) where unwrapper is a strategy like :int_or_nil, :string_array, etc. so that could be applied at the right time. Very similar to what the ruby driver does. That should work for pipelines, transactions, etc. and also work for all hash, stream, etc. responses.

aemadrid avatar Feb 21 '19 17:02 aemadrid

@aemadrid @stefanwille Is there any news on this PR?

Xosmond avatar Jun 26 '19 04:06 Xosmond

No

stefanwille avatar Jun 29 '19 10:06 stefanwille

Hello,

I was planning to work precisely on this feature for a project of mine. Very happy that someone already started it <3.

However, what is currently blocking this from being merged to master? Except for the travis Redis version, is there anything needed to be implemented?

I would be happy to help.

anykeyh avatar Aug 09 '22 15:08 anykeyh

I think it mergable, but need update to master (btw method hashify was already added). Then if specs passing, also check that this feature works in real.

kostya avatar Aug 09 '22 15:08 kostya