go-sql-driver / mysql

Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package
https://pkg.go.dev/github.com/go-sql-driver/mysql
Mozilla Public License 2.0
14.55k stars 2.32k forks source link

Add XAPI support #478

Open rykr opened 8 years ago

rykr commented 8 years ago

Hey guys

Any interest in adding xapi support to your Go driver to support the new protocol and APIs that we have introduced with 5.7? If so please reach out to me as we would love to help.

methane commented 8 years ago

I am. Is it stable now?

dgryski commented 8 years ago

@rykr Do you mean https://dev.mysql.com/doc/internals/en/x-protocol.html ?

rykr commented 8 years ago

@methane @dgryski Yes that is the one. The protocol is documented although new features are still being added but what has been documented and released is certainly stable enough to work against. The API is not publicly documented as a standard but our released connectors show the pattern we are using. Certainly driver developers can use whatever API they choose but we feel it would be better to follow a similar pattern.

rykr commented 8 years ago

We will be setting up a page highlighting externally maintained drivers. When that page is ready would be ok to list this provider there?

methane commented 8 years ago

@rykr While I'm interested in X Protocol, I don't know this project should use it. This project doesn't provide APIs to users directly. It works behind "database/sql" standard library. So providing X Dev API is out of scope.

One possibility is use X Protocol only for standard SQL. I'll try it and benchmark it. If it's significant faster than current MySQL protocol, I'll create RFC issue here.

dgryski commented 8 years ago

@sjmudd has been working on implementing a Go driver for the X Protocol, and will be speaking about it at Oracle OpenWorld 2016 in SF. He probably has something useful to contribute to this discussion.

rykr commented 8 years ago

Great. Will that be a different project here on GitHub?

On Sep 7, 2016 3:27 AM, "Damian Gryski" notifications@github.com wrote:

@sjmudd https://github.com/sjmudd has been working on implementing a Go driver for the X Protocol, and will be speaking about it at Oracle OpenWorld 2016 in SF. He probably has something useful to contribute to this discussion.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/go-sql-driver/mysql/issues/478#issuecomment-245210969, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGpXLp18iXv6n57afOWyGWAVsqIB5sQks5qnnVWgaJpZM4J15XK .

sjmudd commented 8 years ago

It will be yes. It's still at an early stage and I can talk to you directly if you're interested.

sjmudd commented 8 years ago

There seem to be several different issues here:

lefred commented 5 years ago

Hi, what kind of help are you looking for ? Our MySQL connectors engineer will be please to answer all your questions and provide you directions to include MySQL X Protocol to the Go SQL Driver. Please join #connectors in MySQL Community Slack (https://lefred.be/mysql-community-on-slack/)

dgryski commented 5 years ago

@lefred Does Oracle have any plans for contributing an XAPI driver for Go?

lefred commented 5 years ago

@dgryski we don't have plan to take over any MySQL Go driver, we think you are doing a good job and we don't see any need to deliver one ourselves. However we would like to encourage the support of the X protocol and therefor help you to integrate it. Any questions, tip requests are welcome.

lefred commented 5 years ago

https://dev.mysql.com/doc/dev/mysql-server/latest//mysqlx_protocol.html

laoshaw commented 5 years ago

is there an estimation when go-mysqlx becomes available?

dveeden commented 5 years ago

@laoshaw Any specific reason why you want this?

laoshaw commented 5 years ago

Want to switch a django/python-mysqlx-connector project to go/mysql8 as I need both RDBS and JSON in the same database, it seems not many are taking this approach? I'm checking TiDB, still if there is good mysqlx/go connector driver I would prefer MySQL.

dveeden commented 5 years ago

Sounds like you want "Document Store" support, not just "X Protocol". One is built on top of the other. I don't think anyone is working on this for Go.

Note that you can use JSON columns and functions over the classic protocol, just not the "X DevAPI" syntax.

Best to use MySQL 8.0 for this

Transporting SQL over X Protocol would allow one to use pipelining and some other features not present in the classic protocol. So I expect a first version for Go to add support for X Protocol transport for performance reasons without new syntax

laoshaw commented 5 years ago

Yes I will use the classic protocol for json-column with mysql for now. After trying TiDB I realize I have to stick with MySQL as my workload is more OLTP where MySQL is good at.

I just found some alpha work for mysqlx: https://github.com/AlekSi/mysqlx

aleyrizvi commented 4 years ago

Apologies to bump an old thread, is there any work going on?