Mobility, Services, APIs and bots
This is a repost of the anniversary post on Medium - to celebrate the anniversary of the tech project at MaaS Global. Because one year ago, I got the first people working on the bleeding-edge Serverlessstack that powers the service now known as Whim.
One year ago, we were participating in heated debates of what the product would be called, going through lists of over 1000 names. But there was no debate about the tech stuff. The founders Sampo and Kaj gave full autonomy for me to go and build this thing from scratch. A dream come true for an engineer really, building a 1.0 product from scratch with free choice of tools.
Perhaps because of that freedom, trust, but for sure the uncertainty, it also resulted in a big bet on a framework that had just reached its 0.5 version. Probably not a bet I would have made if this was a project for a bank, but this was a startup wanting to learn about lots of things. Of course there was a steep learning curve. But knowing what we know now, I’d still have made the choice. First demo to the board after one day (night) of prototyping, and product launch in 3 months, while being ready to scale globally, is nothing to sneeze at. The story is now also on serverless.com, quite fittingly for the anniversary.
The past year has been quite a ride. A year ago we figured that a lot of the time would be spent on pushing our message, but after a couple of months, the market started pulling us all over the place. Much of it was worth it, like winning the Nordic Smart Cities award, and the rewarding trip to Yinchuan, China. But as these opportunities are difficult to pass, it has meant that keeping focus on delivery has been challenging, when a startup at our stage needs to deliver. However, the track record is stellar: after a summer of trials, in October we opened up for early users in Finland, and just before X-mas, pre-orders in the West Midlands, UK, with the Netherlands next in the pipeline.
The Whim app for iOS has reached version 1.2.4–our 24th public version since October 16. 3257 Travis CI builds. Thousands and thousands lines of code in the backend. All of it in Javascript, now taking on ES6 and 2017 gradually. More than 140 API endpoints. Android version is just about ready, as well.
Although the year has felt rather short, but still so long, as the numbers tell so much has happened and that can’t really be summarized in a post like this. I should write more I suppose as retrospect of what we’ve done to get here...
But now for something new.
I mentioned the 140+ API endpoints for a reason. We’re huge advocates of the API economy here at MaaS Global —business-enabling APIs are what drives the industry forward. We also practice what we preach: Whim-the-app is talking to a pure REST API. We even published our transport provider layer on GitHub for others to bootstrap from when designing transport systems (one of the main questions to me before was ‘How can I get my service as part of Whim?’).
APIs are powerful as they free up innovation by people who aren’t constrained to the existing business model of the provider. But as crucially, they also support the existing business model and innovations done in house. As a litmus test of the Whim API and as part of the culture of experimentation we hold dear at MaaS Global — it had been too long since I’ve made contributions (as the occasional developer, I do not want to be dragging our development down) — I wanted to have a try with the API and see if it worked for making something quite different, a new user experience for Whim altogether.
AI, bots, NLP, Computer Vision are hot topics in the industry. Whim is aiming to make use of as much AI/ML as possible, but a conversational interface is also interesting in the context of everyday mobility, as an additional interaction channel with the service.
And thanks to the nice people at Microsoft, we got introduced to the Bot Framework and also got some sparring help in getting up to speed with it.
Behold, the Whim Bot
The Whim Bot is a fun, totally experimental way of interacting with Whim the Service. It’s a Facebook page that you can chat with, to get relevant information about any point of interest, and book travel to that location on a Whim.
The Whim Bot can be used to look up any location, and query for e.g. restaurants or other attractions in the area. But what’s really nice is that the service connects with the authenticated Whim API, making it able to order rides for the user, completely outside the Whim app. Opening up Whim will just display the ride that was booked on behalf of the user.
The geeky stuff
The code is a product of hacking on and off throughout one weekend for the most part — but if anyone wants to check, it’s available in our repo that you can check and see that creating and deploying a bot is quite straightforward nowadays. Please also check the samples in the Bot Framework repo and Ville Rantala’s own contributions to the world of serverless bots.
The Bot Framework abstracts much of the talking to Facebook and helps with debugging. With the ngrok.io service and Serverless offline plugin, one can run a bot locally, despite Facebook requiring a public callback URL. Crucially, the Bot Framework also takes care of all state management, which is perfect for a scalable, serverless application. The developer doesn’t need to provision any database resources for storing state information to keep track of the conversation. Obviously there are countless ways of building bots, such as the SC5 two-hour workshop for bot building with Wit.AI and Serverless that I have also tried before, just that this approach seemed better suited for a mobile user such as with Whim, where I wanted to minimize the amount of natural language typed.
The Bot Framework is not an NLP abstraction at all, it’s rather a state machine. One can add NLP with e.g. Azure Cognitive Services (LUIS), or just feed the raw text entered by the user to some other service like Amazon Lex or Google, but strictly speaking, NLP isn’t really required when making a bot that can be driven by pre-defined steps and search terms. With this approach, the end-result can be even better than a bot that expects lots of typing or phrases. As the outcome, the Whim Bot doesn’t currently utilize NLP at all but could be easily extended to do so, e.g. setting a pickup time and place for a car might be a good application of NLP. But as can be seen from the video, with pre-populated shortcuts that are context-sensitive, the bot seems rather intelligent despite traversing what is essentially a menu structure.
One Year Old
So the Whim tech project is one year old — wow! Here’s to many more anniversaries, growth and doing more of: bleeding edge technologies, breaking stuff, Friday afternoon releases to the tunes of bad (good) music, ice cream awards for fixing bugs, rocket science, sleeping on the job after a long night, and in general, having such a kick-ass team that wants to change the world with software. You guys rock!
We are growing our team as we’re expanding to new areas so there are opportunities for new people to contribute to the above and come up with new, innovative ways of breaking stuff, and get to fix it too. In other words, I’m hiring: join our journey and change the world with us!
Intelligent transportation | Smart Mobility | Entrepreneur | Investor | Strategic Adviser | FIEAust CPEng NER APEC Engineer IntPE(Aus)
8yGreat work Sami Pippuri