d-exclaimation / desolate Goto Github PK
View Code? Open in Web Editor NEWA scalable concurrency toolkit for Swift 5.5+
Home Page: https://swift-desolate.netlify.app/documentation/desolate
License: Apache License 2.0
A scalable concurrency toolkit for Swift 5.5+
Home Page: https://swift-desolate.netlify.app/documentation/desolate
License: Apache License 2.0
1.4.0
)1.4.0
)1.4.0
)Source
(1.4.0
)Nozzle
terminationData structure that handle multiple topic stream
Reservoir
, Multiple topic, multiple source / upstream, multiple downstream, single type broadcast stream.Confluence
, Merge combine stream.Cascade
, Merge concat stream.Not sure whether the other two will come just yet or should be suspended to focus on optimizing current code
For some reason, I didn't use the built-in Signal
status on each Desolated actors and declare unnecessary additional boolean state that require management myself. I should opt in using Signal as much as possible as it works nicely automatically and does not require manual state management.
NonStop
from Jet and use the Signal// (removed) private var closed: Bool = false
public var status: Signal = .running
private var flows: [UUID: Flow] = [:]
/// Interface for Desolate
public func onMessage(msg: Act) async -> Signal {
// (removed) guard !closed else { return same }
switch msg {
case .next(let message):
for nozzle in flows.values {
await nozzle.task(with: message)
}
case .complete:
// (removed) closed = true
for queue in flows.values {
await queue.task(with: nil)
}
flows.removeAll()
return .stopped
case .attach(let id, let nozzle):
flows[id] = nozzle
case .detach(id: let id):
flows.removeValue(forKey: id)
}
return .running
}
Removed usage of any fatal error and unsafe mutations to prevent unsuspecting exceptions and behavior
Fatal Error
Unsafe mutation
Jet stream is a pretty unique name to call a reactive stream but it's not that descriptive. There are plenty of names that would fit better and explain the use of the data structures.
At the moment, Nozzle delay request to the Current for new data, but the delay is static and doesn't scale with the computing power.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.