Replies: 5 comments 1 reply
-
|
This doesn't discuss Sync and Flush. Do we get rid of Flush? |
Beta Was this translation helpful? Give feedback.
-
|
Request ids are needed not just for multiplexing. They are useful to get rid of "Sync dance" for multiple-message exchanges (such as Execute->Data->Error) |
Beta Was this translation helpful? Give feedback.
-
|
I also propose renaming
The This is purely documentational, though. |
Beta Was this translation helpful? Give feedback.
-
It's not clear when this descriptor can be updated. For example, when schema is migrated (in a different connection) this descriptor has to be updated. |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
PrepareandExecutehave thenamefield. This was inherited from the Postgres protocol, however we never actually allowed to create named prepared statements. With our move to making all connections as stateless as possible, it is now clear that we'll never want to support named prepared statements.OptimisticExecutemessage doesn't have thenamefield.DescribeStatementmessagePrepareCompletemessage.DescribeStatementmessage adds a lot of complexity for client implementations only for the sake of saving miniscule network traffic.DescribeStatementin its current design is uninplementable.edgedb-js)ExecutemessageDescribemessage. With no named or anonymous prepared statements the current design orExecutedoesn't make any sense.OptimisticExecutemessage provides the full functionality ofExecute.OptimisticExecutetoExecutetypewill continue to beb'O'.PreparetoParsein docs.OptimisticExecuteand other messages to function.ParseandExecuteto accept "scripts" -- strings with multiple EdgeQL commands in them.ParseandExecutewill require theexpected_cardinalityfield to be set toNO_RESULTfor scripts.Executewould require the "output type desc ID" to be set to NULL codec.ParseandExecutewill have to be updated to normalize the arguments and re-pack them into arguments streams that Postgres can work with.Executewill pipeline all queries in one "implicit transaction" in Postgres.ExecuteScriptmessage.ParseandExecutebeing able to execute scripts there's no need to theExecuteScriptmessage.ParameterStatusmessage containing the full type descriptor of the state. The type descriptor will include the types of all session config values, all globals, and other session state.InputShape.InputShapewill be conceptually similar toObjectShapeDescriptorbut will allow sparse encoding of data -- e.g. out of 10 described global variables, the client would be able to encode and send just 1 (or none).ParseandExecutemessages. The server can return updated state via theExecuteCompletedmessage or viaParameterStatus.Parse,Execute, andExecuteComplete.client.withGlobals()andclient.withConfig()APIs. Reusing type-descriptors to encode and decode state values eliminates hardcode and allows to reuse the existing codecs code.OptimisticExecute:output_typedesc_idfield and "empty tuple" type ID forinput_typedesc_idOptimisticExecutewould return a special message containing the full output type descriptor BEFORE theDatamessages.OptimisticExecutefor queries that don't have arguments withoutParse. Queries that have all arguments marked as "optional" should also be executable with no arguments and empty tuple input ID.ExecuteManymessageCOPY INalternative.Parse,Execute,Data, etc.Datamessages sent by Postgres (currently they're just forwarded to the client untouched). While the performance impact will likely be negligible, it will still be there.Beta Was this translation helpful? Give feedback.
All reactions