Comments (5)
Just wanted to add something here:
The main challenge with the adapters is the way to block on put
. The RxJS/Observable way of fire and forget is relatively trivial to implement.
from js-csp.
I like the idea of adapters but I don't know if the name is appropriate.
I think that we need to decide about the error handling (#14) before implementing things.
from js-csp.
I don't fully understand the problem; you just need to implement whatever kind of inter-process communication you want, and provide a channel as the interface. I wouldn't implement the channel interface, I would just provide a real channel that the backend listens for puts and takes and dispatches those to the backend implementation of sending/receiving values.
from js-csp.
@jlongster Yes I agree. This kind of "adapters" has nothing to do with the core lib. We can just have another module that can take i/o from and to channels.
from js-csp.
@jlongster @zeroware I think I wasn't clear in that I don't think the adapters themselves should be a part of the core lib.
I've been doing some research on this. Most solutions for inter-process communication, as well as most async solutions for javascript have one thing in common — fire and forget.
RXjs, BaconJS, Redis, Web Workers, Node Child Processes etc. In all cases, when you fire an event or publish a value on a stream, you don't wait for a listener.
Channels are unique in their ability to block on put
. I think there should be an official way to map the usual fire and forget method to a block on put.
So far the only solution I can think of is to send a message and then wait for a confirmation response. Would love to hear your thoughts.
from js-csp.
Related Issues (20)
- getting started - how to run examples? HOT 8
- [question] take/put vs JS event loop HOT 2
- cannot 'npm run build' on linux or mac HOT 5
- Determine whether an object is a Channel
- External termination of goroutines HOT 2
- Exception unhandling
- react create app uglify errror HOT 4
- Major bug: proc is yielding first pending value when channel is closed but skipping the rest HOT 36
- High level explanation HOT 2
- Destructuring missing in transpilation? HOT 2
- BaconJS examples? HOT 8
- bug related to close in v1 HOT 19
- throttle and debounce HOT 2
- Golang like Context HOT 4
- Bubble Burster Game example
- Failed to minify code : Create React App Build Error HOT 2
- Question: similarities to parallelLimit() HOT 2
- interest in maintaining HOT 2
- Happy to be a maintainer HOT 8
- Maintainers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-csp.