How to maintain record or history of collections ?

28 views
Skip to first unread message

Ajit Singh Rajawat

unread,
Mar 6, 2020, 12:38:04 AM3/6/20
to ArangoDB
I need to maintain a record/history of collections in which i can see previous and updated state of particular document. Is it possible to do so ? If yes, How ?

Aditya Mukhopadhyay

unread,
Mar 6, 2020, 12:56:47 AM3/6/20
to aran...@googlegroups.com

Try https://github.com/RecallGraph/RecallGraph

It is a Foxx microservice for ArangoDB, and is designed exactly for this use case.

Regards,
Aditya Mukhopadhyay
On 06/03/2020 11:08 am, Ajit Singh Rajawat wrote:
I need to maintain a record/history of collections in which i can see previous and updated state of particular document. Is it possible to do so ? If yes, How ?

The information in this email, including all attachments, is confidential and for use by the addressee(s) only.  If you are not the intended recipient, please return the email to the sender and delete it from your computer. --
You received this message because you are subscribed to the Google Groups "ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arangodb/7e3ec7d3-61b5-4b94-a906-3c23d6b01bc5%40googlegroups.com.

Ajit Singh Rajawat

unread,
Mar 6, 2020, 2:43:50 AM3/6/20
to ArangoDB
Hi Aditya,

Thanks for you response. This service is helpful to keep track of collections but as i gone throw it this will only keep track of those document which will be created by its api.

I have my own API to manipulate collections, i want to keep history for all these collections.

If this service have this use case and i missed it will you please provide how to work with it.

On Friday, March 6, 2020 at 11:26:47 AM UTC+5:30, Aditya Mukhopadhyay wrote:

Try https://github.com/RecallGraph/RecallGraph

It is a Foxx microservice for ArangoDB, and is designed exactly for this use case.

Regards,
Aditya Mukhopadhyay
On 06/03/2020 11:08 am, Ajit Singh Rajawat wrote:
I need to maintain a record/history of collections in which i can see previous and updated state of particular document. Is it possible to do so ? If yes, How ?

The information in this email, including all attachments, is confidential and for use by the addressee(s) only.  If you are not the intended recipient, please return the email to the sender and delete it from your computer. --
You received this message because you are subscribed to the Google Groups "ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aran...@googlegroups.com.

Aditya Mukhopadhyay

unread,
Mar 6, 2020, 3:56:57 AM3/6/20
to aran...@googlegroups.com

That is correct. RecallGraph (RG) can only track histories for docs which are written through its own API. In the scenario you have described, unless a database natively supports document versioning OOTB (so that it can intercept all document writes no matter what the source) there is no direct way to enable history tracking.

However, depending on your architecture, one or a combination of the following approaches might yield a viable workaround:

  1. Use arangochair to listen in on incoming writes and REPLICATE them over to RG (installed on a separate database to prevent collection name collisions).
  2. If the data access layer in your application is flexible enough,  add a sink/destination pointing to RG so that your existing API serves as the primary sink, and RG serves as a (possibly async) secondary (this would perform slightly faster than the first approach due to one less round trip, but is harder to implement).

Either approach would incur some data duplication, but lets you integrate RG non-intrusively (and outside of the critical path) into your existing stack. At a later point of time, if things work smoothly enough with RG, you may even choose to discard your primary sink altogether.

Regards,
Aditya Mukhopadhyay
To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arangodb/0be11626-f718-49c3-b8c5-87352ce67b02%40googlegroups.com.

Jan Stücke

unread,
Mar 6, 2020, 6:15:54 AM3/6/20
to aran...@googlegroups.com
Hi Ajit,

in addition to what Aditya said already about RecallGraph

ArangoDB does not support automatic storage of the different versions of a given document. You would have to store separate documents for each version.

Maybe you can find some starting points for your use case in this tutorial about doing versioning with graph datasets: https://www.arangodb.com/arangodb-training-center/graphs/time-traveling-graph-databases/

If you really want to go down the rabbit hole of the computer science behind this approach https://www.arangodb.com/2018/07/time-traveling-with-graph-databases/

Hope 

Best regards, Jan

To unsubscribe from this group and stop receiving emails from it, send an email to arangodb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arangodb/0be11626-f718-49c3-b8c5-87352ce67b02%40googlegroups.com.


--

Jan Stücke
Head of Communications
Reply all
Reply to author
Forward
0 new messages