Logging document changes to file system

30 views
Skip to first unread message

Robert Labrie

unread,
Nov 24, 2015, 10:22:10 AM11/24/15
to RavenDB - 2nd generation document database
I might have to make this, but I decided to ask first. Is there any way to write out a document to the file system every time it changes? So if I had something like "people/robert" whenver it changed, it'd get written out to "C:\docs\people\robert.yyyyMMddhhmmssfff.json"?

Kijana Woodard

unread,
Nov 24, 2015, 10:27:21 AM11/24/15
to rav...@googlegroups.com
What is the goal for doing this?
Would the versioning bundle be more appropriate?

On Tue, Nov 24, 2015 at 9:22 AM, Robert Labrie <robert...@gmail.com> wrote:
I might have to make this, but I decided to ask first. Is there any way to write out a document to the file system every time it changes? So if I had something like "people/robert" whenver it changed, it'd get written out to "C:\docs\people\robert.yyyyMMddhhmmssfff.json"?

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tal Weiss

unread,
Nov 24, 2015, 10:41:17 AM11/24/15
to RavenDB - 2nd generation document database
The best way to achieve this would be to use Subscription 
see:
and add the writes to the FS in the handler.

--

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Tal Weiss l Core Team Developer Mobile:+972-54-802-4849

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811l Skype: talweiss1982

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/ 

Chris Marisic

unread,
Nov 24, 2015, 12:30:33 PM11/24/15
to RavenDB - 2nd generation document database
I think forking the versioning or replication bundles would likely be a better starting point.

Robert Labrie

unread,
Nov 24, 2015, 1:24:18 PM11/24/15
to RavenDB - 2nd generation document database
Hi, thanks for your replies. The purposes are mainly for troubleshooting applications which are backed by Raven, so that we can see the shape of documents that change when users report issues. Currently I use a scheduled task to just grab the document once a minute. So there is no existing feature, but you say the replication bundle would be a good starting point? I'm guessing there is some sort of hook mechanism I can get whenever a document is written?

Kijana Woodard

unread,
Nov 24, 2015, 2:21:13 PM11/24/15
to rav...@googlegroups.com
You could say that the versioning bundle is such a feature.
Every version of the document is kept.

Michael Yarichuk

unread,
Nov 25, 2015, 2:17:47 AM11/25/15
to RavenDB - 2nd generation document database
Except for the requirement to write on a filesystem the changed documents, I'd say it sounds very much like versioning bundle.
Is there a reason to write them on a filesystem, and not store their revisions in a database as separate documents?
Best regards,

 

Michael Yarichuk

RavenDB Core Team

Tel: 972-4-6227811

Fax:972-153-4-6227811

Email : michael....@hibernatingrhinos.com

 

Reply all
Reply to author
Forward
0 new messages