Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for blocking command BZPOPMin #232

Closed
Tracked by #231
chayim opened this issue Jan 1, 2024 · 0 comments
Closed
Tracked by #231

Add support for blocking command BZPOPMin #232

chayim opened this issue Jan 1, 2024 · 0 comments
Assignees
Milestone

Comments

@chayim
Copy link
Contributor

chayim commented Jan 1, 2024

No description provided.

@gerzse gerzse added this to the commands milestone Feb 6, 2024
@gerzse gerzse self-assigned this Feb 6, 2024
gerzse added a commit to gerzse/NRedisStack that referenced this issue Feb 6, 2024
Add support for the BZMPOP, BZPOPMIN, BZPOPMAX commands.

Issues redis#232, redis#233 and redis#234.

These commands are blocking on the server, so they go against the current
policy of the StackExchange.Redis library. Therefore make it obvious in
the code documentation that attention must be given to the timeout in
the connection multiplexer, client-side.

The StackExchange.Redis library already defines a type for the payload
returned by BZMPOP (which is the same as for ZMPOP), namely the
SortedSetPopResult class. However, the constructor of that class is
internal in the library, so we can't create instances of it. Therefore
roll our out type for a <value, score> pair, and use Tuple to pair a key
with a list of such <value, score> pairs.

Instead of using Order to signal from which end of the sorted set to
pop, define a MinMaxModifier enum, which more clearly expresses the
intention and maps directly to the Redis command being executed.
gerzse added a commit to gerzse/NRedisStack that referenced this issue Feb 6, 2024
Add support for the BZMPOP, BZPOPMIN, BZPOPMAX commands.

Issues redis#232, redis#233 and redis#234.

These commands are blocking on the server, so they go against the current
policy of the StackExchange.Redis library. Therefore make it obvious in
the code documentation that attention must be given to the timeout in
the connection multiplexer, client-side.

The StackExchange.Redis library already defines a type for the payload
returned by BZMPOP (which is the same as for ZMPOP), namely the
SortedSetPopResult class. However, the constructor of that class is
internal in the library, so we can't create instances of it. Therefore
roll our out type for a <value, score> pair, and use Tuple to pair a key
with a list of such <value, score> pairs.

Instead of using Order to signal from which end of the sorted set to
pop, define a MinMaxModifier enum, which more clearly expresses the
intention and maps directly to the Redis command being executed.
shacharPash pushed a commit that referenced this issue Feb 13, 2024
* Formatting and typos

Fix some typos in the markdown files and run `dotnet format` on existing
code.

* Include documentation in the build

Change the settings so that documentation is included in the build.

* Add support for BZMPOP, BZPOPMIN and BZPOPMAX

Add support for the BZMPOP, BZPOPMIN, BZPOPMAX commands.

Issues #232, #233 and #234.

These commands are blocking on the server, so they go against the current
policy of the StackExchange.Redis library. Therefore make it obvious in
the code documentation that attention must be given to the timeout in
the connection multiplexer, client-side.

The StackExchange.Redis library already defines a type for the payload
returned by BZMPOP (which is the same as for ZMPOP), namely the
SortedSetPopResult class. However, the constructor of that class is
internal in the library, so we can't create instances of it. Therefore
roll our out type for a <value, score> pair, and use Tuple to pair a key
with a list of such <value, score> pairs.

Instead of using Order to signal from which end of the sorted set to
pop, define a MinMaxModifier enum, which more clearly expresses the
intention and maps directly to the Redis command being executed.

---------

Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com>
@gerzse gerzse closed this as completed Feb 13, 2024
gerzse added a commit to gerzse/NRedisStack that referenced this issue Feb 26, 2024
Issues redis#232, redis#233, redis#234, redis#235, redis#237, redis#248, redis#249, redis#250, redis#251, redis#255

Add the async versions for the blocking commands: BZPOPMIN, BZPOPMAX,
BZMPOP, BLMOVE, BLMPOP, BLPOP, BRPOP, BRPOPLPUSH, XREAD and XREADGROUP.
shacharPash added a commit that referenced this issue Mar 6, 2024
* Add support for blocking XREAD and XREADGROUP

Issues #237 and #255.

* Extend unit test coverage

* Async blocking commands

Issues #232, #233, #234, #235, #237, #248, #249, #250, #251, #255

Add the async versions for the blocking commands: BZPOPMIN, BZPOPMAX,
BZMPOP, BLMOVE, BLMPOP, BLPOP, BRPOP, BRPOPLPUSH, XREAD and XREADGROUP.

---------

Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com>
Co-authored-by: shacharPash <93581407+shacharPash@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants