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

snappy response #94

Closed
jbenet opened this issue Sep 20, 2014 · 6 comments
Closed

snappy response #94

jbenet opened this issue Sep 20, 2014 · 6 comments

Comments

@jbenet
Copy link
Member

jbenet commented Sep 20, 2014

running a command like ipfs ls or ipfs refs locally feels a ~300ms slower than we could get it. is not doing much beyond reading a few files and printing out stuff, leveldb is pretty fast, so not sure what's up.

@jbenet
Copy link
Member Author

jbenet commented Sep 20, 2014

wooow:

func SendCommand(command *Command, server string) error {
    conn, err := net.DialTimeout("tcp", server, time.Millisecond*300)
        ...
}

I'm apparently good at cli response time.

I think TRTTD here would be to -- instead of trying a random server -- see if there is a local server open by having a $configdir/lock file. possible names:

.go-ipfs/lock
.go-ipfs/daemon
.go-ipfs/rpcaddr

Its content can be a multiaddr with the socket to use to talk to the daemon rpc endpoint:

# unix domain socket
/unix/Users/jbenet/.go-ipfs/ipfs.sock

# or tcp
/ip6/127.0.0.1/tcp/4001 

bradfitz already did the heavy lifting of making a portable lock file lib: https://github.com/camlistore/lock

@whyrusleeping
Copy link
Member

Im really impressed at your latency guess... Ill switch over to using a lockfile for daemon connections!

@whyrusleeping
Copy link
Member

So, the camlistore lock library doesnt allow you to put and file content in the lock file itself. Im thinking we could have the lock file, and another file nearby that contains the daemon addr to connect to

@jbenet
Copy link
Member Author

jbenet commented Sep 22, 2014

Hmm wonder why it is. But yeah can use another file or a config value. (Writing one small file and writing the config are pretty much equiv).—
Sent from Mailbox

On Sat, Sep 20, 2014 at 2:12 PM, Jeromy Johnson notifications@github.com
wrote:

So, the camlistore lock library doesnt allow you to put and file content in the lock file itself. Im thinking we could have the lock file, and another file nearby that contains the daemon addr to connect to

Reply to this email directly or view it on GitHub:
#94 (comment)

@whyrusleeping
Copy link
Member

Ugh... i wish the camlistore lock library had defined error types, it makes it difficult to differentiate between "Bad path to file!" and "Lock already exists!"... i may fork it

@whyrusleeping
Copy link
Member

I beleive this has been solved and merged in...

ribasushi pushed a commit that referenced this issue Jul 4, 2021
Check error returns in tests
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this issue Oct 23, 2021
@aschmahmann aschmahmann mentioned this issue Dec 1, 2021
80 tasks
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Feb 25, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Feb 25, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Mar 4, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Mar 4, 2022
hacdias added a commit that referenced this issue Nov 29, 2023
* feat: add namesys publish options
* feat: export DefaultIPNSRecordEOL
* feat: export DefaultIPNSRecordTTL

This commit was moved from ipfs/interface-go-ipfs-core@468dea4

This commit was moved from ipfs/boxo@bcb9190
hacdias added a commit that referenced this issue Nov 29, 2023
* feat: add namesys publish options
* feat: export DefaultIPNSRecordEOL
* feat: export DefaultIPNSRecordTTL

This commit was moved from ipfs/interface-go-ipfs-core@468dea4

This commit was moved from ipfs/boxo@bcb9190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants