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

basic pubsub commands #2599

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@whyrusleeping
Member

whyrusleeping commented Apr 22, 2016

This is still a WIP. To build and try it out you need to grab the go-libp2p-pubsub dep manually:

go get -d github.com/ipfs/go-libp2p-pubsub
cd $GOPATH/src/github.com/ipfs/go-libp2p-pubsub
gx install --global
gx-go rewrite

The command here is ipfs torch.

License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com

@haadcode haadcode referenced this pull request May 3, 2016

Closed

Sprint: May 3 → May 15 #105

@haadcode

This comment has been minimized.

Member

haadcode commented May 3, 2016

@whyrusleeping updated your comment to fix gx-go install --global --> gx install --global

@haadcode

This comment has been minimized.

Member

haadcode commented May 12, 2016

Sorry for the delay. Notes and feedback:

haad:~/go$ IPFS_PATH=/tmp/pubsub2 ./bin/ipfs torch watch QmP72NBkivfBdyAmUTZExGBTMLt5AGmorQvybsphNQbYSi

Just dies silently. We should probably give an error: "Topic required, eg. 'Qm...abc/topic1'" or something.

haad:~/go$ IPFS_PATH=/tmp/pubsub2 ./bin/ipfs torch watch QmP72NBkivfBdyAmUTZExGBTMLt5AGmorQvybsphNQbYSi/topic1
Error: protocol mismatch in lazy handshake ( na !=
                                                    ^
�����~Y|��,�[���1xչ%�n�/topic1 )

Happens when the topic doesn't exist.

ipfs torch watch <id>     - watch for content from a given publisher

I think this would be clearer if the help text said:
ipfs torch sub <id/topic> - subscribe to a topic from a id

haad:~/go$ IPFS_PATH=/tmp/pubsub1 ./bin/ipfs torch pub --help

    ipfs torch pub <data> - publish some content to watchers

ARGUMENTS:

    <data> - thing to publish

OPTIONS:

    -t, --topic string - topic to publish to.

-t is not optional, it's required. We should change the api or the docs to reflect that. See suggestion below.

ipfs torch pub <data>     - publish some content to watchers

Can we make this ipfs torch pub <topic> <data> - publish some content to a topic?

haad:~/go$ IPFS_PATH=/tmp/pubsub1 ./bin/ipfs torch pub -t topic2 hi
Error: no such topic topic2

Can we do automatic topic creation? Not sure of the security implications, but it'd be required one way or the other I think. If you think of chat rooms, it'd be good to have the possibility to "claim" a channel, ie. create a topic in pubsub.

haad:~/go$ IPFS_PATH=/tmp/pubsub1 ./bin/ipfs torch pub -t topic1 data1111 data2222

Would be cool if I could publish several "chunks" at a time

Noticed also that unix pipes don't work yet. It'd be cool to be able to do something like echo '{Data:"hi"}' | ipfs object put | ipfs torch pub topci1

@noffle noffle referenced this pull request May 20, 2016

Closed

Roadmap #1

0 of 2 tasks complete

whyrusleeping added some commits Apr 5, 2016

basic pubsub commands
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
don't crash if offline
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
update deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>

@whyrusleeping whyrusleeping force-pushed the feat/pubsub branch from add94a9 to da7455f Jul 26, 2016

@whyrusleeping

This comment has been minimized.

Member

whyrusleeping commented Aug 26, 2016

going to close this for now, but keeping the branch around. (do not delete the branch pls)

@whyrusleeping whyrusleeping deleted the feat/pubsub branch Sep 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment