{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:golang/github.com/rulego/streamsql","name":"github.com/rulego/streamsql","description":"Package streamsql is a lightweight, SQL-based IoT edge stream processing engine.\n\nStreamSQL provides efficient unbounded data stream processing and analysis capabilities,\nsupporting multiple window types, aggregate functions, custom functions, and seamless\nintegration with the RuleGo ecosystem.\n\n• Lightweight design - Pure in-memory operations, no external dependencies\n• SQL syntax support - Process stream data using familiar SQL syntax\n• Multiple window types - Sliding, tumbling, counting, and session windows\n• Event time and processing time - Support both time semantics for accurate stream processing\n• Watermark mechanism - Handle out-of-order and late-arriving data with configurable tolerance\n• Rich aggregate functions - MAX, MIN, AVG, SUM, STDDEV, MEDIAN, PERCENTILE, etc.\n• Plugin-based custom functions - Runtime dynamic registration, supports 8 function types\n• RuleGo ecosystem integration - Extend input/output sources using RuleGo components\n\nBasic stream data processing:\n\nStreamSQL supports multiple window types:\n\nStreamSQL supports two time semantics for window processing:\n\n## Processing Time (Default)\n\nProcessing time uses the system clock when data arrives. Windows are triggered based on data arrival time:\n\n## Event Time\n\nEvent time uses timestamps embedded in the data itself. Windows are triggered based on event timestamps,\nallowing correct handling of out-of-order and late-arriving data:\n\n## Watermark and Late Data Handling\n\nEvent time windows use watermark mechanism to handle out-of-order and late data:\n\nKey concepts:\n• MaxOutOfOrderness: Affects watermark calculation, delays window trigger to tolerate out-of-order data\n• AllowedLateness: Keeps window open after trigger to accept late data and update results\n• IdleTimeout: When data source is idle (no data arrives within timeout), watermark advances based on processing time to ensure windows can close\n• Watermark: Indicates that no events with timestamp less than watermark are expected\n\nStreamSQL supports plugin-based custom functions with runtime dynamic registration:\n\nSupported custom function types:\n• TypeMath - Mathematical calculation functions\n• TypeString - String processing functions\n• TypeConversion - Type conversion functions\n• TypeDateTime - Date and time functions\n• TypeAggregation - Aggregate functions\n• TypeAnalytical - Analytical functions\n• TypeWindow - Window functions\n• TypeCustom - General custom functions\n\nStreamSQL provides flexible log configuration options:\n\nStreamSQL provides deep integration with the RuleGo rule engine through two dedicated components for stream data processing:\n\n• streamTransform (x/streamTransform) - Stream transformer, handles non-aggregation SQL queries\n• streamAggregator (x/streamAggregator) - Stream aggregator, handles aggregation SQL queries\n\nBasic integration example:","version":"v0.10.7","softwareVersion":"v0.10.7","license":"https://spdx.org/licenses/Apache-2.0","codeRepository":"https://github.com/rulego/streamsql","issueTracker":"https://github.com/rulego/streamsql/issues","url":"https://github.com/rulego/streamsql","programmingLanguage":{"@type":"ComputerLanguage","name":"Go"},"dateCreated":"2025-07-27","dateModified":"2026-01-19","datePublished":"2026-01-19","copyrightYear":2025,"downloadUrl":"https://proxy.golang.org/github.com/rulego/streamsql/@v/v0.10.7.zip","softwareHelp":{"@type":"WebSite","url":"https://pkg.go.dev/github.com/rulego/streamsql#section-documentation"},"applicationCategory":"go","runtimePlatform":"go","developmentStatus":"active","sameAs":["https://pkg.go.dev/github.com/rulego/streamsql"],"https://www.w3.org/ns/activitystreams#likes":46,"https://forgefed.org/ns#forks":4}