-
Notifications
You must be signed in to change notification settings - Fork 36
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
refactor: Upgrade api to match latest dart conventions #78
Comments
This sound great! Exception vs Error issue is currently addressed by @exaby73 in PR #77 . For this PR it seem that we have breaking change that requires major release. It would be nice if we get full list of changes that we would like to push for next major release. @jtdLab can you provide list of changes you would like to address, or open issue for each. Then we can all contribute for next major release. |
Hi, i would also like to see some changes, i'll try to list them here:
This is a much safer way and we know how the rest of the code should behave.
Here you could make this non null by using a builder pattern i mentioned in https://github.com/ra1u/redis-dart/pull/42/files This way you also avoid having to force (!) potential null values
|
Thanks for feedback.
I agree. Last time I tried to fix this there was some typing issue here. IIRC due to having incorrect type/class stack among classes sharing this type.
I agree,
Merged
Last time we tested this, await had performance issue.
That is fine. Should we keep backward compatibility?
What version and why?
Agree. Should we care about backward compatibility?
Same as before at 8.
Can you post what you have in mind? To many classes, simpler api? Please post code that you have have in mind from user perspective. (how this affects examples we have in README) I am glad that we addressed this issues as most of them were also on my radar. My goal is for improvements is in a way that will allow us to continuously improve and support codebase with users in mind. Fell free to send pull requests addressing each issue individually (or more in case of similar issues) |
Thanks for your feedback. I'm glad you are open to improve on these areas. I can try to add some PR's on these when i have time. I can try to address some of your comments. 1-3. Good BTW. I looked at the |
What is going on here?
You're trying to set the arbitrary class |
About PubSub spaghetti: Just like whole dart app can run concurrently over single thread, we can run redis client concurrently over single socket. This (lets run everything over single socket) works as long as there is 1/1 correspondence (one tx message for one rx message). PubSub breaks this, because socket can receive message from redis at any time. To prevent this we inject error on connection that was hijacked by PubSub for this reason. Same should apply for transactions. However it seems It would probably be better if we would change transaction interface into await interface. Take note that it is not possible to do
taking into account For this reason we would need to return list of responses from all previous responses as j, and i would represent just dummy Future, that gets awaited as long it takes to send data over the socket. This makes implementation much simpler. We started this project before async/await was available in dart. |
I think it's perhaps better that you, as the author, does some initial refactoring. I'm not really familiar with the code base as is, neither with Redis. |
@erf Thaks for your input. Can you put some motivations we are trying to achive here, so that we can justify updates and changes to our users? Do we need more reliable code? I would rather move towards aciveing some goals, rather than just saying lets fix this code because it does not look great. |
I think the changes i've mentioned will make the code more robust and clean. When i look at the state of the code now, it's hard to wrap my head around what's going on so therefor i feel less comfortable using the package. |
I think you DO want as reliable and clean code as possible when potentially many people are using your package for critical stuff. If you think it's reliable enough, then leave it as is, but the issues i mentioned i think should be addressed.
These are not as relevant for this issue, but if you want to update to support to the latest SDK with the latest language features then why not. |
@ra1u Thanks for this great package.
Are there any plans of improving the api to match latest dart conventions e.g. improving function names, and better usage of the dart type system. Maybe i can help :)
The text was updated successfully, but these errors were encountered: