Home / Companies / Convex / Blog / July 2024

July 2024 Summaries

3 posts from Convex

Filter
Month: Year:
Post Summaries Back to Blog
James Cowling's article explores the implementation of user space cron jobs in Convex, a platform allowing for dynamic configuration of periodic jobs at runtime, overcoming the limitation of statically defined crons. While Convex supports built-in cron jobs defined in a static file, Cowling introduces a method for dynamically registering and managing these jobs using a library called Cronvex, which can trigger periodic tasks that call external HTTP endpoints. The article details the design and workflow for setting up user space crons, emphasizing the use of reliable mutations to ensure the robustness of scheduled tasks and highlighting the separation between scheduling and execution to handle potential failures. Convex's flexible architecture allows it to serve as a comprehensive backend solution, enabling developers to build and scale full-stack applications while offering tools for scheduling, database management, and cloud functions. The piece concludes by encouraging users to leverage Convex's capabilities for crafting tailored backend solutions, and it introduces Cronvex.com as a free service for scheduling jobs.
Jul 17, 2024 1,571 words in the original blog post.
The Convex framework offers robust pagination capabilities, allowing developers to display large datasets incrementally using infinite-scroll pagination with functions like .paginate(opts) and usePaginatedQuery(). While these tools handle complex edge cases seamlessly, they have limitations in scenarios involving joins, unions, or virtual infinite scroll views, and don't manage unloading unnecessary pages or handling rapidly growing pages out-of-the-box. To address these limitations, Convex introduces the getPage function, a versatile helper that allows for more granular control over pagination by supporting various arguments such as start and end positions, index order, and limits. This function empowers developers to implement advanced pagination patterns, such as fetching pages with joins, jumping to specific data points, and scrolling in either direction. The flexibility of getPage enables developers to optimize queries and manage dynamic data updates more effectively, although it requires more manual intervention compared to Convex's built-in pagination tools.
Jul 11, 2024 2,350 words in the original blog post.
Convex Auth is a library designed to simplify the implementation of authentication in multi-user applications using the Convex backend. It addresses the complexity of integrating authentication into full-stack apps by providing a self-hosted solution that offers developers more control over their data and a simpler architecture compared to third-party platforms like Clerk and Auth0, which store authentication data externally and require synchronization with backends and databases. Inspired by libraries such as Auth.js and Lucia, Convex Auth supports various sign-in methods, including OAuth, magic links, one-time passwords, and traditional email-password combinations, with compatibility for 80 OAuth providers. The setup involves configuring server files like auth.ts to define available authentication methods and frontend components to manage authentication states. This allows developers to build a user authentication system that is both flexible and scalable, while also ensuring efficient data handling within their applications.
Jul 10, 2024 1,138 words in the original blog post.