By now the service registry is not used to route intents. Now we will modify the intent routing to use the service registry for finding out which service to query.
- [Instructor] By now we've created the service registry…and a way for individual services to subscribe to it.…Yet, a time intent handler does not use it.…How do we properly wire our service registry…with our intent handlers?…A service registry is created in service.js.…There we have the express application object available…and express provides a way to store data for later use.…Let's do that now.…For that I simply add service.set…and we want to name this property serviceRegistry…and we store a serviceRegistry object in there.…
Now let's follow the call chain.…The intent handler is called in select client…which is instantiated in run.js.…Let's open run.js.…Here we also have the express app available again.…It's stored in service here.…So we can use const, serviceRegistry equals service.get…and we want to get the config property, serviceRegistry.…
Now that we have it here,…we can simply pass it into the slackClient like that.…And in slackClient we will change the signature…of the init function and have the serviceRegistry here.…
After explaining some basics about Node.js and microservices, Daniel shows you how to sketch out the planned architecture for your application and get the boilerplate code, modules, and credentials in place. Next, he shows how to create a bot user in Slack, connect to Slack, and post messages. He also shows you how to get your bot to process variations in text by creating logic that delegates the processing of intent to dedicated modules. Lastly, he shows how to register additional services and he covers how to use monitoring to identify architectural or performance issues.
- Using Slack APIs
- Sketching out a Slack bot architecture
- Setting up a project and choosing modules
- Creating and naming your bot
- Connecting to Slack
- Setting up and using natural language processing
- Routing by intents
- Implementing geocoding and time calculation
- Adding and monitoring services