Having spent many years in the Public Sector space, I have made a lot of friends on both the contractor and government employee sides of the aisle. So we are always having conversations about how Azure is making the world better both commercially as well as in the Public Sector space. Because of that, my mind is always thinking about how Azure can be leveraged by the Public Sector community and I believe that I have come up with a pretty cool solution that can be used in both the Commercial Azure Regions, but can also be deployed in Azure Government.
Suspicious Activity Bot
- Node JS (Express and Mongoose libraries)
- Azure Bot Framework SDK
- Azure App Services (Web or API Apps)
- Azure Functions (Commercial Only)
- CosmosDB (Commerical Only)
- MongoDB VM
- Express API: https://github.com/brharr/hotlineapi
- Suspicious Activity Bot Application: https://github.com/brharr/suspiciousactivitybot
As I mentioned above, these applications can be deployed using services that are available in both the Commerical verison of Azure as well as Azure Government. Because both applications are completely self-contained, they can each be deployed within Azure App Services. Where things start to differ is the Data layer. As you can tell, I am really trying to provide an application that does not require IaaS based services within Azure. However, our Azure Government region does not currently have the CosmosDB service. Thankfully though, I used the MongoDB driver within the API application. This means that you can pass in any MongoDB Connection string into the App Service connection string settings whether it is an IaaS based VM, CosmosDB service or even the MonngoDB as a service feature that is directly available from MongoDB.
So with this as an overview, I am hoping that it is quite obvious how this project can deployed in your own Azure subscription. Specific instructions can be found within each Github repositories ReadMe files.
- Hotline API: Azure App Service, either Web or API, both will work. I would recommend API however if you want to use API Management to provide policies on top of the APIs or make the API available as a product.
- Suspicious Activity Bot Application: Azure App Service Web App. In Azure Commercial, you can also use the fairly new Bot Service
- Data Document Storage: For Azure Government you will have to have a MongoDB VM available which can be retrieved from within the Azure Marketplace. If you are able to use Azure Commercial regions, then you can very quickly create a CosmosDB instance making sure that the database is using the MongoDB driver.
One more thing that I want to mention with respect to deployment is that these code projects can be even easier in the Azure Commerical regions. I was able to convert the Hotline API into a completely Serverless set of APIs using the HTTP trigger in Azure Functions. Not only can you create a fully functional NodeJS based REST API using Azure Functions, but we have direct integration with CosmosDB in Azure Functions thereby removing the need for the Mongoose ORM library and making each API function about 10 lines of code. Using this in combination with the Bot Service that is also available in the Azure Commercial regions, you could make this entire application Serverless. That is just freakin AWESOME.
Unfortunately, neither Azure Functions nor the Bot Service is available in Azure Government. I do realize however that not all Law Enforcement agencies or Legal Authorities are limited to using Azure Government. Please feel free to reach out to me directly if you would like to talk about the Serverless version of this. I will hopefully be making a separate set of repositories available for this in the future.
Hopefully you will find these projects interesting and see how easy it can be to both develop and deploy an Azure Bot Application in both the Azure commercial and Azure Government regions. All of the code for both projects are available for downloading or forking. Should you run into any Bugs or would like to see some enhancements, you are welcome to make a Pull request and update the code yourselves or file an Issue on the specific project. As always, feel free to post any comments that you might have with the blog as well.
Please be aware that is a lot of additional detail about each individual project within the README file for each Github repositories
There are additional links available within the README files for each project within the Github repository, but this should be a good starting point: