LLMOps Bài 2

Comparison 3 types of API

Trong lúc học mình mất khá nhiều time để phân biệt SSE (Server-Sent Events) với WebSocket. Và mình nhận ra rằng:

  • AI Chat Services Using SSE: OpenAI ChatGPT, Anthropic Claude, Google Bard, Perflexity

  • AI Traditional Chat Using WebSocket: Discord, Slack, WhatsApp Web, Telegram

OpenAI chọn SSE vì:

  1. Use case phù hợp: AI streaming response, không cần real-time collaboration

  2. Reliability: Tự động reconnect, hoạt động tốt qua proxy

  3. Simplicity: Ít code hơn, ít bug hơn

  4. Cost-effective: Ít server resources hơn

  5. User experience: Smooth streaming text là đủ

Khác biệt:

  • SSE: Real-time ONE-WAY (Server → Client)

  • WebSocket: Real-time TWO-WAY (Client ↔ Server)

0
Subscribe to my newsletter

Read articles from Cường Đoàn Ngọc directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Cường Đoàn Ngọc
Cường Đoàn Ngọc

Name: Cường Educational Background: Data Science and Artificial Intelligence Current Role: AI Engineering at an AI Production company, specializing in Education AI Career Interests: Natural Language Processing (NLP), Large Language Models (LLMs), Retrieval-Augmented Generation (RAG), Workflow Systems, and AI Agents Personal Interests: Lifelong learning, personal development, speed-hacking (accelerated learning/productivity), and networking