After half an year of our open source journey, we are thrilled to finally introduce our latest work - Bottender v0.15. With the release this time, not only did we make tremendous progress from our experiences previously, we also benefited quite a lot by the feedback from the whole community, which we are highly appreciative of. Thanks to your support and feedback for us to get here today.
You can now install the latest package by simply entering the command to your terminal:
$ npm i bottender@latest
$ yarn add bottender@latest
As we cannot stress enough the importance of a smooth process when it comes to developing, we try to avoid any sorts of breaking changes when updating to a new version. With that being said, developers should find it easy when making updates.
You can find the full change log on GitHub Realease Page.
Improving Developer Experience
Developer experience has alwasys been our top priority. With the latest version v0.15, we launch two new features that will better the developing process significantly. They will not only speed up your developing process, they also make debugging much simpler than you can ever imagine.
ConsoleBot
With the help of ConsoleBot
, it means less deployment, zero platform configuring, and skipping permission review in early development stages. You can now review the outcome on your terminal console. Under certain circumstances, you'll be able to develop without Internet access required, which facilitates a more convenient developing process.
Debug
We are currently using debug package to gather and organize all the debug information. You can reach different part of the debug log by adjusting DEBUG
environment variable; following is a list of supported arguments:
DEBUG=bottender:*
DEBUG=bottender:request
DEBUG=bottender:session:read
DEBUG=bottender:session:write
Monitoring the incoming requests and session read/write makes it easy to trace unexpected errors and it, at the same time, gives you a fuller understanding of how the whole program works.
Boosting Performance with Batch
In this version, we built various batch requests strategy for Messenger and Line respectively, which potentially results in notable drops with API calls.
Messenger Batch
For Facebook Messenger, with Batch requests in Graph API, it is estimated that the HTTP requests will reduce to 1/50, and it automatically triggers retry when over-reaching request limits, which ensures availability under heavy network traffic.
const { isError613 } = require('messenger-batch');
new MessengerBot({
// ...
batchConfig: {
delay: 1000,
shouldRetry: isError613, // (#613) Calls to this api have exceeded the rate limit.
retryTimes: 2,
},
});
LINE Batch
As for LINE, we combine 5 messages in one batch request. By doing so, we can maximize the functionality of reply token while using Reply API:
new LineBot({
// ...
shouldBatch: true, // Default: false
});
Comprehensive Platform Support
In the previous version v0.14.x
, we support a new platform Viber
, and we are still perfecting functionaities on all platforms. On top of that, the new launch v0.15
supports some relatively new platform features, such as:
Customize Connector
One of the Bottender's design intention is to provide a flexible and multi-functional connector, making hooking up with any platform possible.
Apart from the currently built in console, Messenger, LINE, Slack, Telegram, Viber connectors, you can literally connect it to anything you please! You can find more detailed infomation on customized connector in our document.
If you develop your own customized connector, feel free to publish it on npm, tag bottender-connector
and share with everyone!
More Engaged in the Community
We continue receiving a lot of feedback from Twitter and GitHub, which is not going unnoticed. For more developer feedback, we set up a Discord Bottender developer channel, aiming at providing a platform where more voices could be heard. Join Discord Bottender channel now, chat with us and receive all first-hand information!
Besides that, in order to better help developers solve Bottender related issue, we created the bottender tag on Stackoverflow; feel free to throw in any questions you might have!
Forging Ahead
Our top goal is to provide easy acceccibility and to enhance performance. To acheive that, we will be focusing on the following:
More Friendly Developing Environment
We will keep on learning from different developing friendly projects, such as React so as to identify some common issues and provide corresponding solutions. We also strive for providing effective debugging tools.
Supporting More Platforms
Aside from working on implementing new functions to the existing platforms, we are also made aware that the community has high hopes on development regarding WeChat, Discord, Web and other platforms, which we would definitely put more effort into.
With our accumulative experiences from connector developing , we are confident the interface of connector and related files would be available in a more user-friendly way.
Serverless
Experiments are currently held on some major cloud providers with Serverless service, such as AWS Lambda, Google Cloud Functions, and Azure Functions ect. This would reduce a decent amount of maintaining costs when running less frequently visited chatbot service and more importantly, no sacrifices are to be made when it comes to user experience.