google-meme-code-2017/algorithm.py

19 lines
394 B
Python
Raw Permalink Normal View History

2017-02-23 19:56:05 +01:00
if latency_datacenter > latency_cache && connected(endpoint, cache)
2017-02-23 19:25:52 +01:00
cache_wel
2017-02-23 19:29:44 +01:00
if predictedrequestA > predictedrequestB
cache_op_snelste(predictedrequestA)
else
cache_op_snelste(predictedrequestB)
2017-02-23 19:18:53 +01:00
else
2017-02-23 19:25:52 +01:00
cache_niet
2017-02-23 19:22:25 +01:00
2017-02-23 19:18:53 +01:00
2017-02-23 20:15:08 +01:00
def cache_niet():
2017-02-23 19:18:53 +01:00
//TODO les, implement
2017-02-23 20:15:08 +01:00
def cache_wel():
2017-02-23 19:18:53 +01:00
//TODO les, implement
2017-02-23 19:22:25 +01:00
2017-02-23 20:15:08 +01:00
def connected(endpoint, cache):
return cache in endpointCacheLatencies[endpoint].keys()