founded! Acquired by Delivery Hero One of Europe’s biggest start-ups! Dec 2016 Dec 2016 Introduced 24/7 delivery islandwide in Singapore! Nov 2017 foodpanda rebranded from orange to Pink Our History Singapore Bangladesh Hong Kong Taiwan Thailand Myanmar Philippines Pakistan Malaysia Cambodia Laos Jan 2020 We launched pandamart!
founded! Acquired by Delivery Hero One of Europe’s biggest start-ups! Dec 2016 Dec 2016 Introduced 24/7 delivery islandwide in Singapore! Nov 2017 foodpanda rebranded from orange to Pink Our History Singapore Bangladesh Hong Kong Taiwan Thailand Myanmar Philippines Pakistan Malaysia Cambodia Laos Jan 2020 We launched pandamart! Launched in PH 6 years ago...
Delivery Areas campaign1 restaurant1 restaurant2 restaurant3 delivery_area1a x delivery_area1b x delivery_area1c x delivery_area2a x delivery_area2b x delivery_area2c x delivery_area3a x delivery_area3b x delivery_area3c ✓ Is user location inside delivery area? found
2 1,252.3km x 624.1km 3 156.5km x 156km 4 39.1km x 19.5km 5 4.9km x 4.9km 6 1.2km x 609.4m 7 152.9m x 152.4m 8 38.2m x 19m http://geohash.gofreerange.com/
sends a request (with customer’s geo coordinates) to get the list of campaigns from Campaign API. 3. In Campaign API: a. Convert the customer’s geo coordinates to geohash with precision=5 to match the encoded geohashes of the delivery areas b. Get the list of campaigns c. For each campaign, query the database to check if the campaignID:customerGeohash exists. If yes, we can show the campaign to the user. d. Send back the list of visible campaigns to the frontend. 4. Customer sees the carousel Only 1 query to database per campaign campaignID:customerGeohash == campaignID:restaurantGeohash customerGeohash and restaurantGeohash should have the same precision
campaign4:cdefg campaign1:w21zs ✓ campaign1 campaign2 campaign3 campaign4 + :w21zs = campaign2:w21zs X campaign3:w21zs X campaign4:w21zs X Result: Show campaign1 to the user Key begins_with Query DynamoDB Sort Key index Parallelize Cache the list Do not unmarshal results.Items result.Count >= 1 https://github.com/dgraph-io/ristretto
are fetching List of Maps, unmarshaling consumers significant amount of memory Campaign.Vendors with type []Vendor Vendor.DeliveryAreas with type []DeliveryArea DeliveryArea.Coordinates with type []Coordinate Solution: exclude the field by projection if you don’t need it If you need, consider optimising the encoding by using a comma-separated string type instead of a list type Final pointers