question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TTL for Documents with Hook for automatic Clean Up Code [moved]

See original GitHub issue

Hi
A requested feature in the Orient Group was a TTL / Tombstone Feature in OrientDB. This would be a great functionality and should at least have following possibilities:

Define TTL while Document Creation 
Set TTL after Document Creation 
Set TTL to "Tombstone" Value (ex. -1) for automatic 

Have a hook - which could be used to access this feature - so different use cases are possible:

Archiving Doc - to another database (out of hot "Data")
Search for linked "Docs" to this Record - to not break Integrity 
Flag Doc for Cleaning 
Track Doc "Deletion" for compress the database while online 

Hope this is enough information on this Michael

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dmarcelinocommented, Mar 25, 2015

👍 for this

Another way to implement it is to only delete the document when reading it. So:

  1. find the document
  2. verify if expired
    • if expired delete it
  3. return query result

This way there are no tasks running continuously. Though we could probably have a task running every few hours to delete expired tokens with the purpose of saving space.

0reactions
Solidocommented, Nov 13, 2015

As a heavy user of NoSQL this feature is not at ‘low priority’ for me 😉

Simple example working with User Session. Having TTL in OrientDB make it quite a pleasure, just create a Session document with User as a linked field when login succeed. When a request arrive check for the session asking directly to OrientDB. Yeah Quick WIN !

Without OrientDB 😕

1 -> put a non distributed session cache in your application -> no more stateless app 2 -> install a distributed cache with TTL : Redis, HBase, EHCache, whatever Go apps, etc. Duplicate repositories and administration 3 -> ‘easily’ implement it in OrientDB, more logic that do not belongs to my business

The implementation need to provide events listeners so we can follow what’s going on.

I love OrientDB and use it in production right now but this feature is really missing. Thank you for you attention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to implement TTL-based cleanup to expire data in a KTable
In this tutorial, learn how to implement TTLs to expire data in a KTable using Kafka Streams, with step-by-step instructions and examples.
Read more >
Set up Automatic Removal for Time Series Collections (TTL)
The background task that removes expired buckets runs every 60 seconds. Therefore, documents may remain in a collection during the period between the...
Read more >
Examples of S3 Lifecycle configuration - AWS Documentation
When you specify the Days tag, Amazon S3 automatically performs ExpiredObjectDeleteMarker cleanup when the delete markers are old enough to satisfy the age ......
Read more >
TTL Documents, Shield and Found | Elastic Blog
This means that setting the _ttl for a document to anything under 60 seconds won't actually delete the document until 60 seconds has...
Read more >
Optimize costs by automatically managing the data lifecycle
Use Azure Storage lifecycle management policies to create automated rules for moving data between hot, cool, and archive tiers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found