{"id":5249,"date":"2019-11-14T08:38:14","date_gmt":"2019-11-14T08:38:14","guid":{"rendered":"https:\/\/www.discoverpassenger.com\/?p=5249"},"modified":"2022-02-04T15:29:11","modified_gmt":"2022-02-04T15:29:11","slug":"aws-batch-journey-planner","status":"publish","type":"post","link":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/","title":{"rendered":"Better, faster, stronger &#8211; Latest journey planner updates"},"content":{"rendered":"<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">Passenger\u2019s journey planner functionality is one of the most frequently used features of the Passenger ecosystem. <\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">Using the journey planner, customers select the desired destination by entering an address if known, or by simply dropping a pin on a map. Passenger then calculates the fastest and most convenient way to arrive at that destination using an operator\u2019s services. The customer then follows the step-by-step instructions provided by the app or website to get where they need to be.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">We\u2019ve had plenty of feedback from customers expressing their satisfaction with the journey planner, but that doesn\u2019t mean it\u2019s time to rest on our laurels. In fact, we\u2019ve recently made some changes to improve this process on the server-side using <a href=\"https:\/\/aws.amazon.com\/batch\/\">Amazon Web Services (AWS) Batch<\/a>, thus making Passenger and its journey planner more resilient as we onboard new operators with large operating areas.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\"><strong>Making Journey Planner scalable<\/strong><\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">Passenger uses <a href=\"https:\/\/www.openstreetmap.org\/\">OpenStreetMap (OSM)<\/a> as some of its inputs for search and journey planning.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">To supply correct and up to date journey planning information to customers on a daily basis, our servers read the whole of the <a href=\"https:\/\/www.openstreetmap.org\/relation\/62149\">United Kingdom OSM data<\/a> (over 1GB) every morning. They slice this data by operator boundary and then store the information, using it to update search and build new datasets. Each server requires a large number of resources (many GBs of RAM + CPUs) to handle the countless journey requests made every day, not to mention the daily OSM import and operators importing new datasets.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">During the build of our NaPTAN improvement project <a href=\"https:\/\/www.discoverpassenger.com\/2018\/10\/29\/introducing-bus-stop-checker-initiative-improve-open-data-national-public-transport\/\">Bus Stop Checker<\/a> we also download and process the same OSM data. We decided to use this project as an opportunity to try out a new approach to our daily journey planning tasks: using AWS Batch. This process produced such solid results that we chose to implement it for journey planning too.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\"><strong>Using AWS Batch for journey planning<\/strong><\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">AWS Batch is a system that allows users to run hundreds of thousands of batch computing jobs (the automated running of multiple programs) on AWS\u2019s cloud infrastructure.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">The new process for Passenger journey planning uses application and infrastructure monitoring service <a href=\"https:\/\/aws.amazon.com\/cloudwatch\/\">AWS CloudWatch<\/a> to create a cron task (a time-based job schedule) which triggers every morning. <\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">This task starts an AWS Batch job, which spins up an EC2 instance (Amazon Elastic Compute Virtual Machine) with less RAM and CPU than we previously required for the process. The EC2 instance pulls in a purpose-built, Alpine-based <a href=\"https:\/\/www.discoverpassenger.com\/2018\/12\/18\/doing-our-bit-for-the-development-environment-docker-at-base\/\">Docker container<\/a>, which performs the daily OSM import.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">Whenever an operator imports a new dataset, our servers trigger another AWS Batch build (using another purpose-built Alpine container) which compiles the routing graph based on that dataset using the latest OSM data created that morning.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">What does this mean? Quite simply, it means much-reduced complexity for our journey planning servers. Thanks to the speed of the process, we can continue to provide the same journey planning service via a more resilient, scalable and less resource-intensive (and therefore cheaper) system.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">Our work in this area is largely preemptive. As we onboard more operators, and in particular <a href=\"https:\/\/www.discoverpassenger.com\/passenger-enterprise\/\">Enterprise customers accessing this individual service<\/a> for their own apps, we\u2019re expecting more users making more journey planner requests. <\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">Thankfully, with the scalability of AWS Batch, we\u2019re more than primed to take on the extra demand.<\/p>\r\n<\/div>\r\n\r\n<div class=\"block-core-paragraph\">\r\n<p class=\"wp-block-paragraph\">Want to learn more about the work we\u2019re doing to improve Passenger? <a href=\"https:\/\/www.discoverpassenger.com\/contact\/\">Get in touch with the team or sign up to our newsletter<\/a>.<\/p>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>We\u2019ve moved to AWS Batch to run computing jobs for Passenger\u2019s journey planner functionality for a more resilient, scalable and less resource-intensive system. Even during periods of increased demand.<\/p>\n","protected":false},"author":7,"featured_media":12772,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[83,100,54,101],"class_list":["post-5249","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-making-passenger","tag-bus-stop-checker","tag-journey-planning","tag-open-data","tag-osm","making-passenger"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Better, faster, stronger - Latest journey planner updates - Masabi<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Better, faster, stronger - Latest journey planner updates - Masabi\" \/>\n<meta property=\"og:description\" content=\"We\u2019ve moved to AWS Batch to run computing jobs for Passenger\u2019s journey planner functionality for a more resilient, scalable and less resource-intensive system. Even during periods of increased demand.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/\" \/>\n<meta property=\"og:site_name\" content=\"Masabi\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-14T08:38:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-04T15:29:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.masabi.com\/wp-content\/uploads\/2019\/11\/map-scaled-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1707\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TomQuay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Scritto da\" \/>\n\t<meta name=\"twitter:data1\" content=\"TomQuay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo di lettura stimato\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minuti\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/\"},\"author\":{\"name\":\"TomQuay\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/#\\\/schema\\\/person\\\/7f9321d16421f5dd31179aec75bd022d\"},\"headline\":\"Better, faster, stronger &#8211; Latest journey planner updates\",\"datePublished\":\"2019-11-14T08:38:14+00:00\",\"dateModified\":\"2022-02-04T15:29:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/\"},\"wordCount\":586,\"image\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.masabi.com\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/map-scaled-1.jpg\",\"keywords\":[\"Bus Stop Checker\",\"Journey planning\",\"Open data\",\"OSM\"],\"articleSection\":[\"Making Passenger\"],\"inLanguage\":\"it-IT\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/\",\"url\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/\",\"name\":\"Better, faster, stronger - Latest journey planner updates - Masabi\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.masabi.com\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/map-scaled-1.jpg\",\"datePublished\":\"2019-11-14T08:38:14+00:00\",\"dateModified\":\"2022-02-04T15:29:11+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/#\\\/schema\\\/person\\\/7f9321d16421f5dd31179aec75bd022d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.masabi.com\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/map-scaled-1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.masabi.com\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/map-scaled-1.jpg\",\"width\":2560,\"height\":1707},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/news\\\/aws-batch-journey-planner\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Better, faster, stronger &#8211; Latest journey planner updates\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/#website\",\"url\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/\",\"name\":\"Masabi\",\"description\":\"Making shared transport the first choice\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/it\\\/#\\\/schema\\\/person\\\/7f9321d16421f5dd31179aec75bd022d\",\"name\":\"TomQuay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g\",\"caption\":\"TomQuay\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Better, faster, stronger - Latest journey planner updates - Masabi","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/","og_locale":"it_IT","og_type":"article","og_title":"Better, faster, stronger - Latest journey planner updates - Masabi","og_description":"We\u2019ve moved to AWS Batch to run computing jobs for Passenger\u2019s journey planner functionality for a more resilient, scalable and less resource-intensive system. Even during periods of increased demand.","og_url":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/","og_site_name":"Masabi","article_published_time":"2019-11-14T08:38:14+00:00","article_modified_time":"2022-02-04T15:29:11+00:00","og_image":[{"width":2560,"height":1707,"url":"https:\/\/www.masabi.com\/wp-content\/uploads\/2019\/11\/map-scaled-1.jpg","type":"image\/jpeg"}],"author":"TomQuay","twitter_card":"summary_large_image","twitter_misc":{"Scritto da":"TomQuay","Tempo di lettura stimato":"3 minuti"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/#article","isPartOf":{"@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/"},"author":{"name":"TomQuay","@id":"https:\/\/www.masabi.com\/it\/#\/schema\/person\/7f9321d16421f5dd31179aec75bd022d"},"headline":"Better, faster, stronger &#8211; Latest journey planner updates","datePublished":"2019-11-14T08:38:14+00:00","dateModified":"2022-02-04T15:29:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/"},"wordCount":586,"image":{"@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/#primaryimage"},"thumbnailUrl":"https:\/\/www.masabi.com\/wp-content\/uploads\/2019\/11\/map-scaled-1.jpg","keywords":["Bus Stop Checker","Journey planning","Open data","OSM"],"articleSection":["Making Passenger"],"inLanguage":"it-IT"},{"@type":"WebPage","@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/","url":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/","name":"Better, faster, stronger - Latest journey planner updates - Masabi","isPartOf":{"@id":"https:\/\/www.masabi.com\/it\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/#primaryimage"},"image":{"@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/#primaryimage"},"thumbnailUrl":"https:\/\/www.masabi.com\/wp-content\/uploads\/2019\/11\/map-scaled-1.jpg","datePublished":"2019-11-14T08:38:14+00:00","dateModified":"2022-02-04T15:29:11+00:00","author":{"@id":"https:\/\/www.masabi.com\/it\/#\/schema\/person\/7f9321d16421f5dd31179aec75bd022d"},"breadcrumb":{"@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/#primaryimage","url":"https:\/\/www.masabi.com\/wp-content\/uploads\/2019\/11\/map-scaled-1.jpg","contentUrl":"https:\/\/www.masabi.com\/wp-content\/uploads\/2019\/11\/map-scaled-1.jpg","width":2560,"height":1707},{"@type":"BreadcrumbList","@id":"https:\/\/www.masabi.com\/it\/news\/aws-batch-journey-planner\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.masabi.com\/it\/"},{"@type":"ListItem","position":2,"name":"Better, faster, stronger &#8211; Latest journey planner updates"}]},{"@type":"WebSite","@id":"https:\/\/www.masabi.com\/it\/#website","url":"https:\/\/www.masabi.com\/it\/","name":"Masabi","description":"Making shared transport the first choice","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.masabi.com\/it\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":"Person","@id":"https:\/\/www.masabi.com\/it\/#\/schema\/person\/7f9321d16421f5dd31179aec75bd022d","name":"TomQuay","image":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/secure.gravatar.com\/avatar\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g","caption":"TomQuay"}}]}},"_links":{"self":[{"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/posts\/5249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/comments?post=5249"}],"version-history":[{"count":0,"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/posts\/5249\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/media\/12772"}],"wp:attachment":[{"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/media?parent=5249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/categories?post=5249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.masabi.com\/it\/wp-json\/wp\/v2\/tags?post=5249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}