Skip to content

Instantly share code, notes, and snippets.

@mocchira
Last active August 29, 2015 14:18
Show Gist options
  • Save mocchira/75dc12e106ece6c23ba9 to your computer and use it in GitHub Desktop.
Save mocchira/75dc12e106ece6c23ba9 to your computer and use it in GitHub Desktop.
Which wire protocol should Astra implement for providing odbc/jdbc connectivity?

Traditional RDBMS

source file explanation
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/net_serv.cc main logic to parse mysql protocol
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/protocol.h
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/protocol.cc reply data structure and logic
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/field.h
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/field.cc logic to parse fields and convert types as needed
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/sql_prepare.h
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/sql_prepare.cc logic for prepare statement
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/sql_acl.h
http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/sql/sql_acl.cc logic for authentication
source file explanation
https://github.com/postgres/postgres/tree/master/src/backend/tcop main logic to parse postgres protocol
https://github.com/postgres/postgres/tree/master/src/include/libpq
https://github.com/postgres/postgres/tree/master/src/backend/libpq common logic to parse postgres protocol

NewSQL

@mocchira
Copy link
Author

mocchira commented Apr 9, 2015

Since the spec of wire protocol for oracle, db2 are not published,
We need to select from mysql/postgres/sqlserver/cybase's wire protocol.

@mocchira
Copy link
Author

products / features Cost to implement Cost to maintain Protocol efficiency buitin compression support community size
mysql ×( LOC is 1.5 times larger than postgres ) ×( LOC is 1.5 times larger than postgres ) ◎ (10 times larger than postgres
postgres × ×
voltdb × × ×
sqlserver/cybase × (Spec is comlicated more than necessary) × (same as on the left) × (String always is encoded as ucs-2 even if its range is within us-ascii) ×

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment