'Using the Events API to Build a Slack Bot ' slackapp slack
Despite the benefits described above, WebSockets have drawbacks. One of the most significant drawbacks is that it's built on-top-of HTTP/1.1 and keeps the connection open. It leads to scaling problems when you have more users for your application. We have two ways to scale our application:Horizontal scaling. You add more servers. You can move a database, webserver, or something else to a different server. Sometimes you need to scale your application horizontally.
Horizontal scaling requires load balancing between the servers. Balancing HTTP traffic is easier than WebSocket traffic, and almost all load balancers such as Nginx, Envoy, or Istio balance traffic on L4 of the. It would be best to implement load balancing mechanisms on L7 when you work with WebSockets to have evenly loaded servers.
Furthermore, it would be best to keep in mind that networks are unreliable or third parties may close connections and your application needs to handle it gracefully. In addition, you need to have a persistent listener of incoming events, which leads to the situation when you need to have EC2/VPS or any other server to run your code, but this is a cost-ineffective solution.The Slack Events API works differently.
The only thing we need to have is a web server with a simple REST API endpoint. It allows us to use various cloud features to run our bot and save money. For instance, we can use AWS Lambda, trigger it with API Gateway. The best part of this is that we can use the Free tier plan. That's why I'm a huge fan of the Events API from Slack.We will use the Go programming language to build our bot. What we need:package because of its simplicity.
South Africa Latest News, South Africa Headlines
Similar News:You can also read news stories similar to this one that we have collected from other news sources.
How to Preserve Capital During Inflation Using Cryptocurrencies?With inflation hitting 40-year highs and hyperinflation a consistent problem in numerous countries, could stablecoins provide a way for people to store their money and avoid devaluation? 👀
Read more »
United States Crypto Miners Are Now Using as Much Power as HoustonEven if the crypto market isn't exactly growing in terms of profit, the enthusiasts who mine it are certainly increasing their energy consumption.
Read more »
Ask Amy: Tragic events lead to a quest for normalcyDear Amy: I have recently experienced much tragedy in my life. Our family is reeling.
Read more »
Using Human-in-the-Loop Approach in Machine Learning | HackerNoonArtificial intelligence makes mistakes. Significant, even life-altering ones. So, how can we still get benefits of AI while eliminating these types of errors.
Read more »
Madison Avenue Takes Deeper Swing at Fox’s Major League EventsSome of the nation’s big-spending advertisers are taking a new swing at one of its oldest sports. When Fox telecasts Major League Baseball’s 2022 All-Star Game from Los Angeles Tuesday night, viewe…
Read more »
Aliens Could Discover Earth Using This Age-Old TechniqueIt’s a common method we use to find other planets—and E.T. could use it too.
Read more »