Comments (5)
Hi @tmds,
Thank you for bringing up your concerns. I wasn't involved in writing the blog post or writing the examples. I caught wind of the announcement through social media.
I noticed there were some issues with the examples also. I tried to get them corrected as fast as possible. See: rethinkdb/aspnet-signalr-chat#1 The initial PR doesn't make the examples fully async, but it resolved issues that I thought were most important regarding usage.
Overall, I think the main purpose of the blog post was to keep the examples as simple as possible.
I've added a ChatHubAsync
example in a 2nd PR: rethinkdb/aspnet-signalr-chat#2
Please feel free to make continued improvements on it. It would probably be best if you worked with the RethinkDB team directly via @segphault (aka rkpaul on slack). I am not part of the RethinkDB team, so there isn't much I can do to help resolve your issue regarding the blog post or examples.
from rethinkdb.driver.
Thanks for your feedback.
What's your view on leaving out the non-async API from the library?
from rethinkdb.driver.
Hi @tmds ,
I haven't fully completed the async API implementation yet. The last thing I need to do for async is properly implement CancellationToken
mechanism.
Much of the effort has been:
- Reach API and feature parity with the official Java driver.
- Extend ReQL expressiveness in C#.
- Re-work the driver connection architecture to make it thread-safe and usable in apps. The threading architecture in the .NET driver is currently being back-ported to the Java driver.
- Getting the full battery of unit tests to pass on Windows RethinkDB Server.
I totally understand your motivation for removing non-async API. The future is async in .NET, but I'm hesitant on removing the non-async API from the driver. Here are my thoughts:
- It forces developers to use
async
- I'm hesitant forcing developers to use particular sync/async calling convention. I think giving devs a choice is good. - Convenience - A lot of value can come from convenience. Sometimes writing a simple C# app / demo to get up and running fast without any hassle is really good. There are times were devs don't want to be bothered with
async
, even if it's not the most efficient. - Proper
async
is easy get wrong - Most commonly,async void
,ConfigureAwait
, among others. TBH, having not used it in a while, I got it wrong a few times too... and I think it would only perpetuate these issues. - Unit tests - Currently, over 1,500+ imported YAML unit test batteries are designed to run synchronously. It would only complicate the import process, impose additional maintenance and complexity when updating unit tests.
I hope you find these reasons acceptable.
from rethinkdb.driver.
I think it is good when libraries force developers to adopt modern coding practices.
If a developer still wants blocking calls, he/she can call 'Wait' on the Tasks.
For your unit tests, perhaps you can make the non-async API internal and use the InternalsVisibleToAttribute so the unit tests can still access it?
I will only be using the async methods of this library and I'll frown upon everyone who doesn't ;)
Thanks for the library! Especially the async API!
from rethinkdb.driver.
Hey, no problem. Thanks for giving the driver a try. I really appreciate your input.
After thinking about it a bit more, there could be a possibility of lifting all the non-async API off the core API and move non-async APIs into extension methods. Kind of best of both worlds, but this would be a lot of work right now. My main focus is helping AtnNn to get all unit tests to pass on the windows preview. Currently, they all pass on Linux RethinkDB Server, but fail on Windows RethinkDB Server.
Edit: Now using .NET/C# naming conventions! :)
from rethinkdb.driver.
Related Issues (20)
- Create a method to return result as raw json HOT 4
- Resolution function on OptArg insert conflict HOT 1
- ConnectionPool.Builder.ConnectAsync does not respect InitialTimeout() HOT 4
- Add Error codes to Exceptions HOT 2
- Additional exceptions thrown when trying to cancel Cursor.MoveNextAsync() HOT 6
- Object's primary key and key of RunAtom() is different (Client-side generation). HOT 4
- Support for System.Text.Json.JsonDocument
- Cursor<T> should implement IAsyncEnumerable<T> in .net core 3
- RethinkDB 2.4 Release
- Best options: RunResult, RunAtom or RunCursor HOT 3
- Get list from Table that contains 'A' in the 'message' field HOT 1
- ASL 2.0 HOT 1
- Implement lambda functions as a possible argument in Insert().OptArgs("conflict",...) HOT 1
- System.NullReferenceException HOT 1
- Add EntityFramework support to Linq provider HOT 5
- Polymorphism HOT 1
- Various exceptions when updating a document HOT 1
- System.Configuration.ConfigurationErrorsException: HOT 1
- Wrong OptArg serialisation after OrderBy
- Insert not working with RunNoReply & Can't use runOpts is always null -- solved
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rethinkdb.driver.