AI 资讯
Serverless: When It Helps and When It Hurts
Introduction Serverless computing has become a buzzword in cloud architecture. But like any tool, it has sweet spots and sharp edges. After building and maintaining several serverless applications, I've learned where it shines and where it creates headaches. This article shares those lessons. When Serverless Helps 1. Event-Driven Workloads Serverless excels when your code runs in response to events: file uploads, database changes, HTTP requests. The pay-per-execution model means you don't pay for idle time. // AWS Lambda handler for image resizing exports . handler = async ( event ) => { const bucket = event . Records [ 0 ]. s3 . bucket . name ; const key = event . Records [ 0 ]. s3 . object . key ; // resize and save return { statusCode : 200 }; }; 2. Variable or Unpredictable Traffic If your app has occasional spikes (e.g., a marketing campaign), serverless auto-scales instantly. No need to provision for peak load. 3. Rapid Prototyping and MVPs You can deploy a fully functional API in minutes without managing servers. This accelerates feedback loops. 4. Microservices and Glue Code Serverless functions are perfect for small, single-purpose services that connect other services (e.g., processing webhooks, data transformation). When Serverless Hurts 1. Long-Running Processes Most providers have a maximum execution timeout (e.g., 15 minutes for AWS Lambda). Batch processing or video transcoding may hit this limit. # This will timeout if processing takes > 15 minutes def handler ( event , context ): process_large_file ( event [ ' file ' ]) return { ' done ' : True } 2. Cold Starts After a period of inactivity, the first request may have a delay of several seconds. This is detrimental for latency-sensitive applications like synchronous APIs. 3. Stateful Applications Serverless is stateless by design. If you need persistent connections (e.g., WebSockets) or local state, you'll need additional services like Redis or DynamoDB, adding complexity. 4. High, Steady Load If your
AI 资讯
Launching Health in ChatGPT
Health in ChatGPT now lets eligible U.S. users securely connect medical records and Apple Health to get more personalized insights and better understand their health.
开发者
The Capture of a Country
AI 资讯
Freesolo Flash
Full-Stack Platform for Training Small Language Models Discussion | Link
AI 资讯
After shocking quarter, IBM insists that AI isn’t killing the mainframe
After IBM's stock crashed last week on warnings of poor mainframe sales, the CEO explained that AI wrecked corporate hardware budget, temporarily.
开发者
Samsung reveals Galaxy Z Fold 8 that will compete with the iPhone Ultra
产品设计
If Scrubs Hurt, Your ZFS Design Is Broken
产品设计
Wispro
Stop typing, start talking, get perfectly written text Discussion | Link
开发者
You Opened a Credit Card. ICE Now Knows Where You Live
开发者
Tesla says 'Robotaxi' is expanding – its own chart shows it's not
AI 资讯
Some AI Systems Differentially Downplay Their Creators' Controversies
AI 资讯
Show HN: Vivace – A single-process Qt media player with interactive DVD menus
Vivace uses only Qt (v6.11.1 or newer) itself — no Qt Widgets, no external player processes. I built it because I wanted SMPlayer's UI conventions and features without depending on the external player processes(mpv/mplayer). It's a ground-up rewrite, not a fork. - DVD playback with interactive menus, from a from-scratch IFO/PCI parser (no libdvdnav) - a hybrid WSOLA + phase-vocoder approach to speed-adjusted audio, since neither algorithm alone sounds good in both directions - secure credential
开发者
Amorality and greed at Silicon Valley's favourite university
开发者
Transcoding Billions of Unicode Characters per Second with SIMD (2022)
开发者
Thinking Machines dropped RoPE, and it's a good idea
AI 资讯
The Dirty Secret Behind AI Agents (Demo 🚀)
For quite a while now, I've had the feeling that AI agents are surrounded by this mystical aura....
开发者
TWC Classics
AI 资讯
Anthropomorphism in Children's Interactions with LLM Chatbots
AI 资讯
One encoder, seven heads: what we learned training a unified security classifier with masked losses [P]
We spent the last months consolidating seven separate sequence classifiers into one multi-head model, our apex model, so to speak, and since the weights are now public, I wanted to share what worked and what surprised us. Setup: a shared mmBERT-small encoder with seven task heads, binary injection (BCE), document class (7-way), tool type (14-way), tool operation (6-way), tool data-flow tags (3× BCE, multi-label), intent routing (5-way), and threat type (7-way). The part that needed care: our training rows only carry labels for a subset of tasks, so absent tasks are masked out of the loss entirely. We ended up writing a self-test that asserts absent-task gradients are exactly zero, which caught two subtle bugs, and I'd recommend it to anyone doing similar masking. About 5k synthetic/real multi-task rows help the heads co-train; the test sets stay 100 % real data. Held-out results per head: injection F1 0.962, documents 0.980, tool type 0.957, tool operation 0.945, tool tags 0.958, routing 0.916, threat 0.952. Quantization: both the unified model and the dedicated single-task variants ship quantized -edge builds (ONNX INT8 + INT4 embeddings, from 96 MB) with measured parity benchmarks in the repos, the worst head loses 0.012 against FP32. Was it worth it vs. seven dedicated models? We released both variants, so you can judge for yourself, the dedicated models score marginally higher on most tasks, but the unified one does one encoder pass instead of up to seven. Our weak spot: routing, at 0.916. The intent classes overlap semantically ("write code that analyzes my data" is that code or analytics?), and I suspect the ambiguity is genuinely in the data. If you have ideas beyond relabeling, let me know :) Weights and per-head metrics: https://huggingface.co/patronus-studio submitted by /u/PatronusProtect [link] [留言]
开发者
The Human Kintsugi