发明名称 Speculative switch database
摘要 Processing switch database operations may include receiving a database selection message from a database client, transmitting an unconditional acknowledgement to the database client in response to the database selection message, accessing a database query from a queue of queries from the a database client where the database query includes a user identifier and a database identifier, determining whether a matching backend database connection exists, and if a matching backend database connection exists, forwarding the database query to the matching backend database connection. In some embodiments, a matching backend database connection may be a backend database connection having a user identifier equivalent to the user identifier of the database query, and a database identifier that is equivalent to the database identifier the database query.
申请公布号 US8756217(B2) 申请公布日期 2014.06.17
申请号 US201113181416 申请日期 2011.07.12
申请人 Facebook, Inc. 发明人 Peek Daniel Nota
分类号 G06F17/30 主分类号 G06F17/30
代理机构 Baker Botts L.L.P. 代理人 Baker Botts L.L.P.
主权项 1. A non-transitory computer readable medium comprising instructions, the instructions operable when executed by a processor to: receive a database selection message from a database client; transmit an unconditional acknowledgement to the database client in response to the database selection message; access a database query from a queue of queries from the database client, the database query comprising a user identifier and a database identifier; determine whether a matching backend database connection exists, the matching backend database connection having a user identifier equivalent to the user identifier of the database query and a database identifier that is equivalent to the database identifier of the database query; if a matching backend database connection exists, forward the database query to the matching backend database connection; and determine, in response to determining that the matching backend database does not exist, whether a similar backend database connection exists, the similar backend database connection having a user identifier equivalent to the user identifier of the database query and a database identifier not equivalent to the database identifier of the database query, or having the user identifier not equivalent to the user identifier of the database query and the database identifier that is equivalent to the database identifier of the database query; if the similar backend database connection exists and the user identifier of the similar backend database connection is equivalent to the user identifier of the database query, transmit a request to a database server to switch the database identifier of the similar backend connection to the database identifier of the database query; and if the similar backend database connection exists and the database identifier of the similar backend database connection is equivalent to the database identifier of the database query, transmit a request to switch the user identifier of the similar backend database connection to the user identifier of the database query.
地址 Menlo Park CA US