rexm/SimpleDb.Net — pull request #28 by rbeauchamp-lendingtree (2014-03-29 17:00:09+00:00)
Title: #4: Provide async implementation of API

I've implemented an async API for SimpleDb.Net. I've followed the recommendations for [Correctly Building Asynchronous Libraries in .NET] (http://channel9.msdn.com/Events/TechEd/Europe/2013/DEV-B318#fbid=). I highly recommend watching this video.

Async code and tests are currently in their own projects until we decide how to proceed with the sync vs. async APIs.

A few points and some questions:

1. The entity framework team has done extensive work around async LINQ. I copied some of their code under the [Apache license](https://github.com/mono/entityframework/blob/master/License.txt) because it would be too much (unnecessary) work to re-implement ourselves. As a result SimpleDb.Net now has a dependency on the Apache license and contains corresponding attribution notices. For example, see [SimpleDbQueryableExtensions.cs](http://goo.gl/dHZJ8x). So here's a question: shall we just change our license to Apache 2.0 to keep the licensing simple?

2. Do we want to have a true synchronous version of the API anymore? Please watch the video referenced above before answering. :-) The recommendation is to define a synchronous method if and only if you have a faster synchronous method that won’t dead lock. I.e., in a library, don't create 'fake' synchronous methods that simply wrap an async implementation; the users can do this themselves in their application code if they really want or need to. After we determine the direction of sync vs. async, I'll cleanup/merge the projects.

Please let me know of any questions or feedback. Thanks!