AI 资讯
I Built a Concurrent Resource Scheduler in Go with Sharded Priority Heaps
Support on GitHub: github.com/phero20/concurrent-resource-scheduler (Give it a star if you find it useful!) View Docs: pkg.go.dev/github.com/phero20/concurrent-resource-scheduler What happens when thousands of concurrent requests compete for a small pool of reusable resources? You can put a mutex around a slice and hope for the best. Or you can design the scheduler around concurrency from the beginning. I chose the second option. I built Concurrent Resource Scheduler (CRS) , a domain-agnostic Go library for selecting, prioritizing, routing, and maintaining reusable resources under heavy concurrent load. It was designed from the ground up for production readiness. The core library supports Go 1.22+ and is intentionally built with zero third-party dependencies . Extended features like Prometheus telemetry are strictly separated into an optional nested Go module ( Go 1.25+ ) to keep the core scheduler dependency graph perfectly empty. The core idea is simple: MANY CONCURRENT REQUESTS │ ▼ ┌───────────────────┐ │ Resource Scheduler│ └─────────┬─────────┘ │ ┌──────────────┼──────────────┐ │ │ │ ▼ ▼ ▼ Priority Acquire State Heap Strategy Management │ │ │ └──────────────┼──────────────┘ │ ▼ BEST AVAILABLE RESOURCE But making that work correctly under concurrency is where things get interesting. CRS is designed for use cases such as: LLM/API gateways API key pools proxy rotation database replicas GPU workers backend pools worker resources connection pools rate-limited providers reusable compute resources The scheduler itself does not know what a resource means. It only knows: "I have resources. I need to safely maintain them, prioritize them, and return an appropriate one to a concurrent caller." Table of Contents The Problem The Naive Approach Why a Global Mutex Becomes a Problem The Core Idea Behind CRS Architecture at a Glance Sharded Priority Heaps Why Sharding Helps The O(1) Lookup Map Priority and Acquire Are Different Problems Acquire Strategies Round Robin Weighted A
AI 资讯
Managed Inference on Google Cloud: Pairing the Gemini Enterprise Agent Platform with Cloud Run
If you have ever wanted to ship an AI-powered application without managing GPUs, model servers, or scaling infrastructure yourself, this guide is for you. Managed inference simply means letting a cloud provider run the AI model for you: you send a request, the platform handles the compute, and you get a response back. On Google Cloud, the cleanest way to do this today is to pair the Gemini Enterprise Agent Platform (formerly Vertex AI) with Google Cloud Run , dividing responsibilities between the two services. The Agent Platform serves as the orchestration and intelligence engine, while Cloud Run hosts your custom application logic, front-end UIs, or Model Context Protocol (MCP) servers. By the end of this article, you will be able to: Explain the hybrid architecture and why each layer exists Define an AI agent in code using the Agent Development Kit (ADK) Deploy your app layer to Cloud Run with a single command Choose between online and batch inference for your workload Secure and monitor the whole setup in production New to the underlying concept? Start with Google Cloud's primer: What is AI inference? Prerequisites To follow along hands-on, you will need: A Google Cloud project with billing enabled The gcloud CLI installed and authenticated Python 3.10+ and the ADK installed ( pip install google-adk ) You can also read this purely as an architecture walkthrough; every step is explained, not just shown. 1. The Architectural Blueprint This pattern splits your system into independent, auto-scaling tiers: [ Client / Web UI ] ──> [ Cloud Run Service ] (App Logic / Tool Front End) │ ▼ [ Gemini Enterprise Agent Platform — Agent Runtime ] (Orchestration, Intent Analysis, Memory) │ ▼ [ Managed Inference / Model Garden ] (Gemini 3.x Pro / Flash models) Why split it this way? Each tier scales independently and fails independently. Your web front end can handle a traffic spike without touching the model layer, and you can swap models without redeploying your application code
开发者
gomarc: MARC21 for Go, 4x–11x faster than pymarc
If you work with library data, you work with MARC21 — the length-prefixed binary record format catalogues have run on since the 1960s, complete with a directory of field offsets, subfield delimiters, and a pre-Unicode character encoding called MARC-8 that needs a lookup table with thousands of entries to decode. In Python that problem is solved: pymarc is mature, complete, and pleasant to use. In Go it wasn't. gomarc is a port of pymarc to Go. It covers the binary MARC21 transmission format, MARC-8 to Unicode conversion, MARCXML, and MARC-in-JSON — and on real catalogue exports it runs 4x to 11x faster than the library it was ported from. go get github.com/beyto1974/gomarc@v0.1.0 It reads like pymarc If you know pymarc, you already know this API. Iterate records, pull the fields you want: reader := marc . NewReader ( f ) for { record , err := reader . Next () if errors . Is ( err , io . EOF ) { break } if err != nil { log . Println ( err ) // permissive: bad records are skipped, not fatal continue } title , _ := record . Title () fmt . Println ( title ) } Title , Author , ISBN , ISSN , Subjects , Publisher , PubYear and more are there as methods. For anything else, go at the tag and subfield directly: value , ok := record . Get ( "245" ) . Subfield ( "a" ) for _ , f := range record . GetFields ( "650" ) { fmt . Println ( f ) } Build records, modify them, write them back: record . Get ( "245" ) . SetSubfield ( "a" , "The Zombie Programmer : " ) writer := marc . NewWriter ( out ) writer . Write ( record ) And convert to the formats the rest of your stack can actually read — both use UTF-8 throughout instead of MARC-8, so standard tooling works: s , err := record . AsJSON () // MARC-in-JSON records , err := marc . ParseXML ( r ) // MARCXML Large MARCXML files stream one record at a time via marc.NewXMLReader rather than loading into memory. The numbers Two real catalogue exports — 138,076 records, 166 MB. AMD Ryzen 5 3600, Go 1.25.12, CPython 3.13.5, gomarc v0.1.0, pym
开发者
The pros and cons of using a digital wallet
If you're not yet using the digital wallet -- Apple Wallet or Google Wallet -- on your phone, there are some good reasons to start.
AI 资讯
Booksellers suspect AI firms are buying and then destroying rare books
AI firms quietly bulk buying rare books face resistance from booksellers.
AI 资讯
Google aims for influencers with the Pixel 11 Creator Suite
Google knows creators are a big audience. The occupation is growing fast, and landing some influential names could be a major turning point for the Pixel's market share. This year, Google is building features directly into its new Pixel lineup that it says can help creators record, organize, edit, and publish content faster and more […]
AI 资讯
Spotify Builds External Index to Enable Low Latency Point Queries on Its Data Lake
Spotify introduced external indexing architecture for Apache Parquet data lakes that enables low-latency point queries without replicating datasets into operational databases. The approach maps lookup keys to Parquet files and row locations, allowing targeted reads from cloud object storage while supporting analytics, machine learning, AI applications, and online services from the same datasets. By Leela Kumili
AI 资讯
Everything announced at Made by Google ’26: Pixel 11, Pixel Watch 5, Pixel Tag, and tons of Gemini features
From the Pixel 11 series and a brand new competitor to Apple’s AirTag, here are all the announcements from the Made by Google 2026 event.
AI 资讯
The 7 biggest announcements of Google’s Pixel 11 launch
Google is hosting a Pixel launch event on Wednesday night where it will show off its latest lineup of devices. But you don't have to wait until then for all the news: We were able to check out the devices ahead of the event and take a look at everything Google's unveiling, including the latest […]
开发者
Google’s Quick Share adds a tap-to-share mode
Google's Quick Share feature is getting a tap-to-share mode for quickly exchanging contacts, photos, videos, and more.
开发者
Google’s Pixel Watch 5 Can Now Detect Breathing Emergencies
The company is also adding blood pressure and insulin resistance trends as proactive monitoring tools in the Google Health app.
AI 资讯
Google reveals 2026 hardware lineup: Pixel 11, Pixel Watch 5, and Pixel Tag
Google focuses more on AI and curated experiences than spec upgrades in 2026.
AI 资讯
Google's Pixel 11 phones offer more proactive AI notifications and help
Google is upgrading Gemini Intelligence for its latest hardware release.
AI 资讯
DeepMind's newest model allows Pixel 11 devices to transcribe sign language into text
Google's Pixel 11 lineup will be able to transcribe sign language into text.
AI 资讯
Google makes Quick Share even more like Apple's AirDrop
Now it's just a tap to share contact info, photos or videos between supported devices.
AI 资讯
Google's Pixel Watch 5 gets offline Gemini support, improved GPS-tracking and a slightly higher price
The biggest additions on the Pixel Watch 5 are new health features.
AI 资讯
Pixel 11 camera upgrades include Instant Night Sight and bigger sensors
Google's Pixel 11 cameras provide a nice mix of improved hardware and AI features.
AI 资讯
Google's Pixel Tag is an AirTag for Android phones
Google is taking on Apple's AirTag with its own trackable accessory.
AI 资讯
Google's Pixel 11 Pro and Pro XL are the toughest Pixel phones yet
Camera upgrades, a thinner camera bar and a more powerful processor are available on the Pixel 11 Pro and Pro XL.
开发者
Google's Pixel 11 has a 30-hour battery life and a slimmer camera bar
Long battery life, a slimmer camera bar and a new chip are all on the spec sheet for the Pixel 11.