diff --git a/examples/Cargo.lock b/examples/Cargo.lock index 989760a6920..d4f28bc3dd3 100644 --- a/examples/Cargo.lock +++ b/examples/Cargo.lock @@ -49,7 +49,7 @@ dependencies = [ "abitest_0_frontend", "abitest_1_backend", "assert_matches", - "env_logger 0.6.2", + "env_logger 0.7.1", "log", "maplit", "oak", @@ -75,7 +75,7 @@ version = "0.1.0" dependencies = [ "aggregator_common", "assert_matches", - "env_logger 0.6.2", + "env_logger 0.7.1", "itertools 0.9.0", "log", "maplit", @@ -410,6 +410,17 @@ dependencies = [ "bitflags", ] +[[package]] +name = "colored" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +dependencies = [ + "atty", + "lazy_static", + "winapi 0.3.8", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -833,7 +844,7 @@ name = "hello_world" version = "0.1.0" dependencies = [ "assert_matches", - "env_logger 0.6.2", + "env_logger 0.7.1", "log", "oak", "oak_runtime", @@ -1556,7 +1567,7 @@ name = "private_set_intersection" version = "0.1.0" dependencies = [ "assert_matches", - "env_logger 0.6.2", + "env_logger 0.7.1", "log", "oak", "oak_runtime", @@ -1692,6 +1703,16 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-xml" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cc440ee4802a86e357165021e3e255a9143724da31db1e2ea540214c96a0f82" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "quote" version = "1.0.6" @@ -1923,7 +1944,7 @@ name = "running_average" version = "0.1.0" dependencies = [ "assert_matches", - "env_logger 0.6.2", + "env_logger 0.7.1", "log", "oak", "oak_abi", @@ -2483,6 +2504,19 @@ dependencies = [ "num-traits", ] +[[package]] +name = "simple_logger" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0c4611f32f4c2bac73754f22dca1f57e6c1945e0590dae4e5f2a077b92367" +dependencies = [ + "atty", + "chrono", + "colored", + "log", + "winapi 0.3.8", +] + [[package]] name = "slab" version = "0.4.2" @@ -3016,7 +3050,7 @@ name = "translator" version = "0.1.0" dependencies = [ "assert_matches", - "env_logger 0.6.2", + "env_logger 0.7.1", "log", "oak", "oak_runtime", @@ -3035,6 +3069,25 @@ dependencies = [ "prost", ] +[[package]] +name = "trusted_information_retrieval" +version = "0.1.0" +dependencies = [ + "assert_matches", + "itertools 0.9.0", + "log", + "maplit", + "oak", + "oak_abi", + "oak_runtime", + "oak_tests", + "oak_utils", + "prost", + "quick-xml", + "serde", + "simple_logger", +] + [[package]] name = "try-lock" version = "0.2.2" diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 85f9fb1327a..d6649971cd2 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -11,6 +11,7 @@ members = [ "chat/module/rust", "hello_world/module/rust", "machine_learning/module/rust", + "trusted_information_retrieval/module/rust", "private_set_intersection/module/rust", "running_average/module/rust", "rustfmt/module/rust", diff --git a/examples/trusted_information_retrieval/client/BUILD b/examples/trusted_information_retrieval/client/BUILD new file mode 100644 index 00000000000..3e5743a120c --- /dev/null +++ b/examples/trusted_information_retrieval/client/BUILD @@ -0,0 +1,36 @@ +# +# Copyright 2020 The Project Oak Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +load("@rules_cc//cc:defs.bzl", "cc_binary") + +package( + licenses = ["notice"], +) + +cc_binary( + name = "client", + srcs = ["trusted_information_retrieval.cc"], + deps = [ + "//examples/trusted_information_retrieval/proto:trusted_information_retrieval_cc_grpc", + "//oak/client:application_client", + "@com_github_google_glog//:glog", + "@com_github_grpc_grpc//:grpc++", + "@com_google_absl//absl/flags:flag", + "@com_google_absl//absl/flags:parse", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/types:optional", + ], +) diff --git a/examples/trusted_information_retrieval/client/trusted_information_retrieval.cc b/examples/trusted_information_retrieval/client/trusted_information_retrieval.cc new file mode 100644 index 00000000000..c0437c3492d --- /dev/null +++ b/examples/trusted_information_retrieval/client/trusted_information_retrieval.cc @@ -0,0 +1,87 @@ +/* + * Copyright 2020 The Project Oak Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "absl/flags/flag.h" +#include "absl/flags/parse.h" +#include "absl/strings/numbers.h" +#include "absl/strings/str_split.h" +#include "absl/types/optional.h" +#include "examples/trusted_information_retrieval/proto/trusted_information_retrieval.grpc.pb.h" +#include "examples/trusted_information_retrieval/proto/trusted_information_retrieval.pb.h" +#include "glog/logging.h" +#include "include/grpcpp/grpcpp.h" +#include "oak/client/application_client.h" + +ABSL_FLAG(std::string, address, "localhost:8080", "Address of the Oak application to connect to"); +ABSL_FLAG(std::vector, location, std::vector{}, + "Requested location (latitude and longitude separated by comma)"); +ABSL_FLAG(std::string, ca_cert, "", "Path to the PEM-encoded CA root certificate"); + +using ::oak::examples::trusted_information_retrieval::ListPointsOfInterestRequest; +using ::oak::examples::trusted_information_retrieval::ListPointsOfInterestResponse; +using ::oak::examples::trusted_information_retrieval::Location; +using ::oak::examples::trusted_information_retrieval::PointOfInterest; +using ::oak::examples::trusted_information_retrieval::TrustedInformationRetrieval; + +void get_nearest_point_of_interest(TrustedInformationRetrieval::Stub* stub, float latitude, + float longitude) { + grpc::ClientContext context; + LOG(INFO) << "Getting nearest point of interest:"; + ListPointsOfInterestRequest request; + Location* location = request.mutable_location(); + location->set_latitude(latitude); + location->set_longitude(longitude); + ListPointsOfInterestResponse response; + grpc::Status status = stub->ListPointsOfInterest(&context, request, &response); + if (!status.ok()) { + LOG(ERROR) << "Could not get nearest point of interest: " << status.error_code() << ": " + << status.error_message(); + } + LOG(INFO) << "Response:"; + LOG(INFO) << " - name: " << response.point_of_interest().name(); + LOG(INFO) << " - latitude: " << response.point_of_interest().location().latitude(); + LOG(INFO) << " - longitude: " << response.point_of_interest().location().longitude(); +} + +int main(int argc, char** argv) { + absl::ParseCommandLine(argc, argv); + + std::string address = absl::GetFlag(FLAGS_address); + std::string ca_cert = oak::ApplicationClient::LoadRootCert(absl::GetFlag(FLAGS_ca_cert)); + LOG(INFO) << "Connecting to Oak Application: " << address; + + auto stub = TrustedInformationRetrieval::NewStub( + oak::ApplicationClient::CreateTlsChannel(address, ca_cert)); + + // Parse arguments. + auto location = absl::GetFlag(FLAGS_location); + if (location.size() != 2) { + LOG(FATAL) << "Incorrect number of coordinates: " << location.size() << " (expected 2)"; + } + float latitude; + if (!absl::SimpleAtof(location.front(), &latitude) && latitude >= -90.0 && latitude <= 90.0) { + LOG(FATAL) << "Latitude must be a valid floating point number >=-90 and <= 90."; + } + float longitude; + if (!absl::SimpleAtof(location.back(), &longitude) && longitude >= -180.0 && longitude <= 180.0) { + LOG(FATAL) << "Longitude must be a valid floating point number >= -180 and <= 180."; + } + + // Get nearest point of interest from the server. + get_nearest_point_of_interest(stub.get(), latitude, longitude); + + return EXIT_SUCCESS; +} diff --git a/examples/trusted_information_retrieval/config/BUILD b/examples/trusted_information_retrieval/config/BUILD new file mode 100644 index 00000000000..687598dc1ff --- /dev/null +++ b/examples/trusted_information_retrieval/config/BUILD @@ -0,0 +1,32 @@ +# +# Copyright 2020 The Project Oak Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +load("//oak/common:app_config.bzl", "serialized_config") + +package( + default_visibility = ["//examples/trusted_information_retrieval:__subpackages__"], + licenses = ["notice"], +) + +exports_files(srcs = glob(["*.textproto"])) + +serialized_config( + name = "config", + modules = { + "app": "//:examples/target/wasm32-unknown-unknown/release/trusted_information_retrieval.wasm", + }, + textproto = ":config.textproto", +) diff --git a/examples/trusted_information_retrieval/config/config.textproto b/examples/trusted_information_retrieval/config/config.textproto new file mode 100644 index 00000000000..e0b1d92d2a5 --- /dev/null +++ b/examples/trusted_information_retrieval/config/config.textproto @@ -0,0 +1,7 @@ +initial_node_configuration: { + name: "main" + wasm_config: { + wasm_module_name: "app" + wasm_entrypoint_name: "grpc_oak_main" + } +} diff --git a/examples/trusted_information_retrieval/database.xml b/examples/trusted_information_retrieval/database.xml new file mode 100644 index 00000000000..87fa18eb342 --- /dev/null +++ b/examples/trusted_information_retrieval/database.xml @@ -0,0 +1 @@ +1River Street , Clerkenwell00102351.52916347-0.109970527truefalse1278947280000false415192Phillimore Gardens, Kensington00101851.49960695-0.197574246truefalse1278585780000false727373Christopher Street, Liverpool Street00101251.52128377-0.084605692truefalse1278240360000false626324St. Chad's Street, King's Cross00101351.53005939-0.120973687truefalse1278241080000false1211235Sedding Street, Sloane Square00342051.49313-0.156876truefalse1278241440000false520276Broadcasting House, Marylebone00342451.51811784-0.144228881truefalse1278241680000false810187Charlbert Street, St. John's Wood00342251.53430039-0.1680743truefalse1278241800000false610168Maida Vale, Maida Vale00342351.529857-0.18348604truefalse1540984560000false731399New Globe Walk, Bankside00101551.5073853-0.096440751truefalse1278242340000false2171910Park Street, Bankside00102451.50597426-0.092754157truefalse1278242460000false6121811Brunswick Square, Bloomsbury00102251.52395143-0.122502346truefalse1278340440000false0232412Malet Street, Bloomsbury00098051.52168078-0.130431727truefalse1278340620000false6434913Scala Street, Fitzrovia00097051.51991453-0.136039674truefalse1278340800000false9122114Belgrove Street , King's Cross00101151.52994371-0.123616824truefalse1278341040000false22254815Great Russell Street, Bloomsbury00098851.51772703-0.127854211truefalse1278341220000false6192616Cartwright Gardens , Bloomsbury00101051.52635795-0.125979294truefalse1278341400000false2202217Hatton Wall, Holborn00100851.5216612-0.109006325truefalse1278423720000false3232618Drury Lane, Covent Garden00100751.51477076-0.12221963truefalse1278426300000false8192719Taviton Street, Bloomsbury00100951.52505093-0.131161087truefalse1278426720000false4263020Drummond Street , Euston00099351.527326-0.13605286truefalse1544659200000false18102821Hampstead Road (Cartmel), Euston00342651.53007835-0.13884627truefalse1278427740000false1151622Northington Street , Holborn00342551.5222641-0.114079481truefalse1278428880000false3161923Red Lion Square, Holborn00342151.51943538-0.119123345truefalse1278429300000false0161624British Museum, Bloomsbury00098151.51908011-0.124678402truefalse1278430140000false2333525Doric Way , Somers Town00100451.5288338-0.132250369truefalse1278433200000false19305026Ampton Street , Clerkenwell00101951.52728093-0.11829517truefalse1278434160000false6152127Bouverie Street, Temple00102151.51382102-0.107927706truefalse1278500160000false4293328Bolsover Street, Fitzrovia00102551.52351808-0.143613641truefalse1278500460000false7101929Hereford Road, Bayswater00101651.513735-0.193487truefalse1278501180000false7152230Windsor Terrace, Hoxton00102951.52915444-0.093421615truefalse1278501420000false13112431Fanshaw Street, Hoxton00342751.52953709-0.083353323truefalse1278501600000false14213632Leonard Circus , Shoreditch00102051.52469624-0.084439283truefalse1278506700000false3404333Central House, Aldgate00343051.5156-0.070056truefalse1278506940000false5121834Pancras Road, King's Cross00342851.5341235-0.129386874truefalse1278507060000false1151636De Vere Gardens, Kensington00344651.50173726-0.184980612truefalse1278519900000false12152837Penywern Road, Earl's Court00344451.49159394-0.192369256truefalse1278520020000false891738Abingdon Villas, Kensington00344251.4973875-0.197245586truefalse1278584880000false981739Shoreditch High Street, Shoreditch00344551.5263778-0.078130921truefalse1278601740000false19224140Commercial Street, Shoreditch00108351.52127071-0.0755789truefalse1278601980000false4121641Pindar Street, Liverpool Street00108451.520955-0.083493552truefalse1278602280000false6182442Wenlock Road , Hoxton00097951.53099181-0.093903825truefalse1278602700000false11172843Crawford Street, Marylebone00103651.52026-0.157183945truefalse1278687720000false6101844Bruton Street, Mayfair00103451.51073687-0.144165239truefalse1278687900000false1382145Boston Place, Marylebone00103551.522511-0.162298truefalse1278691320000false13132646Nesham Street, Wapping00103151.507131-0.06691truefalse1278691800000false881647Warwick Avenue Station, Maida Vale00102751.52334476-0.183846408truefalse1278749160000false5131948Godliman Street, St. Paul's00097151.51248445-0.099141408truefalse1278749460000false10152549Curzon Street, Mayfair00343751.50706909-0.145904427truefalse1278749940000false691650East Road, Hoxton00105451.52867339-0.087459376truefalse1278750240000false4232751Finsbury Library , Finsbury00098651.52671796-0.104298194truefalse1278750540000false8212952Roscoe Street, St. Luke's00102651.52295439-0.094934859truefalse1278750840000false5131853Grafton Street, Mayfair00343151.5099923-0.143495266truefalse1278752580000false1261854Golden Lane, Barbican00096751.52174785-0.094475072truefalse1278766740000false5202755Finsbury Circus, Liverpool Street00098451.51707521-0.086685542truefalse1278766980000false8253356Paddington Street, Marylebone00103351.52058381-0.154701411truefalse1278767220000false681657Guilford Street , Bloomsbury00097451.52334672-0.120202614truefalse1278767460000false21103258New Inn Yard, Shoreditch00103251.52452699-0.079248081truefalse1278767700000false9102060Lisson Grove, St. John's Wood00103051.52644828-0.172190727truefalse1278769140000false1421861Great Dover Street, The Borough00101751.49738251-0.089446947truefalse1278773820000false13193362Cotton Garden Estate, Kennington00099051.4907579-0.106323685truefalse1278773940000false1842463Murray Grove , Hoxton00098951.53089041-0.089782579truefalse1278774120000false5222764William IV Street, Strand00102851.50946212-0.124749274truefalse1278774300000false7172666Holborn Circus, Holborn00098251.51795029-0.108657431truefalse1278845280000false11294067Hatton Garden, Holborn00098551.51882555-0.108028472truefalse1278847440000false7202868Theobald's Road , Holborn00097551.52059681-0.116688468truefalse1278857040000false3222669Euston Road, Euston00098351.5262363-0.134407652truefalse1278861540000false7172470Calshot Street , King's Cross00106651.53136059-0.117069978truefalse1278863340000false6182471Newgate Street , St. Paul's00107451.5154186-0.098850915truefalse1278924900000false8263472Farringdon Lane, Clerkenwell00343251.52352001-0.108340165truefalse1276948860000false1061673Old Street Station, St. Luke's00106451.52572618-0.088486188truefalse1278941040000false19183774Vauxhall Cross, Vauxhall00100051.48591714-0.124469948truefalse1278941160000false4101775Torrens Street, Angel00106051.53219984-0.105480698truefalse1278945180000false1361976Longford Street, The Regent's Park00097651.52559505-0.144083893truefalse1278946560000false5162177Russell Square Station, Bloomsbury00097851.52341837-0.124121774truefalse1278946860000false4222678Sadlers Sports Centre, Finsbury00343351.52486887-0.099489485truefalse1278948480000false5121779Arundel Street, Temple00345551.511726-0.11385596truefalse1509018360000false4131880Webber Street , Southwark00344851.50069361-0.102091246truefalse1278952440000false15304581Great Titchfield Street, Fitzrovia00345051.52025302-0.141327271truefalse1279012980000false6121982Chancery Lane, Holborn00345351.514274-0.111257truefalse1279015680000false2131583Panton Street, West End00345251.50963938-0.131510949truefalse1279015800000false3172184Breams Buildings, Holborn00344951.51593725-0.111778348truefalse1279020240000false4212585Tanner Street, Bermondsey00099451.50064702-0.078600401truefalse1279026060000false24154086Sancroft Street, Vauxhall00343451.48947903-0.115156562truefalse1279027140000false1222488Bayley Street , Bloomsbury00100651.51858757-0.132053392truefalse1279028280000false9152589Tavistock Place, Bloomsbury00343951.5262503-0.123509611truefalse1279029360000false0191990Harrington Square 1, Camden Town00103851.53301907-0.139174593truefalse1279030020000false16102791Walnut Tree Walk, Vauxhall00107651.49368637-0.111014912truefalse1279036740000false0192092Borough Road, Elephant & Castle00108251.49889832-0.100440521truefalse1279037040000false8334193Cloudesley Road, Angel00258651.53440868-0.109025404truefalse1279037760000false17203794Bricklayers Arms, Borough00107051.49506109-0.085814489truefalse1279038420000false1992895Aldersgate Street, Barbican00106551.5208417-0.097340162truefalse1279096560000false4111596Falkirk Street, Hoxton00104751.53095071-0.078505384truefalse1279096980000false1792697Gloucester Road (North), Kensington00344751.49792478-0.183834706truefalse1279097580000false3141898Hampstead Road, Euston00097251.52554222-0.138231303truefalse1279099080000false13405499Old Quebec Street, Marylebone00108551.51457763-0.158264483truefalse1279099680000false31116100Albert Embankment, Vauxhall00105951.49043573-0.122806861truefalse1279099860000false131124101Queen Street 1, Bank00099951.51155322-0.0929401truefalse1279102680000false14722102Jewry Street, Aldgate00104551.51340693-0.076793375truefalse1279102860000false61117103Vicarage Gate, Kensington00344151.50472376-0.192538767truefalse1279103520000false51118104Crosswall, Tower00099151.51159481-0.077121322truefalse1279103760000false62734105Westbourne Grove, Bayswater00104151.51552971-0.190240716truefalse1279105320000false81726106Woodstock Street, Mayfair00104251.51410514-0.147301667truefalse1279106880000false13821107Finsbury Leisure Centre, St. Luke's00104951.52600832-0.096317627truefalse1279107480000false91120108Abbey Orchard Street, Westminster00342951.49812559-0.132102166truefalse1279107720000false111729109Soho Square , Soho00105251.51563144-0.132328837truefalse1279108320000false65157110Wellington Road, St. John's Wood00105551.53304322-0.172528678truefalse1279108920000false61017111Park Lane , Hyde Park00103751.5100172-0.157275636truefalse1279109160000false22528112Stonecutter Street, Holborn00106151.51580998-0.105270275truefalse1279115460000false61521113Gloucester Road (Central), South Kensington00343551.49646288-0.183289032truefalse1279116600000false21619114Park Road (Baker Street), The Regent's Park00105051.52451738-0.158963647truefalse1279119900000false81422115Braham Street, Aldgate00106251.51423368-0.073537654truefalse1279120680000false171734116Little Argyll Street, West End00099551.51449962-0.141423695truefalse1279122360000false13821117Lollard Street, Vauxhall00099851.49288067-0.114934001truefalse1279124220000false42125118Rochester Row, Westminster00345751.49582705-0.13547809truefalse1279124520000false9413119Bath Street, St. Luke's00096451.52589324-0.090847761truefalse1279124760000false11718120The Guildhall, Guildhall00104451.51573534-0.093080779truefalse1279187040000false11617121Baker Street, Marylebone00108651.51891348-0.156166631truefalse1279189200000false22022122Norton Folgate, Liverpool Street00106851.52111369-0.078869751truefalse1279190040000false41923123St. John Street, Finsbury00099251.52836014-0.104724625truefalse1279191300000false71118124Eaton Square, Belgravia00106951.49654462-0.150905245truefalse1279191540000false15520125Borough High Street, The Borough00099651.50069491-0.094524319truefalse1279192200000false19221126Museum of London, Barbican00104351.51782144-0.096496865truefalse1279193340000false25052127Wood Street, Guildhall00106351.51700801-0.09388536truefalse1279193520000false7817128Emperor's Gate, South Kensington00111651.49536226-0.185296516truefalse1279194060000false10922129Golden Square, Soho00345151.5118973-0.137043852truefalse1279198500000false13518130Tower Gardens , Tower00107151.50950627-0.075459482truefalse1279198800000false12224131Eversholt Street , Camden Town00100551.53300545-0.136792671truefalse1279199280000false13316132Bethnal Green Road, Shoreditch00097351.52364804-0.074754872truefalse1279199520000false33438134Wapping High Street, Wapping00103951.504904-0.06797truefalse1279200900000false15520135Clerkenwell Green, Clerkenwell00105351.52326004-0.104708922truefalse1279201080000false101121136Queen Victoria Street, St. Paul's00104851.51196176-0.097441687truefalse1279201200000false102132138Green Street, Mayfair00346451.51227622-0.157436972truefalse1279205220000false61219139Lambeth Road, Vauxhall00107851.49488108-0.117974901truefalse1279205460000false8918140Finsbury Square , Moorgate00105651.52096262-0.085634242truefalse1279205580000false151833141Chapel Place, Marylebone00100351.51530805-0.147203711truefalse1279210980000false72229142West Cromwell Road, Earl's Court00100151.49372451-0.198286569truefalse1279211220000false19524143Pont Street, Knightsbridge00111451.4968865-0.161203828truefalse1279211400000false17724144Kennington Cross, Kennington00109351.48894022-0.111435796truefalse1279211580000false212547145Ilchester Place, Kensington00111551.50074359-0.202759212truefalse1279212180000false61724146Vauxhall Bridge , Pimlico00104651.48836528-0.129361842truefalse1279212360000false161935148Tachbrook Street, Victoria00096551.49211134-0.138364847truefalsefalse5816149Kennington Road Post Office, Oval00107351.48478899-0.110683213truefalse1279215360000false14418150Holy Trinity Brompton, Knightsbridge00100251.49705603-0.168917077truefalse1279215540000false22528151Chepstow Villas, Notting Hill00112051.51213691-0.201554966truefalse1279215720000false32226152Hampton Street, Walworth00111851.49217002-0.101536865truefalse1279215900000false16521153Bayswater Road, Hyde Park00109651.511933-0.174411truefalse1279216080000false02127154Waterloo Station 3, Waterloo00107251.50379168-0.11282408truefalsefalse142135155Lexham Gardens, Kensington00112151.49586666-0.191933711truefalse1279272660000false01919156New Kent Road, The Borough00096651.49443626-0.092921165truefalse1279273080000false62733157Wright's Lane, Kensington00109451.50039792-0.193068385truefalse1279273200000false43237158Trebovir Road, Earl's Court00111351.49085368-0.196170309truefalse1279273320000false15318159Great Marlborough Street, Soho00112551.51461995-0.137841333truefalse1279273560000false83139160Waterloo Place, St. James's00345851.50663341-0.131773845truefalse1279274280000false51120161Guildhouse Street, Victoria00347851.49234577-0.141334487truefalse1279286940000false9716162Southampton Place, Holborn00112351.51760685-0.121328408truefalse1279287120000false101020163Sloane Avenue, Knightsbridge00346151.4931848-0.167894973truefalse1279287300000false42227164Cleveland Gardens, Bayswater00117851.515607-0.183118788truefalse1279287600000false11416165Orsett Terrace, Bayswater00258551.517932-0.183716959truefalse1279287960000false8715166Seville Street, Knightsbridge00117751.50185512-0.159237081truefalse1279288140000false22427167Eccleston Place, Victoria00346551.49395092-0.147624377truefalsefalse15419168Argyll Road, Kensington00346351.50040123-0.195455928truefalse1279289400000false41519169Porchester Place, Paddington00347751.51474612-0.165164288truefalse1279289760000false9818170Hardwick Street, Clerkenwell00105751.52784273-0.108068155truefalse1279290180000false21930171Collingham Gardens, Earl's Court00345951.4916156-0.186753859truefalse1279291200000false9414172Sumner Place, South Kensington00112451.49121192-0.173715911truefalse1279291500000false16119173Waterloo Road, South Bank00117651.50486-0.113001truefalse1279292700000false51015174Strand, Strand00110051.512529-0.115163truefalse1279295940000false23436175Worship Street, Shoreditch00099751.521668-0.079608554truefalse1529674980000false64351176Gloucester Terrace, Bayswater00117351.51791921-0.188098863truefalse1279297560000false61523177Ashley Place, Victoria00112251.49616092-0.140947636truefalse1279297740000false22225178Warwick Square, Pimlico00346051.48985626-0.141923621truefalse1279297920000false51419180North Audley Street, Mayfair00112651.5129118-0.153645496truefalse1279298220000false9817181Belgrave Square, Belgravia00347351.49941247-0.152317537truefalse1279298460000false81321182Bell Street , Marylebone00116651.52202903-0.165842551truefalse1279363140000false51318183Riverlight North, Nine Elms00116551.482362-0.13612398truefalse1279364160000false61624184Portland Place, Marylebone00116451.52071513-0.14521173truefalse1279364280000false112334185Alderney Street, Pimlico00117451.48805753-0.140741432truefalse1279365360000false11314186South Wharf Road, Paddington00116751.51733558-0.175810943truefalse1279365480000false10416187Queen's Gate (South), South Kensington00117251.49247977-0.178433004truefalse1279365720000false91625188Nutford Place, Marylebone00111251.5165179-0.164393768truefalse1279376760000false12618189Claremont Square, Angel00110451.53166681-0.109914711truefalse1279377180000false11618190Rampayne Street, Pimlico00110651.48997562-0.132845681truefalse1279381080000false31821191Hyde Park Corner, Hyde Park00107551.50311799-0.153520935truefalse1279383120000false181136192Wardour Street, Soho00116351.51251523-0.133201961truefalse1279383300000false6816193Bankside Mix, Bankside00096351.50581776-0.100186337truefalse1279392479356false163960194Hop Exchange, The Borough00096051.50462759-0.091773776truefalse1279392479395false183756195Milroy Walk, South Bank00095951.50724437-0.106237501truefalse1279392479432false21930196Union Street, The Borough00096151.50368837-0.098497684truefalse1279392479471false6917197Stamford Street, South Bank00096251.50556905-0.111606696truefalse1279392479520false131427199Great Tower Street, Monument00108051.51048489-0.082989638truefalse1279441800000false51724200LMU Commercial Road, Whitechapel00110551.51492456-0.066078037truefalse1279441920000false12214201Dorset Square, Marylebone00116251.5225965-0.161113413truefalse1279444080000false31116202Leman Street, Aldgate00110251.51236389-0.06954201truefalse1279444320000false92837203West Smithfield Rotunda, Farringdon00104051.51821864-0.100791005truefalse1279445580000false8615204Margery Street, Clerkenwell00346851.52659961-0.112432615truefalse1279466640000false51219206New Road 1 , Whitechapel00117151.518154-0.062697truefalse1279471380000false201636207Grosvenor Crescent, Belgravia00116951.50135267-0.153194766truefalse1279558140000false51218208Mallory Street, Marylebone00117551.52505151-0.166304359truefalse1279472580000false15520209Denyer Street, Knightsbridge00345451.49358391-0.165101392truefalse1279529160000false141630210Hinde Street, Marylebone00347651.51681444-0.151926305truefalse1279535160000false71321211Cadogan Place, Knightsbridge00346951.49464523-0.158105512truefalse1279535820000false82634212Campden Hill Road, Notting Hill00348751.50658458-0.199004026truefalse1279536840000false61117213Wellington Arch, Hyde Park00110951.50274025-0.149569201truefalse1279537020000false191336214Endsleigh Gardens, Euston00107951.52683806-0.130504336truefalse1279537200000false112132215Moorfields, Moorgate00109251.51906932-0.088285377truefalse1279537380000false84654216Old Brompton Road, South Kensington00347951.49094565-0.181190899truefalse1279537920000false191030217Wormwood Street, Liverpool Street00258751.51615461-0.082422399truefalse1279538040000false51116218St. Luke's Church, Chelsea00348651.48971651-0.170194408truefalse1279543740000false91020219Bramham Gardens, Earl's Court00118351.49016361-0.19039362truefalse1279545900000false161229220Chelsea Green, Chelsea00117951.49066456-0.166485083truefalse1279546320000false22427221Horseferry Road, Westminster00117051.49481649-0.13045856truefalse1279552200000false8816222Knightsbridge, Hyde Park00110151.50275704-0.155349725truefalse1279614120000false241843223Rodney Road , Walworth00348151.49148474-0.090220911truefalse1279614420000false18624224Queensway, Kensington Gardens00115051.51031-0.18740235truefalse1279615020000false41317225Notting Hill Gate Station, Notting Hill00118251.50935342-0.196422truefalse1279616280000false151530226Charles II Street, West End00348851.50844614-0.131961389truefalse1279616520000false42024227Great Percy Street, Clerkenwell00347051.52891573-0.115480888truefalse1279616700000false16623228St. James's Square, St. James's00106751.50742485-0.134621209truefalse1279616880000false211840229Whitehall Place, Strand00115151.50654321-0.123179697truefalse1279617780000false14924230Poured Lines, Bankside00114451.50669284-0.103137426truefalse1279618020000false52631231Queen's Gate (Central), South Kensington00108951.49396755-0.17873226truefalse1279622820000false03131232Carey Street, Holborn00113951.51501025-0.112753217truefalse1279623240000false11516233Pall Mall East, West End00115351.50777049-0.130699733truefalse1279624260000false31922234Liverpool Road (N1 Centre), Angel00108151.53450449-0.106992706truefalse1279624680000false24024235Kennington Road , Vauxhall00115451.49571828-0.110889274truefalse1279625640000false52936236Fashion Street, Whitechapel00348351.51838043-0.073438925truefalse1279625940000false141630237Dock Street, Wapping00346751.5097860151-0.0681619805156truefalse1279799040000false181230238Frampton Street, Paddington00109951.5233534-0.175116099truefalse1279627920000false221032239Warren Street Station, Euston00109051.52443845-0.138019439truefalse1279628160000false111526240Colombo Street, Southwark00347251.50545935-0.10569204truefalse1279628280000false21114242Beaumont Street, Marylebone00348251.52200801-0.151359288truefalse1279628640000false02323243Gloucester Street, Pimlico00110351.49096258-0.139625122truefalse1279628940000false20525244Earnshaw Street , Covent Garden00114551.51611887-0.128585022truefalse1279629240000false51318245Grosvenor Road, Pimlico00114051.4853572-0.142207481truefalse1279629660000false82129246Berry Street, Clerkenwell00115951.52285301-0.099994052truefalse1279639740000false83241247St. John's Wood Church, The Regent's Park00109151.530529-0.167515truefalse1279639920000false212950248Triangle Car Park, Hyde Park00108851.50645179-0.170279555truefalse1279640160000false25027249Harper Road, The Borough00113751.49859784-0.096191134truefalse1279640400000false211942250Royal Avenue 1, Chelsea00344051.489932-0.162727truefalse1279641000000false10010251Brushfield Street, Liverpool Street00116151.518908-0.079249truefalse1279700160000false161634252Jubilee Gardens, South Bank00111151.5046364-0.116542278truefalse1279700640000false121730253Shoreditch Park, Hoxton00105151.53404294-0.086379717truefalse1279700820000false181030254Chadwell Street, Angel00347151.53051587-0.106408455truefalse1279700940000false11718255Clifton Road, Maida Vale00114751.52557531-0.179592915truefalse1279702560000false16622256Houghton Street, Strand00348451.51362054-0.116764211truefalse1279708020000false21315257Westminster University, Marylebone00119451.52248185-0.154907218truefalse1279708140000false9716259Bourne Street, Belgravia00118051.490959-0.1532331truefalse1279709100000false21316260Broadwick Street, Soho00348951.5136846-0.135580879truefalse1279711020000false61118261Princes Square, Bayswater00349151.5134891-0.191351186truefalse1279711200000false51015262LSBU (Borough Road), Elephant & Castle00109551.49874469-0.103132904truefalse1279711620000false13435263St. Mary Axe, Aldgate00118451.51422502-0.080660083truefalse1279712160000false51621264Tysoe Street, Clerkenwell00114651.52644342-0.109256828truefalse1279712520000false11920265Southwick Street, Paddington00349051.51595344-0.169249375truefalse1279714320000false9817266Queen's Gate (North), Kensington00120451.50102668-0.180246101truefalse1279714560000false04041267Regency Street, Westminster00115551.49206037-0.132224622truefalse1279714740000false12122268Belgrave Road, Victoria00108751.49320445-0.144132875truefalse1279714920000false42529269Empire Square, The Borough00120951.50082346-0.089740764truefalse1279715100000false113546270Kennington Lane Rail Bridge, Vauxhall00119051.4863434-0.122492418truefalse1279720380000false22931271London Zoo, The Regent's Park00113651.53583617-0.156285395truefalse1279720920000false161532272Baylis Road, Waterloo00113351.50144456-0.110699309truefalse1279721220000false71522273Belvedere Road 1, South Bank00118651.50613324-0.114686385truefalse1279721400000false182038274Warwick Road, Olympia00113451.49671237-0.20528437truefalse1279721580000false33036275Barbican Centre, Barbican00119151.52004497-0.092176447truefalse1279721880000false21719276Lower Thames Street, Monument00109851.50930161-0.084985356truefalse1279723200000false02424277Kensington Church Street, Kensington00114351.50315739-0.191496313truefalse1279723320000false11617278Tooley Street, Bermondsey00114251.5034938-0.07962099truefalse1279723500000false22427279North Wharf Road, Paddington00110851.51862243-0.176645823truefalse1279723740000false91625280Royal Avenue 2, Chelsea00346251.490083-0.162418truefalse1279726440000false10010281Smith Square, Westminster00348051.49580589-0.127575233truefalse1279726620000false15318282Royal London Hospital, Whitechapel00107751.51906446-0.059642081truefalse1279726980000false202242283Kingsway, Covent Garden00114151.51440928-0.118478757truefalse1279727220000false31316284Lambeth North Station, Waterloo00111751.49914063-0.112031483truefalse1279727580000false11920286St. John's Wood Road, St. John's Wood00118751.5272947-0.174653609truefalse1279727880000false151935287Bedford Way, Bloomsbury00115651.52367314-0.128377673truefalse1279728060000false71523288Elizabeth Bridge, Victoria00113851.49236962-0.147478734truefalse1279793820000false13134289South Audley Street, Mayfair00349351.50923022-0.151296092truefalse1279794060000false31215290St Mary's Hospital, Paddington00349651.518268-0.17110323truefalse1279795140000false15520291Claverton Street, Pimlico00113551.48483991-0.138089062truefalse1279800420000false42532292Montpelier Street, Knightsbridge00120651.49888404-0.165471605truefalse1279800600000false51116293Kensington Olympia Station, Olympia00121451.49815779-0.209494128truefalse1279800780000false22225294St. George's Square, Pimlico00119551.488226-0.135635511truefalse1279800900000false10516295Swan Street, The Borough00121651.50029631-0.092762704truefalse1279801080000false20727296Knaresborough Place, Earl's Court20006951.49363156-0.190603326truefalse1377258960000false16218297Geraldine Street, Elephant & Castle00349851.49612799-0.106000855truefalse1279801560000false41317298Curlew Street, Shad Thames00121351.50227992-0.074189225truefalse1279805640000false12021299Vincent Square, Westminster00119651.49398524-0.136928582truefalse1279808160000false11719300Serpentine Car Park, Hyde Park00121751.505014-0.17306032truefalse1279808700000false8818301Marylebone Lane, Marylebone00115251.51475963-0.148105415truefalse1279809000000false91224302Putney Pier, Wandsworth00349251.466907-0.216573truefalse1279812360000false91928303Albert Gate, Hyde Park00113251.50295379-0.158456089truefalse1279812720000false141534306Rathbone Street, Fitzrovia00349751.51816295-0.135025698truefalse1279816260000false41216307Black Lion Gate, Kensington Gardens00115751.50990837-0.187842717truefalse1279816500000false41424308Long Lane , Bermondsey00118951.49907558-0.085666316truefalse1279816740000false13720309Embankment (Savoy), Strand00119251.50963123-0.119047563truefalse1279875060000false33841310Black Prince Road, Vauxhall00120551.4908679-0.116911864truefalse1279879560000false31519311Foley Street, Fitzrovia00349451.51918144-0.140485596truefalse1279880100000false81624312Grove End Road, St. John's Wood00113051.53088935-0.176770502truefalse1279880340000false81020313Wells Street, Fitzrovia00349551.51734403-0.138072691truefalse1279880520000false43438314Tyers Gate, Bermondsey00348551.50088934-0.083159352truefalse1279884480000false171936315The Tennis Courts, The Regent's Park00119951.52536703-0.153463612truefalse1279884660000false8716316Warwick Row, Westminster00096851.497998-0.14296064truefalse12798848400001539845760000false17321317Dickens Square, Borough00120851.49679128-0.093913472truefalse1279885080000false221032318Sackville Street, Mayfair00119751.51004801-0.138846453truefalse1279885320000false10818319Baldwin Street, St. Luke's00350051.52702563-0.088542771truefalse1279890360000false101121320Queen Mother Sports Centre, Victoria00114851.49357351-0.139956043truefalse1279890840000false52026321Bermondsey Street, Bermondsey00263751.49785559-0.081608045truefalse1279891020000false91524322Palissy Street, Shoreditch00350251.526293-0.073955truefalse1279891920000false71826323Clifton Street, Shoreditch00350151.523196-0.083067truefalse1279892040000false32124324Ontario Street, Elephant & Castle00120051.49652013-0.101384068truefalse1279894920000false11315325St. Martin's Street, West End00115851.50908747-0.129697889truefalse1279896660000false61218326Graham Street, Angel00113151.53266186-0.099981142truefalse1279896840000false121326327New North Road 1, Hoxton00112851.53095-0.085603truefalse1280133420000false51722328New North Road 2, Hoxton00264151.53114-0.086016truefalse1280133540000false51722329Prince Albert Road, The Regent's Park00263651.53589283-0.160854428truefalse1280133720000false32124330Eastbourne Mews, Paddington00120351.51641749-0.179135079truefalse1280141280000false112234331Bunhill Row, Moorgate00121151.52085887-0.089887855truefalse1280141460000false141530332Nevern Place, Earl's Court00121051.49334336-0.194757949truefalse1280142360000false18120333Palace Gardens Terrace, Notting Hill00263351.50860544-0.193764092truefalse1280142540000false191837334Concert Hall Approach 1, South Bank00263551.505044-0.115851truefalse1280147580000false4610335Tavistock Street, Covent Garden00120751.51196803-0.120718759truefalse1280152560000false72633336Concert Hall Approach 2, South Bank00121251.504942-0.115533truefalse1280152800000false12618337Pembridge Villas, Notting Hill00258951.51108452-0.197524944truefalse1280153100000false6716338Wellington Street , Strand00120251.51175646-0.119643424truefalse1280158740000false31924339Risinghill Street, Angel00112751.5333196-0.1117812truefalse1280160600000false21325340Bank of England Museum, Bank00120151.51444134-0.087587447truefalse1280248620000false21416341Craven Street, Strand00116051.50810309-0.12602103truefalse1280222160000false14923343London Zoo Car Park, The Regent's Park00118851.53692216-0.150181444truefalse1280224260000false13536344Goswell Road (City Uni), Finsbury00122251.528246-0.10102611truefalse1280226120000false21517345Flood Street, Chelsea00121851.48802358-0.166878535truefalse1280229720000false25733347Lower Marsh, Waterloo00121951.50013942-0.113936001truefalse1283762460000false12517348Grosvenor Square, Mayfair01062751.51217033-0.150481272truefalse1284540540000false16117349St. George Street, Mayfair00122151.51196-0.142783033truefalse1284543120000false14418350Queen's Gate, Kensington Gardens00123151.5017154373867-0.1798541843891truefalse1285756260000false21921351Macclesfield Rd, St Lukes00122651.529423-0.097122truefalse1286790480000false20828352Vauxhall Street, Vauxhall00122451.486965-0.116625truefalse1286796360000false13619353Greycoat Street , Westminster01062351.49459148-0.134234258truefalse1287652080000false21517354Northumberland Avenue, Strand00109751.506767-0.123702truefalsefalse23537356South Kensington Station, South Kensington00268551.494412-0.173881truefalse1288009080000false51015357Howland Street, Fitzrovia00269151.520994-0.139016truefalse1288092420000false42630358High Holborn , Covent Garden00122951.516226-0.124826truefalse1290079860000false41620359Butler Place, Westminster00266251.49782999-0.135440826truefalse1288950960000false9918360Howick Place, Westminster00266651.49675303-0.138733562truefalse1288958160000false62127361Waterloo Station 2, Waterloo00269251.50391973-0.11342629truefalse1291902600000false25255362Royal College Street, Camden Town00268651.536264-0.133952truefalse1290080220000false65157363Lord's, St. John's Wood00266551.5291212008901-0.171185284853truefalse1289911800000false16824364Alfred Place, Bloomsbury00350751.519656-0.132339truefalse1290080640000false93141365City Road, Angel00269051.530344-0.100168truefalse1290603600000false272047366Millennium Hotel, Mayfair00123051.5109192966489-0.1511263847351truefalse1290686880000false32327367Harrowby Street, Marylebone00268051.5173721-0.1642075truefalsefalse12216368Harriet Street, Knightsbridge00268151.50024195-0.15934065truefalse1291201680000false22225370Paddington Green, Paddington00267051.520205-0.174593truefalse1291647300000false61320371King Edward Walk, Waterloo00263951.49775-0.10988truefalse1291712820000false81422372Sardinia Street, Holborn00264951.515208-0.117863truefalse1291713000000false32124373Prince Consort Road, Knightsbridge00349951.49980661-0.176415994truefalse1295428320000false51218374Waterloo Station 1, Waterloo00269651.50402794-0.11386436truefalse1291725720000false132336375Kensington Town Hall, Kensington01063251.50194596-0.194392952truefalse1291805820000false01718376Millbank Tower, Pimlico00268351.49188409-0.125674815truefalse1294660980000false121024377Waterloo Bridge, South Bank00264851.50535447-0.113656543truefalse1295265420000false9615378Natural History Museum, South Kensington00267751.49559291-0.179077626truefalse1296121500000false132642379Turquoise Island, Notting Hill00268251.51431171-0.200838199truefalse1296121680000false17421380Stanhope Gate, Mayfair00350651.50686435-0.150666888truefalse1296125400000false61521381Charlotte Street, Fitzrovia00266951.51953043-0.13577731truefalse1296203760000false10114382Farm Street, Mayfair00267851.50935171-0.14744969truefalse1297159320000false13215383Frith Street, Soho00266051.51310333-0.13121385truefalse1296649200000false51218384Marloes Road, Kensington00350551.496481-0.192404truefalse1296731880000false8615386Moor Street, Soho00350451.51352755-0.130110822truefalse1296732540000false9716387Fire Brigade Pier, Vauxhall00270351.49369988-0.121394101truefalse1297077540000false161230388Southampton Street, Strand00122851.51070161-0.121723604truefalse1297182180000false10414389Upper Grosvenor Street, Mayfair01062151.51013066-0.155757901truefalse1297347960000false31418390Buxton Street 1, Shoreditch00122351.521776-0.068856truefalse1297764360000false142741392Imperial College, Knightsbridge00122051.49942855-0.179702476truefalse1297958700000false21921393Snow Hill, Farringdon00269951.51733427-0.103604248truefalse1298545440000false6915394Aberdeen Place, St. John's Wood00269851.524826-0.176268truefalsefalse13518395Cadogan Gardens, Chelsea00269551.492462-0.159919truefalse1298908800000false15015396Shouldham Street, Marylebone00269351.51809-0.163609truefalse1299075120000false13316397Devonshire Terrace, Bayswater00122751.51348-0.17977truefalse1299075900000false01516398Holland Park, Kensington01063151.502319-0.200742truefalse1299076440000false131730399Brick Lane Market, Shoreditch00268751.52261762-0.071653961truefalse1299582900000false121224400George Street, Marylebone00122551.517703-0.154106truefalse1299583260000false52126401Columbia Road, Shoreditch00270151.528187-0.075375truefalse1299592500000false141024402Penfold Street, Marylebone01062551.52289229-0.171681991truefalse1299592860000false12315403George Place Mews, Marylebone01063051.51689296-0.158249929truefalse1299593640000false7716404Palace Gate, Kensington Gardens00111051.50204238-0.184400221truefalse1299669180000false9313405Gloucester Road Station, South Kensington00110751.49418566-0.18267094truefalse1299669300000false11115409Strata, Elephant & Castle01062451.493146-0.099828truefalsefalse271341410Edgware Road Station, Marylebone00105851.519968-0.169774truefalsefalse303464411Walworth Road, Elephant & Castle01062951.49337264-0.09968067truefalsefalse29433412Cleaver Street, Kennington01062851.488105-0.110121truefalse1302006180000false61017419Chelsea Bridge, Pimlico02216051.485821-0.149004truefalse1308735300000false13015420Southwark Station 1, Southwark02216251.504043-0.105312truefalse1309258380000false132337421Southwark Station 2, Southwark02216351.504044-0.104778truefalse1309258440000false93645423Eaton Square (South), Belgravia02216451.49456127-0.15393398truefalse1309860240000false102131424Ebury Bridge, Pimlico02215951.490491-0.149186truefalse1324551120000false32329425Harrington Square 2, Camden Town02218151.533379-0.139159truefalse1310028420000false13638426Vincent Street, Pimlico02216151.493072-0.129925truefalse1310463720000false11617427Cheapside, Bank02218051.51397065-0.09294031truefalse1310725680000false182043428Exhibition Road, Knightsbridge02217951.499917-0.174554truefalse1318496100000false51520430South Parade, Chelsea02218251.48902-0.17524truefalse1324549980000false17118431Crinan Street, King's Cross02218351.534474-0.122203truefalse1323355020000false12820432Exhibition Road Museums, South Kensington02215851.496957-0.173894truefalse1319448720000false21922433Wren Street, Holborn02216951.524564-0.116279truefalse1323361560000false13233435Kennington Station, Kennington02217051.488852-0.105593truefalse1323346020000false41823436Red Lion Street, Holborn02217151.51824-0.11655truefalse1323350220000false72836437Vauxhall Walk, Vauxhall20005651.488124-0.120903truefalse1325746380000false42327439Killick Street, King's Cross20005351.5338-0.118677truefalse1325705460000false71522440Kennington Oval, Oval20003251.483145-0.113134truefalse1325708160000false33033441Sail Street, Vauxhall20003951.495656-0.114605truefalse1325711220000false42024442Walmer Road, Avondale20003551.510101-0.211358truefalse1325940420000false16824443Philpot Street, Whitechapel20003351.515256-0.058641truefalse1325941800000false191130444Bethnal Green Garden, Bethnal Green20004751.52568-0.055312truefalse1325944680000false141024445Cheshire Street, Bethnal Green20000351.52388-0.065076truefalse1325945820000false22628446York Hall, Bethnal Green20004251.528936-0.055894truefalse1325948880000false111627447Jubilee Crescent, Cubitt Town20005451.493381-0.007542truefalse1325949000000false34954448Fisherman's Walk West, Canary Wharf02216551.50623-0.02296truefalse1325952660000false241036449Shadwell Station, Shadwell20002051.511088-0.057159truefalse1325952900000false112335450Jubilee Street, Stepney20000251.515975-0.053177truefalse1326105240000false171128451Hermitage Court, Wapping20002151.504719-0.063531truefalse1325501400000false14116452St. Katharine's Way, Tower20004951.505697-0.070542truefalse1326109140000false20424453Garnet Street, Shadwell20004551.508447-0.055167truefalse1326111060000false81624454Napier Avenue, Millwall20004651.487679-0.021582truefalse1326115380000false21720455East Ferry Road, Cubitt Town20003151.49447-0.014409truefalse1326117780000false51117456Parkway, Camden Town20011851.538071-0.144664truefalse1326197580000false171433457Castlehaven Road, Camden Town20001651.542138-0.145393truefalse1326203280000false121729458Wapping Lane, Wapping20003451.504749-0.057544truefalse1326294780000false161228459Gunmakers Lane, Old Ford20001451.535179-0.03338truefalsefalse31317460Burdett Road, Mile End20012351.516196-0.029138truefalse1326284820000false171633461Aston Street, Stepney20001351.516-0.038775truefalse1326293640000true151126462Bonny Street, Camden Town20010551.541603-0.138853truefalse1326294600000false63945463Thurtle Road, Haggerston20009351.534776-0.071881truefalsefalse22022464St. Mary & St. Michael Church, Stepney20008251.51417-0.052099truefalse1326304980000false131225465Pitfield Street North,Hoxton20015251.53558-0.08249truefalse1333613280000false52228466Whiston Road, Haggerston20015851.534464-0.076341truefalse1326360000000false101021467Southern Grove, Bow20016851.523538-0.030556truefalse1326374040000false10517468Cantrell Road, Bow20015051.521564-0.022694truefalse1326375720000false16824469Lindfield Street, Poplar02217851.513757-0.020467truefalse1326381060000false301344470Mostyn Grove, Bow20017451.530535-0.025492truefalse1326790620000false143146471Hewison Street, Old Ford20000651.533283-0.028155truefalse1326790860000false18119472Malmesbury Road, Bow20001951.529452-0.027616truefalse1326791160000false101121473Millharbour, Millwall02216751.496137-0.019355truefalse1326816540000false12619475Lightermans Road, Millwall20000451.499041-0.020157truefalse1326825480000false22831476Stebondale Street, Cubitt Town20000951.489096-0.009205truefalse1326962100000false91829477Spindrift Avenue, Millwall20001851.49109-0.018716truefalse1326963780000false82836478Stepney Green Station, Stepney20001251.521889-0.04667truefalse1326965580000false12921479Pott Street, Bethnal Green20015651.527152-0.058005truefalse1326966240000false13720480Flamborough Street, Limehouse20011551.5128711-0.0389866truefalse1326975420000false91525481Saunders Ness Road, Cubitt Town20002251.487129-0.009001truefalse1326996480000false151435483Albert Gardens, Stepney02216651.51328-0.047784truefalse1327088280000false161733484Bromley High Street, Bow02217251.528828-0.013258truefalse1327339740000false81624485Old Ford Road, Bethnal Green02217351.531127-0.048017truefalse1327255440000false131124486Granby Street, Shoreditch02217451.525645-0.069543truefalse1327338660000false102637487Canton Street, Poplar02217551.511811-0.025626truefalse1327936860000false61423488Reardon Street, Wapping02217651.506946-0.058681truefalse1327254960000false111122489Christian Street, Whitechapel02217751.513074-0.064094truefalse1327087920000false25834490Pennington Street, Wapping20009051.508622-0.065006truefalsefalse232145491Queen Mary's, Mile End20024951.522507-0.041378truefalse1327256220000false321245492Maplin Street, Mile End20023051.525501-0.032267204truefalse1327256520000false33639494South Quay East, Canary Wharf20023351.50196-0.016251truefalse1327433220000false03636495Bow Church Station, Bow20025251.528169-0.018703truefalse1327340460000false271139496Devons Road, Bow20025551.52512-0.015578truefalse1327400820000false30739497Merchant Street, Bow20024251.526149-0.027396845truefalse1327398420000false18927498Bow Road Station, Bow20025151.527058-0.025296truefalse1327398660000false211942499Furze Green, Bow20001151.519265-0.021345truefalse1327407960000false171936500Ansell House, Stepney20014851.519806-0.055731truefalse1327430040000false241641501Cephas Street, Bethnal Green20007351.522561-0.054883truefalse1327430220000false18524502Bonner Gate, Victoria Park20024151.53341-0.049591815truefalse1563957840000false15521503Cleveland Way, Stepney20025051.520893-0.051394truefalse1327492920000false201636504St. John's Park, Cubitt Town20024351.496454-0.009506truefalse1327937820000false62430505Ackroyd Drive, Bow20003851.520398-0.026768truefalse1327937460000false121629506Bell Lane, Liverpool Street20003651.517475-0.075855truefalse1327938660000false31923507Clarkson Street, Bethnal Green20013151.528692-0.059091truefalse1327938420000false25631508Fournier Street, Whitechapel20015751.519362-0.074431truefalse1327938180000false21618509Fore Street, Guildhall20025351.517842-0.090075truefalse1327938120000false41519510Westferry DLR, Limehouse20023851.509303-0.025996truefalsefalse221741511Sutton Street, Shadwell20025651.511066-0.053558truefalse1327937940000false17421512Pritchard's Road, Bethnal Green20008351.532091-0.06142truefalse1328112600000false82230513Watney Market, Stepney20016251.5142228-0.055656truefalsefalse302151514Portman Square, Marylebone20000851.516204-0.155525truefalse1328201520000false71017515Russell Gardens, Olympia20008051.500088-0.211316truefalsefalse32124516Chrisp Street Market, Poplar20008951.5112-0.014438truefalse1328202420000false12518517Ford Road, Old Ford20002751.532513-0.033085truefalse1326790860000false11517518Antill Road, Mile End20004151.528224-0.037471truefalsefalse22630519Teviot Street, Poplar20025451.518811-0.011662truefalsefalse191433520Bancroft Road, Bethnal Green20023451.526041-0.047218truefalsefalse31821521Driffield Road, Old Ford20003051.534137-0.037366truefalsefalse15119522Clinton Road, Mile End20016151.525941-0.036017truefalsefalse211536523Langdon Park, Poplar20016051.51549-0.013475truefalsefalse20324524Lancaster Gate , Bayswater20001751.511654-0.179668truefalse1328515080000false03638526Lancaster Drive, Blackwall20014351.503143-0.008428truefalsefalse161027527Hansard Mews, Holland Park20015451.503802-0.215808truefalse1328777280000false14420528Clarges Street, Mayfair20008851.507326-0.145827truefalse1328777880000false9716529Manresa Road, Chelsea20001051.486892-0.170983truefalsefalse11718530Newby Place, Poplar20014651.508896-0.012413truefalsefalse12418531Twig Folly Bridge, Mile End20016751.530326-0.042744truefalse1328778840000false12021532Jubilee Plaza, Canary Wharf20016351.50357-0.020068truefalse1328886360000false214063533Wellington Row, Bethnal Green20016551.528222-0.069743truefalsefalse171633534Goldsmith's Row, Haggerston20015951.531864-0.066035truefalsefalse22527535Gloucester Avenue, Camden Town20014551.537349-0.147154truefalsefalse91524536Queensbridge Road, Haggerston20002451.53385-0.06992truefalsefalse33235537Old Montague Street, Whitechapel20023951.51793-0.067937truefalse1330352880000false51218538Naval Row, Blackwall20005051.508981-0.00699truefalsefalse19221540Albany Street, The Regent's Park20013451.528302-0.144466truefalsefalse91827541Green Park Station, Mayfair20009651.506613-0.142844truefalsefalse14728542Salmon Lane, Limehouse20014751.514115-0.033828truefalsefalse171633543Lansdowne Walk, Ladbroke Grove20006551.509591-0.204666truefalsefalse21921544Percival Street, Finsbury20005151.526153-0.102208truefalsefalse101222545Arlington Road, Camden Town20007051.539957-0.145246truefalsefalse12324546New Fetter Lane, Holborn20004451.517428-0.107987truefalsefalse61521547East India DLR, Blackwall20012751.509474-0.002275truefalsefalse252651548Westminster Bridge Road, Elephant & Castle20007651.498386-0.107913truefalsefalse71926549Gaywood Street, Elephant & Castle20013251.49605-0.104193truefalsefalse44145550Harford Street, Mile End20010251.521564-0.039264truefalsefalse61723551Import Dock, Canary Wharf20006651.505772-0.016460175truefalse1330071720000false33539552Watney Street, Shadwell20014951.511542-0.056667truefalsefalse111627553Regent's Row , Haggerston20006451.535678-0.062546truefalsefalse02424554Aberfeldy Street, Poplar20007851.513548-0.005659truefalsefalse9416556Heron Quays DLR, Canary Wharf20013851.502661-0.021596truefalsefalse42127557King Edward Street, St Pauls20020351.51601-0.0985truefalsefalse61420558Page Street, Westminster20004851.493978-0.127554truefalse1399635120000false14824559Abbotsbury Road, Holland Park20011151.501391-0.205991truefalsefalse51924560Ladbroke Grove Central, Ladbroke Grove20001551.511624-0.205921truefalsefalse41521561Rectory Square, Stepney20003751.518369-0.043371truefalse1330503540000false13922562Bury Place, Holborn20007451.51746-0.12335truefalse1330503420000false02121563Preston's Road, Cubitt Town20023251.499286-0.009152truefalsefalse62026564Somerset House, Strand20006851.509943-0.117619truefalsefalse33141565Selby Street, Whitechapel20013551.521905-0.063386truefalsefalse11617566Westfield Ariel Way, White City20014151.509158-0.224103truefalse1330937940000false63442568Bishop's Bridge Road West, Bayswater20011051.51616-0.18697truefalsefalse71118569Pitfield Street Central, Hoxton20024851.53213-0.08299truefalsefalse171230570Upper Bank Street, Canary Wharf20009951.503083-0.017676truefalse1330773180000false32936571Westfield Southern Terrace ,Shepherd's Bush20006151.506256-0.218337truefalse1330620180000false22629572Greenland Road, Camden Town20002651.539099-0.141728truefalsefalse122436573Limerston Street, West Chelsea20000151.485587-0.18119truefalse1331796060000false15218574Eagle Wharf Road, Hoxton20024651.53356-0.09315truefalse1333618560000false182745576Alpha Grove, Millwall20010951.497304-0.022793truefalsefalse9822577Globe Town Market, Bethnal Green20024751.528869-0.047548truefalsefalse51520578Hollybush Gardens, Bethnal Green20024451.527607-0.057133truefalse1330444680000false62632579Queen Street 2, Bank20012851.511246-0.093051truefalsefalse72636580Doddington Grove, Kennington20008451.48692917-0.102996299truefalse1392208500000false241136581New Cavendish Street, Marylebone20000551.519167-0.147983truefalse1331883540000false16118583Abingdon Green, Westminster20023151.497622-0.125978truefalsefalse16420584Ilchester Gardens, Bayswater20008651.51244-0.19096truefalsefalse61421586Mudchute DLR, Cubitt Town20009251.490645-0.014582truefalse1331797200000false13031587Monument Street, Monument20010151.50964-0.08497truefalse1332406320000false81322588Hoxton Street, Hoxton20007151.52959-0.0801truefalse1330937820000false62027589Drayton Gardens, West Chelsea20006051.487196-0.179369truefalsefalse14118590Greenberry Street, St.John's Wood20023651.53256-0.16862truefalsefalse111426592Bishop's Bridge Road East, Bayswater20010851.5171-0.18377truefalsefalse21620593Northdown Street, King's Cross20005851.531066-0.11934truefalsefalse31721594Kingsway Southbound, Strand20022651.513875-0.117774truefalse1331710680000false13233595Hammersmith Road, Hammersmith20014251.493267-0.21985truefalsefalse13822596Parson's Green , Parson's Green20023751.472817-0.199783truefalsefalse13821597Fulham Park Road, Fulham20022951.473471-0.20782truefalsefalse151127598Southerton Road, Hammersmith20016651.494499-0.228188truefalse1501544700000false251238599Manbre Road, Hammersmith20023551.485743-0.223616truefalsefalse52228600South Lambeth Road, Vauxhall20013351.481747-0.124642truefalsefalse15421601BBC White City, White City20013651.514767-0.225787truefalsefalse03536602Union Grove, Wandsworth Road20021151.472993-0.133972truefalsefalse83745603Caldwell Street, Stockwell20013751.477839-0.116493truefalsefalse14344604St Martins Close, Camden Town20019551.538792-0.138535truefalsefalse41318605Seymour Place, Marylebone20019851.520331-0.163667truefalsefalse82029606Addison Road, Holland Park20021851.504199-0.210941truefalsefalse101626607Putney Bridge Station, Fulham20012551.468814-0.210279truefalsefalse12021608Colet Gardens, Hammersmith20022451.491093-0.216493truefalsefalse111930609Sugden Road, Clapham20020851.46512358-0.157788279truefalse1380109980000false61319610Danvers Street, West Chelsea20022251.48256792-0.172078187truefalse1380113460000false13621611Princedale Road , Holland Park20006751.50646524-0.208486599truefalse1380203940000false14520612Wandsworth Rd, Isley Court, Wandsworth Road20017551.46925984-0.141812513truefalse1380294600000false02930613Woodstock Grove, Shepherd's Bush20021451.50403821-0.217400093truefalse1380211860000false21324614Bradmead, Battersea Park20002551.47817208-0.144690541truefalse1380795000000false93140615Finlay Street, Fulham20002951.4768851-0.215895601truefalse1380288900000false32124616Aintree Street, Fulham20009851.48102131-0.209973497truefalsefalse131124617Elysium Place, Fulham20002851.47107905-0.207842908truefalse1380531540000false11921618Eel Brook Common, Walham Green30000351.47625965-0.193254007truefalse1380546540000false18424619Irene Road, Parsons Green30001251.4737636-0.197010096truefalse1380552360000false34843620Surrey Lane, Battersea30001051.47518024-0.167160736truefalse1380629040000false121528621Wandsworth Town Station, Wandsworth20009151.46086446-0.187427294truefalse1380899280000false28533622Lansdowne Road, Ladbroke Grove20017251.50748124-0.205535908truefalse1380901680000false32529623Nantes Close, Wandsworth20018651.46193072-0.180791784truefalse1381135320000false20222624Courland Grove, Wandsworth Road20017351.4729184-0.132102704truefalse1381224240000false122540625Queen's Circus, Battersea Park20019051.47761941-0.149551631truefalse1381227480000false22528626Normand Park, West Kensington30000851.48438657-0.20481514truefalse1381920300000false18524627Holden Street, Battersea20000751.4687905-0.158230901truefalse1381931400000false14520628William Morris Way, Sands End20006251.46881971-0.184318843truefalse1381414980000false151026629Morie Street, Wandsworth20018751.45995384-0.190184054truefalse1381479480000false20828630Clarence Walk, Stockwell20019451.47073264-0.126994068truefalse1381487100000false72028631Battersea Park Road, Nine Elms20018351.4795017-0.141770709truefalse1381245300000false32124632Sheepcote Lane, Battersea20017651.47053858-0.163041605truefalse1381220700000false52328633Vereker Road, West Kensington20011651.48959104-0.209378594truefalse1381402920000false13032634Brook Green South, Brook Green30000251.49434708-0.215804559truefalse1381743780000false112033635Greyhound Road, Hammersmith20021551.48606206-0.214428378truefalse1381756440000false201737636South Park, Sands End20018051.46706414-0.193502076truefalse1381846320000false19828637Spencer Park, Wandsworth Common20019151.45787019-0.174691623truefalse1381933680000false61925638Falcon Road, Clapham Junction30001451.46663393-0.169821175truefalse1381834020000false23428639Coomer Place, West Kensington20008151.48357068-0.202038682truefalse1381835700000false24327640Silverthorne Road, Battersea20017951.47286577-0.148059277truefalse1382010420000false21628641Archbishop's Park, Waterloo30002551.49824168-0.117495865truefalse1381926900000false22123642Fawcett Close, Battersea20019251.46916161-0.174485792truefalse1381934220000false27936643All Saints' Road, Portobello30002651.5190427-0.204764421truefalse1382010720000false15622644Rainville Road, Hammersmith20018251.48373225-0.223852256truefalse1382278560000false13336645Great Suffolk Street, The Borough20020051.50173215-0.100292412truefalse1382110800000false101121646Buckingham Gate, Westminster20017851.49886563-0.137424571truefalse1382084340000false8516647Richmond Way, Shepherd's Bush20018151.50035306-0.217515071truefalse1382347140000false19827648Peterborough Road, Sands End20017151.46904022-0.19627483truefalse1382352840000false22830649World's End Place, West Chelsea30000951.48180515-0.18027465truefalse1382348400000false12922650St. Mark's Road, North Kensington30003451.51687069-0.213872396truefalse1382438520000false91423651Thorndike Close, West Chelsea30003051.48089844-0.183853573truefalse1382441580000false23225652Evesham Street, Avondale30002251.51148696-0.218190203truefalse1381848540000false161329653Simpson Street, Clapham Junction20019651.47084722-0.17070367truefalse1382539860000false20525654Ashmole Estate, Oval20022351.48267821-0.117661574truefalse1382520000000false122134655Crabtree Lane, Fulham20022151.48294452-0.219346128truefalse1382611200000false101627656Broomhouse Lane, Parsons Green20004051.46841875-0.199135704truefalse1382614560000false131629657Blythe Road West, Shepherd's Bush20022051.4996806-0.221791552truefalse1382621400000false71421658Ethelburga Estate, Battersea Park30000551.47729232-0.16478637truefalse1383731100000false62230659Blackfriars Station, St. Paul's20021251.511934-0.10307894truefalse1382697060000false32835660West Kensington Station, West Kensington30002051.49087074-0.206029743truefalse1382705340000false19222661All Saints Church, Portobello30002351.51632095-0.202608612truefalse1382887680000false191837662Phene Street, Chelsea20018951.48498496-0.167919869truefalse1382866680000false31924663Clarendon Road, Avondale20012451.51323001-0.211593602truefalse1382870040000false19524664Austin Road, Battersea Park30001351.474376-0.155442787truefalse1382964300000false61824665Smugglers Way, Wandsworth20011351.46108367-0.191722864truefalse1382975700000false21728666Olympia Way, Olympia30000451.49610093-0.208158259truefalse1383063480000false72938667Shepherd's Bush Road North, Shepherd's Bush20020951.5015946-0.222293381truefalse1383136140000false28534668Ravenscourt Park Station, Hammersmith30003751.49422354-0.236769936truefalse1383143160000false18626669Teversham Lane, Stockwell30003651.47614939-0.1232585truefalse1383147660000false92939670Ashley Crescent, Battersea20016951.46718562-0.152248582truefalse1383212640000false141128671Parsons Green Station, Parsons Green30005251.475089-0.201968truefalse1383217920000false203556673Hibbert Street, Battersea30005151.46517078-0.18038939truefalse1383319500000false231336674Carnegie Street, King's Cross30003551.53546778-0.11619105truefalsefalse182240675Usk Road, Clapham Junction20012651.46348914-0.182126248truefalse1383322320000false121830676Hartington Road, Stockwell20020751.47787084-0.126874471truefalse1383584400000false43035677Heath Road, Battersea20002351.46866929-0.146544642truefalse1383476160000false71927678Esmond Street, Putney20017051.46231278-0.211468596truefalse1383653580000false201030679Orbel Street, Battersea20011451.47453545-0.170210533truefalse1383661200000false12526680Westbridge Road, Battersea20021051.47768469-0.170329317truefalse1383657480000false42428681Bishop's Avenue, Fulham20004351.47303687-0.214749808truefalse1383733440000false281746682Crisp Road, Hammersmith20005951.48810829-0.22660621truefalse1383738240000false202146683Dorothy Road, Clapham Junction20011951.46506424-0.163750945truefalse1383750420000false91928684Neville Gill Close, Wandsworth20018851.45475251-0.195197203truefalse1383823380000false112132685Osiers Road, Wandsworth20021951.46067005-0.198735357truefalse1383827400000false22830686Beryl Road, Hammersmith20009751.48814438-0.222456468truefalse1383835560000false42026687Maclise Road, Olympia20021651.49760804-0.21145598truefalse1383838440000false111526688Northfields, Wandsworth20020451.46095151-0.20066766truefalse1383915240000false27128689Spanish Road, Clapham Junction20010651.45922541-0.180884959truefalse1383918180000false22830690Stanley Grove, Battersea20019951.47047503-0.152130083truefalse1383924660000false101424691Erin Close, Walham Green20018451.47946386-0.195777222truefalse1384763520000false81624692Cadogan Close, Victoria Park20011251.54211855-0.028941601truefalse1384166220000false20022693Felsham Road, Putney30001951.464786-0.215618902truefalse1384001160000false15318694Putney Rail Station, Putney30003351.46071722-0.216526155truefalse1384004640000false12820695Islington Green, Angel30003151.53638435-0.102757578truefalse1384172820000false13821696Charing Cross Hospital, Hammersmith30001851.48728535-0.217995921truefalse1384180020000false11921697Charlotte Terrace, Angel20012951.53639219-0.112721065truefalse1384251120000false101525698Shoreditch Court, Haggerston20012151.53908372-0.070329419truefalse1384254300000false201435699Belford House, Haggerston20005751.5366541-0.07023031truefalse1384256040000false83139700Battersea Church Road, Battersea20020151.47696496-0.174347066truefalse1384343280000false111425701Vicarage Crescent, Battersea20007751.47287627-0.176267008truefalse1384345080000false191030702Durant Street, Bethnal Green20021351.52868155-0.065550321truefalse1384345860000false121224703St. Bride Street, Holborn20009451.51505991-0.10534448truefalse1384357800000false81525704Mexfield Road, East Putney20006351.45682071-0.202802098truefalse1384443480000false31518705Upper Richmond Road, Putney30004251.45971528-0.212145939truefalse13844530200001539845700000true18725706Snowsfields, London Bridge20019351.50215353-0.083632928truefalse1384420920000false102131707Barons Court Station, West Kensington20019751.49021762-0.215087092truefalse1384435680000false23832708Disraeli Road, Putney20021751.46161068-0.21614583truefalse1384530180000false32133709Montserrat Road , Putney20020551.46321128-0.215550761truefalse1384510140000false22123710Albert Bridge Road, Battersea Park30004551.47439218-0.163347594truefalse1384520580000false11920711Everington Street, Fulham30002851.48335692-0.216305546truefalse1384791540000false171431712Mile End Stadium, Mile End30005651.51854104-0.034903714truefalse1384797120000false13922713Hawley Crescent, Camden Town20012251.54100708-0.14326094truefalse1384774620000false31922714Stewart's Road, Wandsworth Road30005551.47311696-0.137235175truefalse1384865400000false32528715Aylward Street, Stepney30004951.51563007-0.049067243truefalse1384868460000false111122716Stainsby Road , Poplar30004851.51542791-0.02356501truefalse1384873500000false131024717Dunston Road , Haggerston30002451.53658514-0.075885686truefalse1384952400000false202343718Ada Street, Hackney Central30004051.53571683-0.060291813truefalse1384962840000false222345719Victoria Park Road, Hackney Central30001151.53642464-0.054162264truefalse1384968480000false151834720Star Road, West Kensington30003851.48724429-0.205279052truefalse1385025840000false20023721Wendon Street, Old Ford30003951.53603947-0.026262677truefalse1385028480000false71018722Finnis Street, Bethnal Green30004151.52458353-0.058631453truefalse1385028600000false13619723Stephendale Road, Sands End30005351.46822047-0.190346493truefalse1385035380000false182848724Alma Road, Wandsworth30004651.45799126-0.184806157truefalse1385125380000false20828725Walworth Square, Walworth30005051.491327-0.096518684truefalse1563352500000false16724726Alfreda Street, Battersea Park30004751.47505096-0.150908371truefalse1385128740000false111122727Chesilton Road, Fulham30005451.47569809-0.20587627truefalse1385132160000false16623728Putney Bridge Road, East Putney30004451.46199911-0.206240805truefalse1385466780000false52329729St. Peter's Terrace, Fulham30004351.47893931-0.208485293truefalse1385391300000false91324730Bridge Avenue, Hammersmith30008251.49208492-0.229116862truefalse1385132580000false14018731Michael Road, Walham Green30009551.47727637-0.189210466truefalse1385394720000false132337732Duke Street Hill, London Bridge30008351.50630441-0.087262995truefalse1385458020000false12721733Park Lane, Mayfair30009351.50542628-0.150817316truefalse1385460840000false14418734Plough Terrace, Clapham Junction30009451.46230566-0.175407201truefalse1385464500000false72431735Grant Road East, Clapham Junction20012051.46489445-0.17302926truefalse1385383080000false111728736Queensdale Road, Shepherd's Bush30008851.50659035-0.216104479truefalse1385472900000false91928737Fulham Broadway, Walham Green30008651.47993289-0.19411695truefalse1385554620000false20426738Imperial Road, Sands End30008751.47514228-0.187278987truefalse1385563380000false142237739Hortensia Road, West Brompton30009151.48176572-0.185273723truefalse1385631000000false26028740Sirdar Road, Avondale30008451.51092871-0.214594781truefalse1385635440000false42226741Freston Road, Avondale30008551.5129814-0.219486603truefalse1385640120000false22123742Blenheim Crescent, Ladbroke Grove30009051.51510818-0.208565479truefalse1385649540000false14522743Oxford Road, Putney30007851.46079243-0.212607684truefalse1385723700000false101929744Ingrave Street, Clapham Junction30007751.46745485-0.172293499truefalse1385729760000false111930745Upcerne Road, West Chelsea30007551.47816972-0.18243547truefalse1385740020000false52429746Lots Road, West Chelsea30007651.4795738-0.17903854truefalse1385985720000false111024747Ormonde Gate, Chelsea30008951.48796408-0.161765173truefalse1385997240000false61524748Hertford Road, De Beauvoir Town30009251.53727795-0.079201849truefalse1386159900000false14925749Haggerston Road, Haggerston30008151.53932857-0.074284675truefalse1386172440000false211637750Culvert Road, Battersea30008051.4710956-0.157850096truefalse1386240360000false131427751Newton Street, Covent Garden30007451.51612862-0.120909408truefalse1386250800000false81524754Grenfell Road, Avondale30006751.5129006-0.214762686truefalse1389003540000false32124755The Vale, Chelsea30005851.48512191-0.174971902truefalse1389008580000false17524756Prince of Wales Drive, Battersea Park30007351.47515398-0.159169801truefalse1390223040000false61421757Harcourt Terrace, West Brompton30006951.48795853-0.187404506truefalse1389094260000false14824758Westbourne Park Road, Portobello30005751.51787005-0.201005397truefalse1389178020000false12923759Broadley Terrace, Marylebone30007251.52456169-0.165668686truefalse1389627480000false31518760Rossmore Road, Marylebone30007151.52526975-0.163795009truefalse1390310760000false12618761Humbolt Road, Fulham30006851.48321729-0.211860644truefalse1389781800000false141226762Storey's Gate, Westminster20020251.50070305-0.129698963truefalse1392039000000false14521763Mile End Park Leisure Centre, Mile End30002751.52059714-0.032566533truefalse1392043020000false341247764St. John's Road, Clapham Junction20018551.46239255-0.16829214truefalse1392633480000false29433765Ranelagh Gardens, Fulham30006451.46760141-0.20682737truefalse1392986940000false231539766Ram Street, Wandsworth20007951.45752945-0.192165613truefalse1392894840000false101525767Santos Road, Wandsworth20017751.45705988-0.200806304truefalse1393406280000false141630768Clapham Common North Side, Clapham Common30006551.46134382-0.159322467truefalse1393494060000false23437769Sandilands Road, Walham Green30000151.473611-0.191803truefalse1393939560000false71421770Gwendwr Road, West Kensington30009751.491026-0.209121truefalse1394099280000false151530771Rifle Place, Avondale30000751.509224-0.216016truefalse1394018400000false91121772Binfield Road, Stockwell30001551.47250956-0.122831913truefalse1396442100000false13235773Tallis Street, Temple30009651.511891-0.107349truefalse1396262520000false51924774Hurlingham Park, Parsons Green30009851.470131-0.20464truefalse1396265880000false11720775Little Brook Green, Brook Green30010151.496664-0.223868truefalse1396270320000false201233776Abyssinia Close, Clapham Junction30009951.460333-0.167029truefalse1396273320000false51520777Limburg Road, Clapham Junction30010051.4619230679-0.165297856693truefalse1406282940000false16521779Houndsditch, Aldgate20007251.514449-0.077178979truefalse1435313700000false22628780Imperial Wharf Station, Sands End30007051.474665-0.18316517truefalse1439455200000false21325781Victoria & Albert Museum, South Kensington30003251.495898-0.173009truefalse1446485340000false12930782Halford Road, West Kensington30021051.483911-0.19760944truefalse1446485820000false71724783Monier Road, Hackney Wick30021351.5403115-0.021630359truefalse1448529660000false91627784East Village, Queen Elizabeth Olympic Park30020051.546326-0.00993526truefalse1452789240000false25634785Aquatic Centre, Queen Elizabeth Olympic Park30023351.54094-0.010510565truefalse1451908440000false371064786Lee Valley VeloPark, Queen Elizabeth Olympic Park30002951.549369-0.015717614truefalse1451918160000false231944787Timber Lodge, Queen Elizabeth Olympic Park30022751.546805-0.01469126truefalse1451900700000false23835789Podium, Queen Elizabeth Olympic Park30002151.538718-0.011889482truefalse1452507000000false211140790Stratford Station, Stratford30023451.541793-0.00481truefalse1452687420000false101728792Blackfriars Road, Southwark30021451.505461-0.10454093truefalse1454926380000false43742793Cromer Street, Bloomsbury30020551.528279-0.11955857truefalse1459424760000false131328795Euston Square Gardens, Euston30020351.527068-0.13186102truefalse1456744740000false12930796Coram Street, Bloomsbury30020151.524-0.12640984truefalse1456746420000false82129797Ossulston Street, Somers Town30021151.5293-0.12827903truefalse1456839540000false52430798Birkenhead Street, King's Cross30021251.5301998755-0.122299440803truefalse1464787980000false72027799Kings Gate House, Westminster30020251.4976984561-0.137598896295truefalse1464876480000false91424800Sopwith Way, Battersea Park30024851.4811219398-0.149035374873truefalse1457107140000false28230801Lavington Street, Bankside30020851.5052241745-0.0980318118664truefalse1458824640000false101929802Albert Square, Stockwell30020951.4765900593-0.118256789081truefalse1464865500000false13132803Southwark Street, Bankside30023851.5054099403-0.0983410884509truefalse1464787860000false32023804Good's Way, King's Cross30024351.5346677396-0.125078652873truefalse1459410960000false52227806Handyside Street, King's Cross30024151.5372405623-0.124807385707truefalse1472723460000false42327807Bevington Road West, North Kensington30023651.5212-0.20888818truefalse1466715600000false13924809Lincoln's Inn Fields, Holborn30024051.5162778834-0.118272991635truefalse1467640800000false52228810Tate Modern, Bankside30023751.5067252868-0.0988072461627truefalse1464943200000false92130811Westferry Circus, Canary Wharf30022851.5057030357-0.0277727426235truefalse1469538960000false22536812Here East North, Queen Elizabeth Olympic Park30021751.5487311915-0.0226065549321truefalse1469005200000false23428813New Spring Gardens Walk, Vauxhall30022451.4878074485-0.122759625866truefalse1467627120000false162137814Clapham Road, Lingham Street, Stockwell30024551.4714330677-0.123670735702truefalse1464870060000false72230815Lambeth Palace Road, Waterloo30023151.5000891978-0.116628700672truefalse1462357680000false231135816Here East South, Queen Elizabeth Olympic Park30021951.5465327935-0.0205975904647truefalse1489065360000false131428817Riverlight South, Nine Elms30023251.4813354746-0.138212295869truefalse1464949140000false121326818Westminster Pier, Westminster30024951.501513-0.12382322truefalse1563958740000false22027819Belvedere Road 2, South Bank30024651.50621-0.114842truefalse1476360120000false122638820Victory Place, Walworth30023951.492807-0.091938truefalse1481807940000false15824821Battersea Power Station, Battersea Park30022151.4835074867-0.147714557371truefalse1487335920000false111427826Allington Street, Victoria30024251.496863-0.1429434truefalse1500554880000false22628827Cranmer Road, Stockwell30024751.479601-0.11147178truefalse1517788800000false41024828Normandy Road, Stockwell30022551.473874-0.11258096truefalse1517788800000false13132829Wynne Road, Stockwell30023051.469217-0.11268674truefalse1517443200000false16825830Sidney Road, Stockwell30022951.469202-0.11902256truefalse1517961600000false17927831St John's Crescent, Brixton30021551.466232-0.11317995truefalse1517961600000false17725832Ferndale Road, Brixton20024051.464019-0.11578197truefalse1517961600000false82130833Saltoun Road, Brixton30020651.460232-0.11537509truefalse1517875200000false201342834Gas Holders, Battersea Park30021651.477966-0.14785703truefalse1529449200000false15926835Farringdon Street, Holborn30022051.516785-0.10494775truefalsefalse151025836York Way, Kings Cross30023551.541596-0.12544145truefalsefalse12324838Fore Street Avenue, Guildhall30022251.518093-0.0914017truefalse1539254700000false32225839Sea Containers, South Bank20014451.508033-0.10682363truefalse1544611140000false22830 \ No newline at end of file diff --git a/examples/trusted_information_retrieval/module/rust/Cargo.toml b/examples/trusted_information_retrieval/module/rust/Cargo.toml new file mode 100644 index 00000000000..91cf0500737 --- /dev/null +++ b/examples/trusted_information_retrieval/module/rust/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "trusted_information_retrieval" +version = "0.1.0" +authors = ["Ivan Petrov "] +edition = "2018" +license = "Apache-2.0" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +itertools = "*" +log = "*" +oak = "=0.1.0" +oak_abi = "=0.1.0" +prost = "*" +serde = "*" +quick-xml = { version = "*", features = ["serialize"] } + +[dev-dependencies] +assert_matches = "*" +oak_abi = "=0.1.0" +oak_runtime = "=0.1.0" +oak_tests = "=0.1.0" +maplit = "*" +simple_logger = "*" + +[build-dependencies] +oak_utils = "*" diff --git a/examples/trusted_information_retrieval/module/rust/build.rs b/examples/trusted_information_retrieval/module/rust/build.rs new file mode 100644 index 00000000000..ec11c3556e8 --- /dev/null +++ b/examples/trusted_information_retrieval/module/rust/build.rs @@ -0,0 +1,22 @@ +// +// Copyright 2020 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +fn main() { + oak_utils::compile_protos( + &["../../proto/trusted_information_retrieval.proto"], + &["../../proto"], + ); +} diff --git a/examples/trusted_information_retrieval/module/rust/src/database.rs b/examples/trusted_information_retrieval/module/rust/src/database.rs new file mode 100644 index 00000000000..3e5bad8be15 --- /dev/null +++ b/examples/trusted_information_retrieval/module/rust/src/database.rs @@ -0,0 +1,110 @@ +// +// Copyright 2020 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +use crate::proto::{Location, PointOfInterest}; +use log::{debug, error}; +use oak::OakError; +use oak_abi::proto::oak::application::ConfigMap; +use quick_xml::de::from_str; +use serde::Deserialize; + +/// Database structure represents internal XML fields from the following database: +/// https://tfl.gov.uk/tfl/syndication/feeds/cycle-hire/livecyclehireupdates.xml +#[derive(Debug, Deserialize, PartialEq)] +struct Database { + #[serde(rename = "lastUpdate", default)] + last_update: String, + version: String, + #[serde(rename = "station", default)] + stations: Vec, +} + +#[derive(Debug, Deserialize, PartialEq)] +struct Station { + id: u32, + name: String, + #[serde(rename = "terminalName", default)] + terminal_name: String, + #[serde(rename = "lat", default)] + latitude_degrees: f32, + #[serde(rename = "long", default)] + longitude_degrees: f32, + installed: bool, + locked: bool, + #[serde(rename = "installDate", default)] + install_date: String, + #[serde(rename = "removalDate", default)] + removal_date: String, + temporary: bool, + #[serde(rename = "nbBikes", default)] + number_of_bikes: u32, + #[serde(rename = "nbEmptyDocks", default)] + number_of_empty_docks: u32, + #[serde(rename = "nbDocks", default)] + number_of_docks: u32, +} + +/// Load an XML database from [`oak::ReadHandle`] and parse it. +pub fn load_database(in_channel: oak::ReadHandle) -> Result, OakError> { + debug!("Loading database"); + let receiver = oak::io::Receiver::new(in_channel); + let config_map: ConfigMap = receiver.receive()?; + match config_map.items.get("database") { + Some(xml_database) => { + let points_of_interest = parse_database(xml_database).map_err(|error| { + error!("Couldn't parse database: {:?}", error); + OakError::OakStatus(oak_abi::OakStatus::ErrInvalidArgs) + })?; + debug!("Database loaded - size: {:?}", points_of_interest.len()); + Ok(points_of_interest) + } + None => { + error!("`database` configuration argument is not specified"); + Err(OakError::OakStatus(oak_abi::OakStatus::ErrInvalidArgs)) + } + } +} + +/// Parse an XML database into a vector of [`PointOfInterest`]. +pub fn parse_database(xml_database: &[u8]) -> Result, OakError> { + let database: Database = from_str( + String::from_utf8(xml_database.to_vec()) + .map_err(|error| { + error!("Couldn't convert vector to string: {:?}", error); + OakError::OakStatus(oak_abi::OakStatus::ErrInvalidArgs) + })? + .as_ref(), + ) + .map_err(|error| { + error!("Couldn't parse XML data: {:?}", error); + OakError::OakStatus(oak_abi::OakStatus::ErrInvalidArgs) + })?; + + let points_of_interest = database + .stations + .iter() + // Filter out uninstalled, closed and removed stations, and stations with no bikes. + .filter(|station| station.installed && !station.locked && station.removal_date.is_empty() && station.number_of_bikes > 0) + .map(|station| PointOfInterest { + name: station.name.to_string(), + location: Some(Location { + latitude: station.latitude_degrees, + longitude: station.longitude_degrees, + }), + }) + .collect(); + Ok(points_of_interest) +} diff --git a/examples/trusted_information_retrieval/module/rust/src/lib.rs b/examples/trusted_information_retrieval/module/rust/src/lib.rs new file mode 100644 index 00000000000..e11fb021eac --- /dev/null +++ b/examples/trusted_information_retrieval/module/rust/src/lib.rs @@ -0,0 +1,138 @@ +// +// Copyright 2020 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +//! Private Information Retrieval example for Project Oak. +//! +//! This shows how an Oak Node can host an in-memory database and process private queries from +//! clients. +//! +//! Current example implementation uses a list of Santander Cycles in London as test database: +//! https://tfl.gov.uk/tfl/syndication/feeds/cycle-hire/livecyclehireupdates.xml +//! +//! Clients send their location coordinates (latitude and longitude) and the Oak Node returns the +//! location of the closest Point Of Interest (in our case a bike station). + +mod proto { + include!(concat!( + env!("OUT_DIR"), + "/oak.examples.trusted_information_retrieval.rs" + )); +} + +mod database; +#[cfg(test)] +mod tests; + +use database::load_database; +use log::{debug, error}; +use oak::grpc; +use proto::{ + ListPointsOfInterestResponse, ListPointsOfInterestRequest, Location, PointOfInterest, + TrustedInformationRetrieval, TrustedInformationRetrievalDispatcher, +}; + +/// Oak Node that contains an in-memory database of Points Of Interest. +pub struct TrustedInformationRetrievalNode { + points_of_interest: Vec, +} + +impl TrustedInformationRetrievalNode { + /// Returns a distance (in kilometers) between two locations using the Haversine formula (ignoring + /// height variations): + /// https://en.wikipedia.org/wiki/Haversine_formula + fn distance(first: Location, second: Location) -> f32 { + let first_latitude_radians = first.latitude.to_radians(); + let second_latitude_radians = second.latitude.to_radians(); + + let latitude_difference_radians = (first.latitude - second.latitude).to_radians(); + let longitude_difference_radians = (first.longitude - second.longitude).to_radians(); + + let central_angle = 2.0 * ( + (latitude_difference_radians / 2.0).sin().powi(2) + + ( + first_latitude_radians.cos() * + second_latitude_radians.cos() * + (longitude_difference_radians / 2.0).sin().powi(2) + ) + ).sqrt().asin(); + + // Earth radius in kilometers. + let earth_radius = 6371.0_f32; + + // Compute distance. + earth_radius * central_angle + } +} + +/// A gRPC service implementation for the Private Information Retrieval example. +impl TrustedInformationRetrieval for TrustedInformationRetrievalNode { + /// Find the nearest Point Of Interest based on linear search in the database. + fn list_points_of_interest( + &mut self, + request: ListPointsOfInterestRequest, + ) -> grpc::Result { + debug!("Received request: {:?}", request); + let location = request.location.ok_or_else(|| { + let err = "Location is not specified".to_string(); + error!("Bad request: {:?}", err); + grpc::build_status(grpc::Code::InvalidArgument, &err) + })?; + let nearest_point = self.points_of_interest.iter().fold( + (None, f32::MAX), + |(closest_point, min_distance), point| { + let point_location = point.location.clone().expect("Non-existing location"); + let distance = Self::distance(location.clone(), point_location); + if distance < min_distance { + (Some(point.clone()), distance) + } else { + (closest_point, min_distance) + } + }, + ); + match nearest_point.0 { + Some(point) => { + debug!("Found the nearest Point Of Interest: {:?}", point); + Ok(ListPointsOfInterestResponse { + point_of_interest: Some(point), + }) + } + None => { + let err = "Empty database".to_string(); + error!("Couldn't find the nearest Point Of Interest: {:?}", err); + Err(grpc::build_status(grpc::Code::InvalidArgument, &err)) + } + } + } +} + +oak::entrypoint!(oak_main => |in_channel| { + oak::logger::init_default(); + let points_of_interest = load_database(in_channel).expect("Couldn't load database"); + let dispatcher = TrustedInformationRetrievalDispatcher::new(TrustedInformationRetrievalNode { + points_of_interest, + }); + oak::run_event_loop(dispatcher, in_channel); +}); + +oak::entrypoint!(grpc_oak_main => |in_channel| { + oak::logger::init_default(); + let points_of_interest = load_database(in_channel).expect("Couldn't load database"); + let dispatcher = TrustedInformationRetrievalDispatcher::new(TrustedInformationRetrievalNode { + points_of_interest, + }); + let grpc_channel = oak::grpc::server::init("[::]:8080").expect("could not create gRPC server pseudo-Node"); + oak::run_event_loop(dispatcher, grpc_channel); +}); diff --git a/examples/trusted_information_retrieval/module/rust/src/tests.rs b/examples/trusted_information_retrieval/module/rust/src/tests.rs new file mode 100644 index 00000000000..fc73fd2763b --- /dev/null +++ b/examples/trusted_information_retrieval/module/rust/src/tests.rs @@ -0,0 +1,208 @@ +// +// Copyright 2020 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +use crate::{ + database::parse_database, + proto::{ListPointsOfInterestResponse, ListPointsOfInterestRequest, Location, PointOfInterest}, + TrustedInformationRetrievalNode, +}; +use assert_matches::assert_matches; +use maplit::hashmap; +use oak::grpc; +use oak_abi::{proto::oak::application::ConfigMap, OakStatus}; +use oak_runtime::io::Encodable; + +const MODULE_CONFIG_NAME: &str = "trusted_information_retrieval"; + +const XML_DATABASE: &str = +r#" + + 1 + Uninstalled station + 1 + -10.0 + -10.0 + false + false + + + false + 1 + 1 + 1 + + + 2 + Locked station + 2 + 0.0 + -10.0 + true + true + 0 + + false + 1 + 1 + 1 + + + 3 + Opened station 1 + 3 + 0.0 + 0.0 + true + false + 0 + + false + 1 + 1 + 1 + + + 4 + Opened station 2 + 4 + 10.0 + 0.0 + true + false + 0 + + false + 1 + 1 + 1 + +"#; + +fn send_database( + runtime: &oak_runtime::RuntimeProxy, + entry_handle: oak_abi::Handle, + database: Vec, +) -> Result<(), OakStatus> { + let config_map = ConfigMap { + items: hashmap! {"database".to_string() => database}, + }; + runtime.channel_write(entry_handle, config_map.encode()?) +} + +fn submit_sample( + runtime: &oak_runtime::RuntimeProxy, + entry_handle: oak_abi::Handle, + latitude: f32, + longitude: f32, +) -> grpc::Result { + let req = ListPointsOfInterestRequest { + location: Some(Location { + latitude, + longitude, + }), + }; + oak_tests::grpc_request( + &runtime, + entry_handle, + "/oak.examples.trusted_information_retrieval.TrustedInformationRetrieval/ListPointsOfInterest", + &req, + ) +} + +#[test] +fn test_parse_database() { + let database = parse_database(&XML_DATABASE.as_bytes().to_vec()); + assert_matches!(database, Ok(_)); + // Check that locked and uninstalled stations are filtered out. + assert_eq!(database.unwrap().len(), 2); +} + +#[test] +fn test_trusted_information_retrieval() { + simple_logger::init_by_env(); + + let (runtime, entry_handle) = oak_tests::run_single_module_default(MODULE_CONFIG_NAME) + .expect("Unable to configure runtime with test wasm!"); + + // Send test database. + assert_matches!( + send_database(&runtime, entry_handle, XML_DATABASE.as_bytes().to_vec(),), + Ok(_) + ); + + // Test nearest point of interest + assert_eq!( + submit_sample(&runtime, entry_handle, 4.0, -10.0,), + Ok(ListPointsOfInterestResponse { + point_of_interest: Some(PointOfInterest { + name: "Opened station 1".to_string(), + location: Some(Location { + latitude: 0.0, + longitude: 0.0, + }), + }), + }), + ); + assert_eq!( + submit_sample(&runtime, entry_handle, 9.0, -10.0,), + Ok(ListPointsOfInterestResponse { + point_of_interest: Some(PointOfInterest { + name: "Opened station 2".to_string(), + location: Some(Location { + latitude: 10.0, + longitude: 0.0, + }), + }), + }), + ); +} + +fn distance(first: (f32, f32), second: (f32, f32)) -> f32 { + TrustedInformationRetrievalNode::distance( + Location { + latitude: first.0, + longitude: first.1, + }, + Location { + latitude: second.0, + longitude: second.1, + }, + ) +} + +#[test] +fn test_distance() { + assert_eq!( + distance((0.0, 0.0), (0.0, 0.0)), + 0.0, + ); + assert_eq!( + distance((0.0, 0.0), (10.0, 10.0)), + 1568.5204, + ); + assert_eq!( + distance((10.0, 10.0), (-10.0, -10.0)), + 3137.0413, + ); + assert_eq!( + distance((0.0, 0.0), (0.0, 180.0)), + 20015.088, + ); + assert_eq!( + distance((90.0, 0.0), (-90.0, 180.0)), + 20015.088, + ); +} diff --git a/examples/trusted_information_retrieval/proto/BUILD b/examples/trusted_information_retrieval/proto/BUILD new file mode 100644 index 00000000000..c9517dc1f00 --- /dev/null +++ b/examples/trusted_information_retrieval/proto/BUILD @@ -0,0 +1,46 @@ +# +# Copyright 2020 The Project Oak Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +load("@rules_cc//cc:defs.bzl", "cc_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") +load( + "@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", + "cc_grpc_library", +) + +package( + default_visibility = ["//visibility:public"], + licenses = ["notice"], +) + +proto_library( + name = "trusted_information_retrieval_proto", + srcs = ["trusted_information_retrieval.proto"], + deps = ["@com_google_protobuf//:empty_proto"], +) + +cc_proto_library( + name = "trusted_information_retrieval_cc_proto", + deps = [":trusted_information_retrieval_proto"], +) + +cc_grpc_library( + name = "trusted_information_retrieval_cc_grpc", + srcs = [":trusted_information_retrieval_proto"], + grpc_only = True, + well_known_protos = True, + deps = [":trusted_information_retrieval_cc_proto"], +) diff --git a/examples/trusted_information_retrieval/proto/trusted_information_retrieval.proto b/examples/trusted_information_retrieval/proto/trusted_information_retrieval.proto new file mode 100644 index 00000000000..5e03d8077c7 --- /dev/null +++ b/examples/trusted_information_retrieval/proto/trusted_information_retrieval.proto @@ -0,0 +1,44 @@ +// +// Copyright 2020 The Project Oak Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package oak.examples.trusted_information_retrieval; + +import "google/protobuf/empty.proto"; + +message Location { + float latitude = 1; + float longitude = 2; +} + +message PointOfInterest { + string name = 1; + Location location = 2; +} + +message ListPointsOfInterestRequest { + Location location = 1; +} + +message ListPointsOfInterestResponse { + PointOfInterest point_of_interest = 2; +} + +service TrustedInformationRetrieval { + // Find the nearest Point Of Interest based on linear search in the database. + rpc ListPointsOfInterest(ListPointsOfInterestRequest) returns (ListPointsOfInterestResponse); +} diff --git a/examples/trusted_information_retrieval/server/BUILD b/examples/trusted_information_retrieval/server/BUILD new file mode 100644 index 00000000000..c27cd626c0e --- /dev/null +++ b/examples/trusted_information_retrieval/server/BUILD @@ -0,0 +1,29 @@ +# +# Copyright 2020 The Project Oak Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +load("//oak/server/loader:oak_docker.bzl", "oak_docker") + +package( + licenses = ["notice"], +) + +oak_docker( + name = "trusted_information_retrieval_image", + application = "//examples/trusted_information_retrieval/config:config", + ports = [ + "8080/tcp", # Oak Application gRPC port. + ], +) diff --git a/oak/server/rust/oak_loader/src/main.rs b/oak/server/rust/oak_loader/src/main.rs index e734c046b38..95027a74e80 100644 --- a/oak/server/rust/oak_loader/src/main.rs +++ b/oak/server/rust/oak_loader/src/main.rs @@ -29,8 +29,13 @@ use anyhow::anyhow; use core::str::FromStr; use log::{debug, info}; -use oak_abi::proto::oak::application::{ApplicationConfiguration, ConfigMap}; -use oak_runtime::{auth::oidc_utils::parse_client_info_json, config::configure_and_run}; +use oak_abi::{ + proto::oak::application::{ApplicationConfiguration, ConfigMap}, + Handle, +}; +use oak_runtime::{ + auth::oidc_utils::parse_client_info_json, config::configure_and_run, io::Sender, RuntimeProxy, +}; use prost::Message; use rustls::internal::pemfile; use std::{ @@ -139,6 +144,21 @@ pub fn parse_config_map(config_entries: &[ConfigEntry]) -> anyhow::Result anyhow::Result<()> { + let sender = Sender::new(handle); + sender.send(config_map, runtime).map_err(|status| { + anyhow!( + "could not send configuration map to the initial Node: {:?}", + status + ) + }) +} + /// Load a PEM encoded TLS certificate, performing (minimal) validation. fn load_certificate(certificate: &str) -> anyhow::Result { let mut cursor = std::io::Cursor::new(certificate); @@ -219,6 +239,8 @@ fn main() -> anyhow::Result<()> { runtime.node_id, initial_handle ); + send_config_map(config_map, &runtime, initial_handle)?; + let done = Arc::new(AtomicBool::new(false)); signal_hook::flag::register(signal_hook::SIGINT, Arc::clone(&done))?; diff --git a/scripts/run_examples b/scripts/run_examples index 6b1104c3fa6..8e8ff7d74a5 100755 --- a/scripts/run_examples +++ b/scripts/run_examples @@ -41,6 +41,8 @@ for language in ${languages}; do for example in ${examples}; do if [[ "${example}" == "chat" ]]; then "${SCRIPTS_DIR}/run_example" -s "${server}" -l "${language}" -e chat -- --test + elif [[ "${example}" == "trusted_information_retrieval" ]]; then + "${SCRIPTS_DIR}/run_example" -s "${server}" -l "${language}" -e trusted_information_retrieval -- --location 0.0,0.0 else "${SCRIPTS_DIR}/run_example" -s "${server}" -l "${language}" -e "${example}" fi diff --git a/scripts/run_server b/scripts/run_server index 95a801ac8ca..c593e68e882 100755 --- a/scripts/run_server +++ b/scripts/run_server @@ -50,6 +50,16 @@ Either the -a APPLICATION or the -e EXAMPLE option is required. esac done +declare -a additional_args +additional_args+=( + "--grpc-tls-private-key=${SCRIPTS_DIR}/../examples/certs/local/local.key" + "--grpc-tls-certificate=${SCRIPTS_DIR}/../examples/certs/local/local.pem" + "--root-tls-certificate=${SCRIPTS_DIR}/../examples/certs/local/ca.pem" +) +if [[ -n "${OIDC_CLIENT+x}" ]]; then + additional_args+=("--oidc-client=${OIDC_CLIENT}") +fi + if [[ -n ${EXAMPLE+x} ]]; then # Determine expected configuration file from example name and language variant. case "${language}" in @@ -66,16 +76,12 @@ if [[ -n ${EXAMPLE+x} ]]; then echo "Invalid example variant: ${language}" exit 1;; esac -fi -declare -a ADDITIONAL_ARGS -ADDITIONAL_ARGS+=( - "--grpc-tls-private-key=${SCRIPTS_DIR}/../examples/certs/local/local.key" - "--grpc-tls-certificate=${SCRIPTS_DIR}/../examples/certs/local/local.pem" - "--root-tls-certificate=${SCRIPTS_DIR}/../examples/certs/local/ca.pem" -) -if [[ -n "${OIDC_CLIENT+x}" ]]; then - readonly ADDITIONAL_ARGS+=("--oidc-client=${OIDC_CLIENT}") + if [[ "${EXAMPLE}" == "trusted_information_retrieval" ]]; then + additional_args+=( + "--config-files=database=./examples/trusted_information_retrieval/database.xml" + ) + fi fi if [[ -z "${APPLICATION+z}" ]]; then @@ -89,4 +95,4 @@ fi # `exec` is necessary for the `run_example` script to be able to get a PID of a background server. exec cargo run "${cargo_build_flags[@]}" --package=oak_loader -- \ --application="${APPLICATION}" \ - "${ADDITIONAL_ARGS[@]}" + "${additional_args[@]}"