-
Notifications
You must be signed in to change notification settings - Fork 277
DatastoreServer
AppServers save, retrieve, and query data via the Datastore API. We support AppServers written in the Python, Java, and Go programming languages, but we don't want to duplicate the complexity of talking to any database supported within AppScale within each of the AppServers. We therefore create a specialized server that understands the encoding used by Datastore API requests, known as Protocol Buffers, that can use the AppDB translation layer to talk to supported databases.
The ProtocolBufferServer exposes an interface that AppServers can send Protocol Buffer-encoded requests to, which in turn uses the AppDB translation layer to read or write to whichever database AppScale is running on.
In response to Datastore API requests from the Python, Java, or Go AppServers.
Three ProtocolBufferServers run on each database node within an AppScale deployment. These servers are load balanced by nginx
and haproxy
.
The ProtocolBufferServer is written in Python, and its code can be found in appscale/AppDB/appscale_server.py
. It is also sometimes informally abbreviated to PBServer.
The ProtocolBufferServer doesn't have tests right now. Boo! You could help us out a lot by writing some tests for the ProtocolBufferServer. To match other Python code, we'd appreciate it a lot if you used unittest and flexmock. If you did, we'd also love it if you modified Rakefile
to run the test suite via rake protocolbufferserver:test
(but if you don't it's not a big deal).