docker / libchan

Like Go channels over the network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proposal: Use context throughout libchan

pnasrat opened this issue · comments

In libchan we need a way to seamlessly carry trace, debugging, cancellation and other data across boundaries - whether that be process, goroutine or RPC.

The code.google.com/p/go.net/context package provides wiring to do this.
References http://blog.golang.org/context

If libchan can be seamlessly used over unix socket, go channels, etc a standardized mechanism for propagating scoped values, cancelation signals, and deadlines, etc across the boundaries would be awesome.

I'm happy to do the work but not sure if this is something people feel a need for at the moment

@shykes @dmcgowan ?

There might be some overlap here with the proposal for logging and debugging but worth keeping separate. I think as we get closer to moving libchan into other projects this will be an important part of debugging. I think first off we need to figure out if these contexts are something that just need to be added as objects which are passed along as any other object or whether contexts should be transient and either we find a way to attach them to channel identifiers or make a protocol update.