Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Persistence Layer on top of PubSub #33

Merged
merged 28 commits into from
Aug 19, 2019
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
43ebd02
removed bootstrapping functionality
aschmahmann May 12, 2019
f57d48c
start pubsub validator changes to implement LWW pubsub
aschmahmann May 22, 2019
e2a5fca
Merge branch 'master' into feat/persistence
aschmahmann May 31, 2019
ff89016
Implement persistence --temporary
aschmahmann Jun 14, 2019
90c980a
Added message protobuf that was missing from previous commit
aschmahmann Jun 21, 2019
3ae7b1f
Use changes from ongoing pubsub PRs
aschmahmann Jul 3, 2019
6fb9435
removed unused protobufs
aschmahmann Jul 3, 2019
f3f8dd4
records past EOL should fail
aschmahmann Jul 3, 2019
9e9d778
reorder imports
aschmahmann Jul 3, 2019
a24054d
Improved the get-latest protocol (protobufs for request and response,…
aschmahmann Aug 9, 2019
092d0e1
better context cancel in get-latest protocol
aschmahmann Aug 9, 2019
3bf24fa
restore bootstrapping ... for now
aschmahmann Aug 9, 2019
e9b0864
In get-latest tests wait a bit after connecting hosts so they have ti…
aschmahmann Aug 9, 2019
f85f2bc
Changed get-latest protocol to have responses with a status code.
aschmahmann Aug 9, 2019
9756263
get-latest responds with ERR message even when sender sends an incorr…
aschmahmann Aug 9, 2019
a4d4d6c
Removed ERR from protobuf and we just reset the stream when we encoun…
aschmahmann Aug 9, 2019
97ac549
protobuf Makefile supports spaces in path name
aschmahmann Aug 9, 2019
b0eeb77
fixed potential goroutine leak. switched order of protobuf fields.
aschmahmann Aug 11, 2019
4fbc97b
Small Makefile refactor
aschmahmann Aug 11, 2019
aa737d1
changed get-latest protocol to be called fetch. some refactoring
aschmahmann Aug 12, 2019
ded823d
renamed protocol files to match protocol rename
aschmahmann Aug 12, 2019
76d8fca
made function passed into the fetch protocol a typedef
aschmahmann Aug 14, 2019
1913974
renames in the fetch protobufs
aschmahmann Aug 15, 2019
fdbeaec
Makefile is more MSYS friendly but you still need a weird GOPATH
aschmahmann Aug 15, 2019
b303f91
Updated go.mod to use unreleased version of pubsub. Refactored Fetch …
aschmahmann Aug 16, 2019
0787cb5
rebroadcast initial delay using timer
aschmahmann Aug 16, 2019
41f6fb8
Added Error status code to Fetch protobuf. Currently unused.
aschmahmann Aug 16, 2019
981b38c
use go-libp2p-pubsub v0.1.1. Fix `Fetch` function to be a pointer rec…
aschmahmann Aug 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
better context cancel in get-latest protocol
aschmahmann committed Aug 9, 2019
commit 092d0e188d68f0755948113cf26cc5b4877f7697
4 changes: 3 additions & 1 deletion getlatest.go
Original file line number Diff line number Diff line change
@@ -65,7 +65,9 @@ func (p *getLatestProtocol) Receive(s network.Stream, getLocal func(key string)
}

func (p getLatestProtocol) Send(ctx context.Context, pid peer.ID, key string) ([]byte, error) {
peerCtx, _ := context.WithTimeout(ctx, time.Second*10)
peerCtx, cancel := context.WithTimeout(ctx, time.Second*10)
defer cancel()

s, err := p.host.NewStream(peerCtx, pid, PSGetLatestProto)
if err != nil {
return nil, err