Home / Companies / Upstash / Blog / November 2022

November 2022 Summaries

3 posts from Upstash

Filter
Month: Year:
Post Summaries Back to Blog
This article explores the creation of a basic drift detection engine using TypeScript to manage infrastructure as code (IAC) by addressing the common challenge of drift, where infrastructure state changes from its original configuration. It utilizes Upstash for remote state management and local JSON blobs for local state management, allowing users to compute differences between remote and local states and resolve discrepancies. The article discusses scenarios where remote resources may differ from local ones due to out-of-sync branches or resource removal and provides solutions for each case. It highlights Upstash for its ease of use in remote computations and compares the approach to established drift management tools like Terraform, which offers comprehensive state management features. Additionally, it suggests that the principles of drift management can be applied in various domains beyond IAC, predicting a growing industry trend toward utilizing such concepts.
Nov 30, 2022 1,210 words in the original blog post.
A simple application is outlined to automatically fetch the most popular New York Times articles daily and post them to a Discord channel for discussion. Using Next.js and the QStash Callback feature, the application sets up a cron job to access the New York Times API, retrieve article data, and forward it to a specified Discord webhook. The process involves creating a callback API endpoint that utilizes the QStash SDK for message scheduling and verification, alongside setting up environment variables for API keys and webhook URLs. The articles are fetched at 8 am each day, processed, and then sent to Discord, where discussions can be initiated. The implementation details include Next.js request handling, message forwarding, and cron job configuration, with options for local or hosted deployment.
Nov 23, 2022 1,046 words in the original blog post.
QStash, initially designed as a message queue and scheduler for serverless and edge platforms, has introduced QStash Callbacks, enabling users to send messages and receive responses from destination APIs. This advancement allows for a two-way communication where QStash sends a message to the destination API, waits for a response, and forwards the response's status, body, and headers to a specified callback URL. Users can incorporate callback URLs by adding the Upstash-Callback header when publishing or scheduling messages, facilitating new use cases such as updating databases with responses from third-party APIs. The feature has been exemplified by a project using QStash to interact with the DALL-E API and store generated images in Redis. Feedback and ideas for further applications are encouraged via Twitter or Discord, and detailed usage instructions are available in the documentation.
Nov 16, 2022 500 words in the original blog post.