Comments (9)
truth
from libchan.
@rade When one waits on a libchan receiver, the caller blocks until a message is received. Ignoring issues with the network, this plays the analog of a blocked channel. This is one of the building blocks of channel-based synchronization in Go that are mirrored by features in libchan.
What features are missing from libchan that could make the tagline true? Or are you just interested in resolving a minor semantic inconsistency?
from libchan.
@stevvooe something still needs to be done to resolve this issue. Either documentation needs to be clear that the primitive libchan channel does not have go semantics, libchan protocol needs to be updated to define synchronization on the primitive channel, or an example needs to be added to highlight using libchan for synchronization such as you suggested.
Right now I think adding an example makes sense, I am still not sold one way or the other about having the libchan channels be synchronized. It adds complexity and in many cases it might not be desired to use (even if its cleaner semantically). Now that others are integrating and using libchan, I will let this issue be a place to discuss use cases and needs around synchronization and go semantics.
from libchan.
What features are missing from libchan that could make the tagline true? Or are you just interested in resolving a minor semantic inconsistency?
Go channels have a user-definable, precise capacity.
Go channels support blocking 'send'.
Go channels support 'select'.
from libchan.
@rade Thank you for the feedback!
Regarding blocking send and channel capacity, I not sure how we could faithfully implement these over the network and keep things simple. We may want to add a "differences from Go channels" section and call these out specifically.
Regarding select
, I've filed #76. Thats a good idea and generally useful.
from libchan.
Regarding blocking send and channel capacity, I not sure how we could faithfully implement these over the network and keep things simple.
I don't think you can.
from libchan.
So I'm guessing libchan 'send' semantics is more like go's async send, i.e. it's really
select {
case ch <- msg:
default:
}
i.e. it's non-blocking and it can lose messages (even in the absence of network/process failure). Right?
It would be quite important to state that in the docs.
Also note that if there was a blocking send, or a guarantee of no message loss in the absence of network/process failure, then a faithful implementation of select
would require distributed consensus.
from libchan.
Adding this to 0.2.0 along with updated protocol. The semantics should be clearly defined along with the differences between Go channels. The 0.2.0 protocol PR attempts to lay out it more clearly, the README needs quite a bit of attention still.
from libchan.
Using go channels with location transparency is impossible for two reasons:
1 - it is not implemented in the core language
2 - You cannot override the "->" operator. If I WAS the responsible person for the language's design, there would be a way to implement some interface that allows you to use a custom object as a channel, indistinctly. Something similar to implementing iterable objects that can be looped through a foreach, in any language.
Therefore I don't see a point in this issue. Having channels with location transparency isn't achievable, therefore something like libchan is the best we can have.
Please someone correct me if I'm wrong.
from libchan.
Related Issues (20)
- undefined: spdy.NewClientTransport HOT 1
- How to migrate code from v.0.1.0 version ? HOT 2
- how to set timeout when send a message? HOT 1
- Add example using websockets HOT 1
- WebRTC data channel support HOT 7
- Enable Sourcegraph
- pub/sub broker implementation HOT 2
- Calling Send() with large objects errors out in the spdy implementation
- Prosposal: enhanced logging and debugging HOT 2
- handling many request types HOT 18
- libchan.Pipe and spdy.Pipe have different return value order HOT 1
- Add channel select capability HOT 3
- Anonymous embedded structs aren't supported HOT 2
- HTTP/2 transport HOT 5
- SSH stream provider implementation
- Go chan encode/decode
- Support CBOR
- Add synchronous and buffered send channels
- Use Go channels with libchan.Pipe HOT 1
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 libchan.