November 2023 Summaries
10 posts from Convex
Filter
Month:
Year:
Post Summaries
Back to Blog
Michal Srb's article discusses the implementation of a waitlist feature for web applications using Convex to manage user surges and maintain optimal functionality. This waitlist system effectively handles tens of thousands of users by estimating users' positions in line and updating their status from "waiting" to "active" based on backend calculations. The waitlist minimizes resource usage and cost by using strategies such as caching global waitlist data, refreshing session timestamps, and deleting stale sessions. The implementation prioritizes efficiency by allowing the backend to assign incrementing positions and leveraging client-side calculations to determine the user's place in line, trading off precision for scalability. Additionally, the system ensures that waiting sessions do not require user interaction to remain active, adopting an optimistic approach where sessions become stale if users do not return within a set period. The article underscores Convex's capability to support massive user volumes while being simple to integrate and extend, making it a powerful tool for developers aiming to build scalable applications.
Nov 30, 2023
1,630 words in the original blog post.
Gautam Gupta's guide explains how to seamlessly integrate PagerDuty and Slack using Convex to automatically update a Slack channel with the current on-call engineer's details. This integration addresses the challenge of quickly identifying on-call personnel during incidents by using a Convex-based solution that improves upon the original AWS Lambda approach. The process involves cloning a GitHub repository, deploying the application on Convex, and configuring API keys, allowing users to efficiently manage their incident response without extensive AWS knowledge. The solution uses Convex's capabilities to store configurations and schedules functions, enabling real-time updates to Slack based on PagerDuty's on-call data, and offers a simpler, scalable alternative to complex AWS setups.
Nov 28, 2023
1,944 words in the original blog post.
The post describes building an AI-powered chat interface using Convex, a full-stack development platform with a built-in vector search feature. This implementation is part of a series comparing different AI chatbot setups, emphasizing the use of Convex for message storage and context retrieval, while leveraging OpenAI for embeddings and LLM chat completion. The process involves embedding data from the Convex documentation site, handling user queries, and retrieving relevant contextual information for generating responses. The backend uses a structured schema to manage messages, documents, chunks, and embeddings, ensuring efficient data handling and retrieval. The frontend implementation involves a React and Tailwind CSS setup, providing real-time updates, session management, and a user-friendly interface. The approach offers full control over the AI system, type safety, and consistency, with the ability to log and inspect data for debugging purposes. The post concludes by highlighting Convex's capabilities as a comprehensive backend platform for scalable full-stack AI projects.
Nov 21, 2023
3,252 words in the original blog post.
Vector databases are not rendered obsolete by OpenAI's new Assistants API, despite the API's ability to retrieve context for AI chat interfaces without needing a separate message store or vector database. This post explores three different implementations of AI chat backends—using OpenAI's Assistants API, LangChain, and a custom Convex implementation—to evaluate the role of vector databases in AI-driven applications. While the Assistants API provides convenience and potential future improvements, it lacks control and flexibility, which could hinder the development of integrated AI experiences that require specific context handling. LangChain offers a high-level, approachable solution with its abstraction capabilities, but may not be ideal for sophisticated integrations due to its complexities and limitations. On the other hand, a custom implementation using Convex allows for complete control and transparency, facilitating the development of tailored AI experiences by managing data storage, context retrieval, and interaction with large language models. Ultimately, the choice of implementation depends on the desired level of control and the specific use case, with custom solutions offering greater adaptability for integrated AI applications.
Nov 21, 2023
1,607 words in the original blog post.
OpenAI's Assistants API allows developers to build AI chatbots with context retrieval, enhancing user interactions by surpassing the capabilities of standalone models like ChatGPT. The API facilitates the embedding of documents as contextual data for chatbots, enabling them to provide informed responses to user queries. This implementation, used in an AI chatbot for the Convex documentation site, integrates OpenAI's features with a server setup to maintain security and functionality by processing data before it reaches OpenAI. The system updates in real-time, storing user queries and responses in a database, and employs polling to retrieve answers from OpenAI, which are then presented through a user-friendly interface built with React and Tailwind CSS. The API's current limitations, such as its beta status and lack of streaming support, are acknowledged, but its potential for further integration with product databases and custom functions is noted for future enhancements.
Nov 21, 2023
2,614 words in the original blog post.
The blog post explores the creation of an AI-powered chat interface using the LangChain library and its new Convex integration. It details a process involving the use of LangChain to easily implement AI chat functionality by embedding and retrieving relevant documents as context using a model, such as OpenAI's GPT-4. The post describes the steps of loading, splitting, and embedding data from the Convex documentation site, which is then used to answer user questions by retrieving the most relevant contextual data. It also highlights the setup of a basic schema for caching embeddings and storing document chunks, as well as how LangChain streamlines both data ingestion and answering processes. The text concludes by noting the trade-offs of using LangChain, such as a loss of type safety and the challenge of understanding its internal workings, while emphasizing Convex's capabilities as a backend platform for building full-stack AI projects.
Nov 21, 2023
1,884 words in the original blog post.
Convex is hosting a Build Bounty event called Jotion to encourage developers to enhance the Notion clone project, originally demonstrated by Code with Antonio, using Convex, Next.js 13, React, and Tailwind. This event offers a $3,000 prize pool and aims to blend elements of hackathons, bug bounties, and contests by inviting developers to contribute new features to Jotion, collaborate with a community, and gain recognition. Participants are required to base their projects on a fork of the original Jotion repository, incorporate Convex features, and adhere to Convex best practices. The competition runs from November 16th to December 3rd, with winners announced on December 12th, and involves judging criteria focused on functionality, improvement, adherence to Convex practices, and code quality. Participants can work individually or in teams and submit multiple entries, with intellectual property rights remaining with the creators, while Convex retains rights to promote the submissions.
Nov 16, 2023
881 words in the original blog post.
Ian Macartney's post explores various methods for seeding data in preview deployments, which involve populating a new database instance when beginning a project or testing backend changes. He discusses three primary approaches: manual entry through a dashboard, importing data via the CLI, and coding data seeding directly into the project. Each method has its pros and cons, such as the simplicity of manual entry, the efficiency of CLI imports, and the adaptability and reusability of coding data in alignment with current database schemas. Macartney expresses a preference for the coding approach, as it allows for type-checking against the schema, reusing code paths, and supporting complex data structures. He highlights using internal mutations to safely manage data seeding without exposing the process to public clients. The guide emphasizes the importance of maintaining up-to-date seed scripts to prevent data from becoming out of sync with schema changes and encourages the use of Convex's built-in features to streamline the development process.
Nov 08, 2023
1,367 words in the original blog post.
Convex introduces a streamlined method for developers to quickly start building applications using the command npm create convex@latest, which allows them to generate a new app from existing templates. This tool installs and runs the create-convex package, providing choices for frontend clients and authentication providers, and supports frameworks like React, Vite, Next.js, and authentication solutions like Clerk and Lucia. Developers can further customize their applications by editing the pre-populated convex/myFunctions.ts file for backend functions and src/App.tsx for the frontend interface. Pre-configured with components styled using TailwindCSS, the app is easily customizable. Users can specify a template using the -t flag to skip prompts, and even use Github repositories as templates. Convex offers a robust backend platform including cloud functions, databases, and real-time updates, facilitating the development of full-stack AI projects.
Nov 06, 2023
683 words in the original blog post.
Convex has integrated with Fivetran to enhance data integration capabilities for applications built on its platform, allowing users to replicate data from Convex to external data warehouses like Snowflake, Databricks, and Google Big Table. This integration leverages Convex’s strength in Online Transaction Processing (OLTP) for real-time, reactive applications, while enabling data export to Online Analytical Processing (OLAP) systems for deep data analysis. OLTP databases like Convex optimize for small, predictable queries and fast transactions, whereas OLAP systems handle large-scale data analysis. The new Convex source connector for Fivetran allows users to maintain live applications on Convex while transferring data for analysis to their preferred data warehouses and BI tools. Users can quickly begin using this integration by setting up a Fivetran account and linking it with Convex credentials, although early access requires contacting Convex through their Discord or support channels. This integration aims to offer the benefits of both OLTP and OLAP systems, supporting scalable and efficient full-stack AI projects.
Nov 02, 2023
586 words in the original blog post.