def raw(request, response): inc = yield request.read() goapp = Service("gococaine") storage = Service("storage") # Send data to the go application response.write("Send data to the go application") key = yield goapp.enqueue("process", str(inc)) response.write("Data was processed and saved to the storage, key: %s" % key) # Read data from storage res = yield storage.read("namespace", key) response.write(res) response.close()
def read(request, response): key = yield request.read() storage = Service("storage") data = yield storage.read("namespace", key) response.write(data) response.close()