[ovs-dev] [PATCH monitor_cond V4 00/17] Implement conditional monitoring
Liran Schour
lirans at il.ibm.com
Thu Feb 18 11:46:38 UTC 2016
This patch series implements conditional monitoring by introducing an OVSDB
RFC extension with 2 new JSON-RPC methods: "monitor_cond" and
"monitor_cond_update". Specification of this extension is defined in the
ovsdb-server (1) man page.
Monitor2 is now merged into monitor_cond. A monitor_cond session with an empty
condition, will behave exactly like monitor2 and will get update2 notifications
on all rows.
Performance:
JSON cache is enabled only for none-conditional monitoring or true conditons
(explicit or implicit). Table JSON cache is enabled only for none-conditional
tables or for tables with none or true condition.
Tables with conditon with only "==" or "includes" functions, which is the most
common case in conditional monitoring, will track changes according to condition
clauses.
By that we want to achieve insert of new row in O(#clauses) and composing
update notification in O(#cahnges to be sent).
Monior sessions with conditon with funcitons that adre different then boolean
or "=="/"includes", we have no magic to do and we expect that computation will
move from clients side to the server.
v3->v4:
* Enable tracking of changes according to condition's clauses in case of "==" condition
* Enable table JSON cache for tables with true condition
* Add test for conditional monitoring of multiple tables
* Add remove clause API to ovsdb_idl to allow clients iterative workflow
* flake8 fixes
* On composing update on conditon update use ovsdb_row instead of maintaing changes list
of ovsdb_monitor_row
* Add condition utilities for clause tracking
v2-v3:
* monitor_cond_update method receives a single json condition
* Support non-monitored columns in condition
* Simplify IDL API for iteratively build condition by client
* Bug fixes
* Style issues
v1->v2:
* Change monitor_cond_change to monitor_cond_update
* monitor_cond_update spec allows now to change monitored columns (unsupported)
* Use new <json-value> as a session ID as a result of monitor_cond_update command.
* Clarifications in ovsdb-server(1) man page.
* Bug fix in ovsdb_monitor_get_all_rows()
* Fix style issues
Liran Schour (17):
ovsdb: create column index mapping between ovsdb row to monitor row
ovsdb: add conditions utilities to support monitor_cond
ovsdb: allow none monitored columns for condition evaluation
ovsdb: generate update notifications for monitor_cond session
ovsdb: enable JSON cache for none conditional monitored tables
ovsdb-client: support monitor-cond method
ovsdb: enable jsonrpc-server to service "monitor_cond_update" request
lib: add to ovsdb-idl monitor_id
lib: add monitor_cond_update API to C IDL lib
python: move Python idl to work with monitor_cond
tests: add testing for idl conditional monitoring
ovsdb: add FALSE mode for tables with false condition
ovsdb: adjust ovsdb_monitor_changes to hold rows by transaction id XOR
datum
ovsdb: Implement data structure to hold changed rows that matchs
condition's clauses
ovsdb: Add EQ_COND mode to ovsdb_monitor_table
ovsdb: Track changed rows by clauses match
ovsdb: Lazy cleanup of clause matched row changes
NEWS | 3 +-
lib/ovsdb-idl-provider.h | 13 +
lib/ovsdb-idl.c | 250 ++++++++++-
lib/ovsdb-idl.h | 39 ++
ovsdb/condition.c | 231 +++++++++-
ovsdb/condition.h | 24 +
ovsdb/jsonrpc-server.c | 217 +++++++--
ovsdb/jsonrpc-server.h | 2 +-
ovsdb/monitor.c | 1087 ++++++++++++++++++++++++++++++++++++++++++----
ovsdb/monitor.h | 35 +-
ovsdb/ovsdb-client.1.in | 37 +-
ovsdb/ovsdb-client.c | 70 ++-
ovsdb/ovsdb-idlc.in | 336 ++++++++++++++
ovsdb/ovsdb-server.1.in | 230 +++++++++-
ovsdb/ovsdb-server.c | 20 +-
python/ovs/db/data.py | 16 +-
python/ovs/db/idl.py | 176 +++++++-
tests/ovs-vswitchd.at | 8 +-
tests/ovsdb-condition.at | 30 ++
tests/ovsdb-idl.at | 243 ++++++++++-
tests/ovsdb-monitor.at | 207 +++++++++
tests/test-ovsdb.c | 221 +++++++++-
tests/test-ovsdb.py | 27 ++
23 files changed, 3282 insertions(+), 240 deletions(-)
--
2.1.4
More information about the dev
mailing list