[
https://issues.apache.org/cayenne/browse/CAY-971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrus Adamchik updated CAY-971:
--------------------------------
Summary: ROP GraphDiff "compressor" (was: deduplicate
NodePropertyChangeOperations in ROP commit)
Started thinking about a possible algorithm for "compressing" client-side
GraphDiffs, to remove redundant objects form the list of diffs... Here is how I
see it now:
1. First pass through the diff list
* cancel simple property change diffs preceding any given simple property
change diff (matching nodeid and property name)
* cancel pairs of complimentary arcCreated/arcRemoved and
arcRemoved/arcCreated pairs (matching src node id, target node id, arc name)
2. Second pass through the diff list
* cancel all simple property and arc changes for deleted objects
* cancel complimentary insert and delete diffs
> ROP GraphDiff "compressor"
> --------------------------
>
> Key: CAY-971
> URL: https://issues.apache.org/cayenne/browse/CAY-971
> Project: Cayenne
> Issue Type: Improvement
> Components: Cayenne Core Library
> Reporter: Ari Maniatis
> Assignee: Andrus Adamchik
>
> In ROP, NodePropertyChangeOperation events are sent from the client to the
> server on commit. These make up a ObjectContextChangeLog and are applied in
> order on the server. However this results in excess network traffic in
> situations where the client application might update attributes many times
> before commit. In our case, we update on every keystroke.
> Currently, ObjectContextChangeLog is an ArrayList of GraphDiffs
> (NodePropertyChangeOperations in this situation). Markers seem to also
> separate groups of GraphDiffs (is this for rollback and nested transactions?)
> Should this become an ArrayList of markerGroups, each of is a
> Map<ObjectAttribute, GraphDiff> and therefore redundant events will not end
> up in the ObjectContextChangeLog? Or is this too simplistic...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.