← Back to team overview

maria-discuss team mailing list archive

NoSQL at mysql client

 

Hi guys, i was reading some time ago about memcache (i use it for a long
time ~5years or more) and the handler socket plugin
Why we don't implement it at mariadb client? instead of a second library to
add nosql, why not implement a built in lib?
for example...

(pseudo functions...)
mysql_connect ... (connect to database and have permission handling...)
mysql_select_db  ... select the schema being used
mysql_query ... execute a query command (SQL QUERIES)
mysql_fetch ... get a row
mysql_num_rows .. get number of rows

now the nosql...
mariadb_handler_socket_openindex( handler socket parameters )
mariadb_handler_socket_query
mariadb_handler_socket_fetch
mariadb_handler_socket_close

mariadb_memcache_get
mariadb_memcache_set
...

this make mariadb a sql/nonsql database with a single user/permission
schema, and a nice language set (SQL, handler socket, memcache, redis,
drizzle, hadoop, mongodb or others...)

in this case we can use the mysql protocol, but instead of sending a QUERY
command, we send a "MARIADB" command, and a new parameter telling what
mariadb command it is, this can be used with mysql/mariadb/percona, when
used with others database probably the database will report a wrong command
message but we can contact mysql to reserve a command id to "others uses",
and have compatibility with any mysql fork...

but the point is... instead of many connections (3-> mariadb, handler
socket write, handler socket read, or 2 -> mariadb, memcached) we have only
one 1-> mariadb

comments are wellcome, any idea why not implement this instead of many
different protocol libs?

-- 
Roberto Spadim

Follow ups