How to implement revisioning in my own module? In my module I store some node related data in a specific table of the database. Now I want to implement the revisioning system, so I create my_table_revision with the same information and a new column called revision_id.

But, How can I know when a new revsion of the node is created? and how can I know when a node revision is reverted?

It exists something like hook_revert() or hook_revision?
As Clive says, you need to create a custom entity (with the API) to hold the data. Then Drupal will create the necessary tables and take care of the versioning for you.

If you need to do special things (that is not already done by Drupal's built-in versioning), you can intercept both saving of new revisions and reversals with hook_entity_update.

AFAIK, there is no simple way to tell a new revision apart from a reversal.  Technically, a reversal results in a new revision with a new version ID (vid) being created, where the content of the new revision just happens to be identical to some old revision.

If it is really important for you to tell them apart, I guess you could keep a table with SHA2 (or MD5) hash signature for each revision, and look up the signature in that table to identify a reversal.

For the sake of completeness, I'll also mention that I've observed than when someone do a reversal, a log message is generated and placed in {node_revision.log} (E.g. "Copy of the revision from &lt;em class="placeholder"&gt;Thu, 2014-06-19 13:53&lt;/em&gt;.". Otherwise, this field is filled in with a user-written change notice (or left blank). You may be able to use this to detect reversals, but IMHO this method is not reliable as the string can easily be spoofed by a user who knows about this.