मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)19k · #10489

iii-stream

यह क्या करती है

यह स्किल real-time डेटा को नामित streams में सहेजती है और बदलाव जुड़े हुए clients तक भेजती है, ताकि लाइव सुविधाओं को polling की ज़रूरत न पड़े। यह मौजूदा iii सिस्टम बनाए रखने वाले डेवलपरों के लिए है, क्योंकि यह worker deprecated है और हटाया जाएगा।

कब इस्तेमाल करें

  • ✓जब आप ऐसा मौजूदा iii सिस्टम संभाल रहे हों जो पहले से streams इस्तेमाल करता है।
  • ✓जब आपको लाइव फ़ीड चाहिए जो subscribers को अपडेट भेजे।
  • ✓जब आप किसी streaming सुविधा को नए तरीके पर ले जाने की योजना बना रहे हों।

Skill का लिंक

https://github.com/iii-hq/iii/blob/main/engine/src/workers/stream/skills/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/iii-hq/iii/blob/main/engine/src/workers/stream/skills/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“दिखाइए कि मौजूदा iii stream subscribed clients को अपडेट कैसे भेजता है, ताकि मैं माइग्रेशन की योजना बना सकूँ।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

worker आइटम तीन स्तरों के ढाँचे में सहेजता है, और हर बदलाव को उस stream के subscribed clients को भेजता है। client के जुड़ते समय एक authorization जाँच चल सकती है। फ़िलहाल उसका व्यवहार नहीं बदला है, और माइग्रेशन मार्गदर्शन उसके दस्तावेज़ से जुड़ा है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

iii-stream

Deprecated. iii-stream is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams

The iii-stream worker stores real-time data as a three-level hierarchy (stream_name -> group_id -> item_id) in the configured adapter and exposes two surfaces: a CRUD-shaped stream::* function namespace for reading and writing items, and reactive trigger types (stream, stream:join, stream:leave) that fire on data changes and on WebSocket subscriber connect/disconnect. Reactive backends are built by binding handlers to those triggers rather than by polling.

A write persists the new value, dispatches matching stream triggers on a spawned task (fire-and-forget, so the originating call returns before handlers finish), and broadcasts the change to every WebSocket client subscribed to that (stream_name, group_id). The stream:join trigger doubles as an authorization gate: returning { unauthorized: true } from its handler rejects the subscription before any data flows. Pair it with the worker's auth_function config, which runs once per WebSocket handshake and stamps a context value into every join/leave event.

Adapters: kv (default; in-memory or file-backed; single-instance only, no cross-process fan-out) or redis (required for multi-instance fleets that need real-time fan-out). Browser and client subscriptions use the Browser SDK (iii-browser-sdk), which subscribes to stream changes over a single engine WebSocket. Connecting directly to the stream port (ws://host:{port}/stream/{stream_name}/{group_id}) is deprecated in favor of the Browser SDK.

When to Use

  • A stream change should kick off side effects elsewhere (derived projections, audit logs, notifications) without polling stream::list.
  • You need to gate WebSocket subscriptions server-side instead of trusting client-side filtering.
  • You want server-side reactions to subscriber connect/disconnect for presence counters, per-subscription rate buckets, or audit trails.
  • An item needs atomic partial updates that concurrent writers would otherwise race on.

Boundaries

  • Not a general key/value store — data is stream-shaped (stream_name/group_id/item_id). Use the standalone state worker for scope/key values.
  • The default kv adapter does not fan out across processes; multi-instance fleets that need real-time broadcast must use redis.
  • stream:leave is not an authorization gate — the subscription is already gone by the time it fires, and its return value is ignored.
  • Trigger handlers run after the originating write returns; a handler failure neither rolls back the write nor surfaces to the caller.

Functions

  • stream::set — persist an item and broadcast a create/update event; returns the previous value alongside the new one.
  • stream::update — atomically apply ordered set/merge/increment/decrement/append/remove ops to an existing item.
  • stream::delete — remove an item and broadcast a delete event carrying the removed value.
  • stream::send — broadcast a transient event to a group's subscribers without persisting it (typing indicators, cursor positions).
  • stream::get — read one item by its full (stream, group, item) triple.
  • stream::list — enumerate items in a group.
  • stream::list_groups — enumerate groups in a stream.
  • stream::list_all — enumerate every stream's metadata.

Reactive triggers

Bind a stream-family trigger when a function should run automatically on stream activity — without polling stream::list. Three types cover two concerns: stream reacts to data changes, while stream:join / stream:leave react to WebSocket subscriber lifecycle.

Reach for them when:

  • A set/update/delete/send should drive a projection, audit log, or downstream notification.
  • Subscriptions need server-side authorization (stream:join) or paired setup/teardown (stream:join + stream:leave).

If you only need the current value on demand, call stream::get instead of binding a trigger.

How to bind

  1. Register a handler: iii.registerFunction('presence::on-change', handler).
  2. Register the trigger:
iii.registerTrigger({
  type: 'stream',
  function_id: 'presence::on-change',
  config: {
    stream_name: 'presence',  // required for `stream`; the worker indexes triggers by it.
    group_id: 'room-1',       // optional. Empty/omitte
अक्सर पूछे जाने वाले सवाल

क्या यह worker अभी भी समर्थित है?

यह deprecated है और आने वाले release में हटा दिया जाएगा, हालाँकि फ़िलहाल इसका व्यवहार वैसा ही है।

माइग्रेशन गाइड कहाँ है?

worker के दस्तावेज़ में iii साइट पर माइग्रेशन गाइड का लिंक है।

क्या यह कई server processes में चल सकता है?

केवल Redis adapter के साथ, क्योंकि डिफ़ॉल्ट स्टोरेज processes के बीच अपडेट साझा नहीं करता।

जानकारी

लेखक का मूल विवरण

Durable real-time streams with a CRUD function surface plus reactive triggers that fire on item changes and WebSocket subscriber lifecycle — reach for it to build live backends without polling. iii-stream is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams

repo: iii-hq/iii

लोकप्रियता

GitHub स्टार
19k
रैंकिंग में स्थान
#10489
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

iii-sandbox

19k

आपके एजेंट को अविश्वसनीय या AI से बने कोड को एक अस्थायी, अलग-थलग virtual machine के भीतर सुरक्षित रूप से चलाने में मदद करती है, और काम खत्म होने पर उसे हटा देती है।

कोडिंगसामान्य कोडिंग

configuration

19k

आपके एजेंट को नामित कॉन्फ़िगरेशन मानों की एक साझा रजिस्ट्री सेट करने देती है, जिसे schema से जाँचा जाता है, ताकि workers बदलावों को पढ़ सकें और उन पर प्रतिक्रिया दे सकें।

कोडिंगAPI और सर्वर (backend)

iii

19k

आपके एजेंट को iii workers कैसे काम करते हैं यह सिखाती है, ताकि वह पहले मौजूदा चीज़ें जाँचकर, फिर worker बनाकर कोई क्षमता जोड़ सके।

कोडिंगसामान्य कोडिंग

iii-observability

19k

आपके एजेंट को iii engine में tracing, संरचित logs, metrics और alerts जोड़ने में मदद करती है, OpenTelemetry इस्तेमाल करके ताकि आप देख सकें कि क्या हो रहा है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

मिलती-जुलती skills