-
Notifications
You must be signed in to change notification settings - Fork 82
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
RFE: "seq_file" param to store change.seq and initial "since" value #42
Comments
Also: I'd be happy to send a patch of course, but I wasn't sure at a cursory glance where to put it in the code. Any pointer would be great! |
@isaacs How would you feel if Follow stored its checkpoints in the remote database, in a non-replicating local document? In this case you would provide some sort of "follow ID" (maybe by default it is os.hostname). Follow already does a bit of pre-follow sanity checking so I think the _local query would have little if any latency cost. {
db: myCouch,
client_id: "i am still awesome"
} |
That'd also be a nice feature, but the cool thing about a sequence file is that I can easily set it at a certain point, or scp it to a new server, etc. If follow always defaulted the client_id to a specific field, then it gets a little more confusing. I have a bunch of followers of the npm registry, for example, all on the same hostname, doing different things. In some cases, I might want to copy the sequence file from one to another, etc. Files are a little bit easier to reason about, and don't impose a remote semantics issue. Otoh, for some cases, it might definitely make sense to have a remote sequence ID. In that case, it'd be best to NOT default to anything, though. Just make it an option, like you could do either |
Yeah you've persuaded to KISS. Remote sequence ID can come later; or maybe I will have to glance at the code again but this belongs somewhere in the For how to store it in the file, I'm not sure. Either a Feed object could Incidentally, is Follow the reason your program is crashing? It should not On Fri, Dec 27, 2013 at 1:57 AM, Isaac Z. Schlueter <
|
@isaacs I plan to allow a seqfile instance or filepath of sorts to be used in the refactor for |
@jcrugzz Kewl! You may want to check out http://npm.im/seq-file, if it's useful for you. It makes sure that the saves are atomic, which prevents spurious restarts at 0 when crashing mid-write. |
@isaacs yep that's what I'm referring to :) |
@jcrugzz What 1.0.0 refactor are you talking about? Thanks. |
@jhs I have a |
I find myself doing this every time I use follow:
It's not that important to make sure that every sequence ID is saved, and of course, a lot in rapid succession will NOT be saved. But, I write follow scripts with the intent of them being crash-only and picking up where they leave off on a crash. Couch is great for this, and it'd be awesome if follow made it easier.
Ideal API:
The text was updated successfully, but these errors were encountered: