Skip to content

Refine and clarify operations in asynchronous caching implementation #2743

New issue

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

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

Already on GitHub? Sign in to your account

Open
jxblum opened this issue Oct 17, 2023 · 0 comments
Open

Refine and clarify operations in asynchronous caching implementation #2743

jxblum opened this issue Oct 17, 2023 · 0 comments
Assignees
Labels
in: cache RedisCache and CacheManager type: task A general task

Comments

@jxblum
Copy link
Contributor

jxblum commented Oct 17, 2023

See Issue #2650

See Original Pull Request #2717

Uses more descriptive names for operations, especially Reactive operations, by either calling a local, private method or introducing a variable with strongly typed parameters.

For example, this Function<ReactiveRedisConnection, Mono<T>> commandExecution is more readable and descriptive than it -> Mono.fromCompletionStage(callback.apply(it)) buried in some Reactive Publisher (e.g. Flux) operation. Outside of the IDE (such as reading source in GitHub), I immediately know that "it" is a Redis (Reactive) connection, that I am executing a Redis command and that I can safely assume I am getting back a Mono of T (the value returned from the "reactive" command execution).

In some case (perhaps many cases) Reactive programming obscures the actions that are actually happening (such as looping until some condition is met), particularly in "concurrent" fashion, making the code more difficult to understand. Without, proper naming and organization, understanding is greatly diminished and even readability is compromised.

Edits Javadoc.

@jxblum jxblum added type: task A general task in: cache RedisCache and CacheManager labels Oct 17, 2023
@jxblum jxblum added this to the 3.2 GA (2023.1.0) milestone Oct 17, 2023
@jxblum jxblum changed the title Clarify operations in asynchronous caching implementation Clarify and refined operations in asynchronous caching implementation Oct 17, 2023
@jxblum jxblum changed the title Clarify and refined operations in asynchronous caching implementation Refine and clarify operations in asynchronous caching implementation Oct 17, 2023
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Oct 17, 2023
Uses more descriptive names for operations, especially Reactive operations, by either calling a local, private method or introducing a variable with strongly typed parameters.

Original Pull Request: spring-projects#2717

Closes spring-projects#2743
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Oct 17, 2023
Uses more descriptive names for operations, especially Reactive operations, by either calling a local, private method or introducing a (functional) variable with strongly typed parameters.

Original Pull Request: spring-projects#2717

Closes spring-projects#2743
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Oct 17, 2023
Uses more descriptive names for operations, especially Reactive operations, by either calling a local, private method or introducing a (functional) variable with strongly typed parameters.

Edits and refines Javadoc.

Original Pull Request: spring-projects#2717

Closes spring-projects#2743
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Oct 18, 2023
Uses more descriptive names for operations, especially Reactive operations, by either calling a local, private method or introducing a (functional) variable with strongly typed parameters.

Edits and refines Javadoc.

Original Pull Request: spring-projects#2717

Closes spring-projects#2743
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Oct 18, 2023
Uses more descriptive names for operations, especially Reactive operations, by either calling a local, private method or introducing a (functional) variable with strongly typed parameters.

Edits and refines Javadoc.

Original Pull Request: spring-projects#2717

Closes spring-projects#2743
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Oct 18, 2023
Uses more descriptive names for operations, especially Reactive operations, by either calling a local, private method or introducing a (functional) variable with strongly typed parameters.

Edits and refines Javadoc.

Original Pull Request: spring-projects#2717

Closes spring-projects#2743
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Oct 18, 2023
Uses more descriptive names for operations, especially Reactive operations, by either calling a local, private method or introducing a (functional) variable with strongly typed parameters.

Edits and refines Javadoc.

Original Pull Request: spring-projects#2717

Closes spring-projects#2743
@jxblum jxblum self-assigned this Oct 26, 2023
@mp911de mp911de removed this from the 3.2 GA (2023.1.0) milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: cache RedisCache and CacheManager type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants