예제 #1
0
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()
예제 #2
0
def read(request, response):
    key = yield request.read()
    storage = Service("storage")
    data = yield storage.read("namespace", key)
    response.write(data)
    response.close()