This repository has been archived by the owner on Sep 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 623
/
Copy pathREADME
69 lines (51 loc) · 2.51 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//===----------------------------------------------------------------------===//
//
// Peloton
//
// README
//
// Identification: src/network/README
//
// Copyright (c) 2015-2018, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//
#####################################################
# #
#PELOTON WIRE #
# #
#####################################################
Description
This is a prototype implementation of the Postgres network protocol in C++ in order to support communication with Postgres shell and JDBC clients with Peloton. To test the correctness of the implementation, this protocol is backed against Sqlite. This helps us provide the required database support for fully executing the YCSB and TPCC benchmarks and inspecting whether this protocol design can potentially support these benchmarks.
The Sqlite sources have been included in the source folder for the network protocol, to avoid introducing Sqlite linking dependencies in the Peloton Makefiles.
The protocol abstracts the server-client interaction for every query through packet formats. The full details about the protocol can be found in the Postgres Documentation.
Preliminary results
The underlying socket layer has been evaluated to support (over a single connection)
~70,000 NOPs (empty queries) per second
~12,000 exact-match queries per second
Deployment and Testing
Build by using the standard peloton make and install
The wire_server using wire_server binary (ex: > wire_server 57721). The wire_server behaves similarly to the Postgres Server.
build/tests/wire_test can be used for elementary testing
using psql shell pointed to wire_server's port can be used to run simple queries. Any of the SQL tests in scripts/testing could be used to test the Simple Query Protocol
Use scripts/testing/jdbc/test-jdbc.sh to test the Extended Query Protocol
Run oltpbench/ycsb for more comprehensive tests
Basic implementation of the Postgres network protocol for Peloton.
This currently exists as a standalone server devoid of query parser, planner or any other DB internals.
Only server side of the protocol is covered.
Packets supported
-----------------
-> From PSQL to Server
* StartupMessage (F)
* Query (Q)
* Sync (S)
* Bind (P)
* Execute (E)
* Describe (D)
-> At Server, send to Client
* AuthenticationOk (R)
* ErrorResponse (E)
* ReadyForQuery (Z)
* EmptyQueryResponse (I)
* RowDescription (T)
* DataRow (D)
* CommandComplete (C)