views:

51

answers:

2

I had a crazy thought about writing my own SQL Server driver to make it work something like non-blocking http client, so it won't be thread thirsty and could handle lots of db queries within one thread.

I tried to look over google for some guidelines about implementing SQL Server client protocol, but found none really, where do those guys get information about it when they write own implementations for PHP or python?

I need a really low level to be documented so I can implement all phases of working with a connection through sockets. And would be really nice to have a an example in c# language. :)

A: 

I regularly use the existing Async functionality in the .NET SQLClient, this easily allows additional threads to handle the database operations.

I'm not sure how you would really handle multiple non-blocking operations in the same thread.

Cade Roux
i'll you know when I'm finished, it's just a fun case, but maybe will work really nice.
hoodoos
A: 

MSSQL Protocol specs:

http://www.microsoft.com/downloads/details.aspx?familyid=91ef5106-944a-41e1-b3a0-5bd3f2356f32&displaylang=en

Without knowing anything factual about it, I would guess that PHP et al, use either the native MSSQL API or they use the standardized ODBC - warping around at the protocol level is just asking for it.

S.Skov
what is native mssql api you mentioned? and what is standardized ODBC? is there some standart for SQL db base type protocol?
hoodoos
ODBC: http://en.wikipedia.org/wiki/Open_Database_ConnectivityNative: http://msdn.microsoft.com/en-us/data/aa937733.aspx for when you live in unmanaged country as PHP, Python run-times do.
S.Skov