今日已更新 339 条资讯 | 累计 19899 条内容
关于我们

标签:#messaging

找到 3 篇相关文章

AI 资讯

Message Queue — Async Processing

Async processing qua message queue: vì sao đẩy việc nặng ra khỏi request path, và cái giá phải trả bằng eventual consistency Async processing là mô hình tách một request thành hai giai đoạn: request handler nhận việc, xác nhận với client, rồi giao phần xử lý thật cho một worker chạy ngoài request path — thường qua một message queue (RabbitMQ, AWS SQS, Kafka, Redis Streams, hoặc queue trên nền Redis như BullMQ/Sidekiq). Lý do dev gặp nó trong việc thật rất cụ thể: một endpoint gọi payment provider mất 3s, gửi email confirm mất 1s, resize ảnh mất 5s — nếu làm tuần tự trong request, p99 latency của endpoint là tổng các con số đó, và một downstream chậm hoặc chết đủ để làm timeout hết thread pool của app server. Đẩy vào queue thì request trả về trong vài chục ms; nhưng đổi lại, cái "xong" mà client thấy không còn nghĩa là việc đã thực sự hoàn thành. Cơ chế hoạt động Ba thành phần: producer (thường là API server) đóng gói việc thành message rồi publish vào broker; broker (RabbitMQ/SQS/Kafka…) giữ message trong queue có persistence tuỳ cấu hình; consumer/worker poll hoặc được push message, xử lý, rồi ack để broker biết xoá. Nếu worker chết trước khi ack, broker redeliver — đây là gốc của semantic at-least-once : mỗi message được giao ít nhất một lần, có thể nhiều lần. Exactly-once trong hệ phân tán chỉ đạt được ở lớp application bằng cách consumer viết idempotent, không phải bằng cấu hình broker. Ví dụ với RabbitMQ + Node ( amqplib ): // producer — trong HTTP handler const ch = await conn . createConfirmChannel () await ch . assertQueue ( ' image.resize ' , { durable : true }) app . post ( ' /upload ' , async ( req , res ) => { const jobId = crypto . randomUUID () const payload = Buffer . from ( JSON . stringify ({ jobId , s3Key : req . body . key })) await ch . sendToQueue ( ' image.resize ' , payload , { persistent : true , // ghi xuống disk, sống sót broker restart messageId : jobId , // để consumer dedupe contentType : ' application/json ' , }) // đợi broker confirm đ

2026-07-08 原文 →
AI 资讯

Introducing BulkSMSOnline: Global SMS API Built by a Small, Developer-First Team

We’re a tiny team of 2–9 engineers who believe business messaging should be simple, reliable, and accessible to everyone. Today we’re officially opening up BulkSMSOnline to the Dev.to community, and we’d love your feedback. What’s BulkSMSOnline? A global bulk SMS platform that lets you send campaigns, alerts, OTPs, and notifications via: A clean web portal A REST API An HTTP API It’s designed for developers who want reliable global delivery without fighting arcane telecom protocols or opaque pricing. Why We Built It We noticed a pattern: most SMS platforms either overcomplicate things with bloated SDKs or hide behind enterprise gatekeepers that don’t listen. We wanted something different a lean, transparent API backed by real people who actually care about your deliverability. So we built BulkSMSOnline around three principles: Reliability : Messages must arrive, every time. Radical simplicity : A clean API you can integrate in minutes. Transparency : Honest pricing, clear limits, no surprises. Quick Start: Send an SMS in Under 5 Minutes Here’s how simple it is with our REST API. For full docs, check out our developer portal . curl -X POST https://api.bulksmsonline.com/v1/sms \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "to": "+1234567890", "message": "Hello from BulkSMSOnline!", "sender": "MyApp" }' You’ll get a JSON response with a message ID and status. That’s it. No multi-page setup or carrier negotiations. What else can you do? Send bulk messages with a single API call Track delivery in real time via webhooks Pull reports programmatically Use our HTTP API for legacy systems Who’s Behind This? We’re a small, agile team (2–9 people). That means: No bureaucracy: Fixes and features ship fast. Direct access: When you email support, you reach the engineers who built the platform. Your feedback shapes our roadmap: Many of our recent features came from developer conversations. Tech stack we love: Python, Node.js, PostgreSQL, an

2026-06-05 原文 →