Broker Bro’s New Communication Library Robin Sommer ICSI / LBNL / Broala robin@icsi.berkeley.edu robin@broala.com http://www.icir.org/robin
Bro Communication 2 Broker
Bro Communication Exchanging Events Separates event generation from handling. 2 Broker
Bro Communication Exchanging Events Separates event generation from handling. Logging Remotely Aggregates logs on remote side. 2 Broker
Bro Communication Exchanging Events Separates event generation from handling. Logging Remotely Aggregates logs on remote side. Distributing State Provides shared view across instances. 2 Broker
Bro Communication Exchanging Events Separates event generation from handling. Logging Remotely Aggregates logs on remote side. Distributing State Provides shared view across instances. 2 Broker
Use Case: Bro Cluster Bro Manager Logs & Events Bro Bro Bro Worker 1 Worker 2 Worker 3 Load-balanced Traffic Stream 3 Broker
Use Case: Bro Cluster Bro Bro Manager Proxy Logs & Events &synchronized State Bro Bro Bro Worker 1 Worker 2 Worker 3 Load-balanced Traffic Stream 3 Broker
Use Case: External Integration Bro Events Application Application Application A B C 4 Broker
Traditional Implementation Events Logs State Updates Bro A Bro B 5 Broker
Traditional Implementation Events Logs State Updates Child Child Bro A Bro B Process Process 5 Broker
Traditional Implementation Events Logs State Updates Child Child Bro A Bro B Process Process Events libbroccoli C Python Ruby Perl 5 Broker
Traditional Implementation Events Logs State Updates It’s showing its age … Race conditions with &synchronized. Child Child Bro A Bro B No good persistence story. Process Process Not much control over data flow. Events Complex & inefficient protocol. Implementation deficiencies. libbroccoli Two independent implementations. C Python Ruby Perl 5 Broker
Introducing the Broker Library Events Logs State Updates Bro A Bro B 6 Broker
Introducing the Broker Library Events Logs State Updates Bro A Broker Broker Bro B 6 Broker
Introducing the Broker Library Events Logs State Updates Bro A Broker Broker Bro B Broker C C++ Application Python 6 Broker
Introducing the Broker Library Events Logs State Updates Broker Bro A Broker Broker Bro B Unified Library New protocol Broker Publish/subscribe C Limiting type system’s flexibility. C++ Application Explicit state operations. Python 6 Broker
Exchanging Events with Broker my_event(“Bro”, 42) Bro Broker Broker Bro Sender Receiver 7 Broker
Exchanging Events with Broker Topic: “bro/event” my_event(“Bro”, 42) Bro Broker Broker Bro Sender Receiver 7 Broker
Exchanging Events with Broker subscribe_to_events(“bro/event”) Topic: “bro/event” my_event(“Bro”, 42) Bro Broker Broker Bro Sender Receiver 7 Broker
Exchanging Events with Broker subscribe_to_events(“bro/event”) Topic: “bro/event” my_event(“Bro”, 42) Bro Broker Broker Bro Sender Receiver my_event(“Bro”, 42) 7 Broker
Exchanging Events with Broker subscribe_to_events(“bro/event”) Topic: “bro/event” my_event(“Bro”, 42) my_event(“Bro”, 42) Bro Broker Broker Bro Sender Receiver my_event(“Bro”, 42) 7 Broker
Exchanging Events with Broker Demo 8 Broker
Forwarding Logs with Broker Log::write(…) Bro Broker Broker Bro Sender Receiver 9 Broker
Forwarding Logs with Broker Topic: “bro/log” Log::write(…) Bro Broker Broker Bro Sender Receiver 9 Broker
Forwarding Logs with Broker subscribe_to_logs(“bro/log”) Topic: “bro/log” Log::write(…) Bro Broker Broker Bro Sender Receiver 9 Broker
Forwarding Logs with Broker subscribe_to_logs(“bro/log”) Topic: “bro/log” Log::write(…) Bro Broker Broker Bro Sender Receiver Log::write(…) 9 Broker
Forwarding Logs with Broker subscribe_to_logs(“bro/log”) Topic: “bro/log” Log::write(…) Log::write(…) Bro Broker Broker Bro Sender Receiver Log::write(…) 9 Broker
Data Stores with Broker 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. Broker Bro Bro Broker Client Master 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) Broker Bro Bro Broker Key Value Client Master Authoritative Version 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) insert(s, 192.150.187.12, 21) Broker Bro Bro Broker Key Value Client Master 192.150.187.12 21 Authoritative Version 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) insert(s, 192.150.187.12, 21) insert(s, 131.159.14.1, 5) Broker Bro Bro Broker Key Value Client Master 192.150.187.12 21 131.159.14.1 5 Authoritative Version 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) c = create_clone(“my_store”) insert(s, 192.150.187.12, 21) insert(s, 131.159.14.1, 5) Broker Bro Bro Broker Key Value Client Master 192.150.187.12 21 131.159.14.1 5 Authoritative Version 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) c = create_clone(“my_store”) insert(s, 192.150.187.12, 21) insert(s, 131.159.14.1, 5) clone() Broker Bro Bro Broker Key Value Key Value Client Master 192.150.187.12 21 131.159.14.1 5 Cached Version Authoritative Version 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) c = create_clone(“my_store”) insert(s, 192.150.187.12, 21) insert(s, 131.159.14.1, 5) clone() Broker Bro Bro Broker { content } Key Value Key Value Client Master 192.150.187.12 21 192.150.187.12 21 131.159.14.1 5 131.159.14.1 5 Cached Version Authoritative Version 10 Broker
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) c = create_clone(“my_store”) insert(s, 192.150.187.12, 21) insert(s, 131.159.14.1, 5) Broker Bro Bro Broker Key Value Key Value Client Master 192.150.187.12 21 192.150.187.12 21 131.159.14.1 5 131.159.14.1 5 Bro Broker Cached Version Authoritative Version Key Value 192.150.187.12 21 131.159.14.1 5 10 Broker Cached Version
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) c = create_clone(“my_store”) insert(s, 192.150.187.12, 21) n = lookup(c, 192.150.187.12) insert(s, 131.159.14.1, 5) Broker Bro Bro Broker Key Value Key Value Client Master 192.150.187.12 21 192.150.187.12 21 131.159.14.1 5 131.159.14.1 5 Bro Broker Cached Version Authoritative Version Key Value 192.150.187.12 21 131.159.14.1 5 10 Broker Cached Version
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) c = create_clone(“my_store”) insert(s, 192.150.187.12, 21) n = lookup(c, 192.150.187.12) insert(s, 131.159.14.1, 5) insert(c, 192.150.187.43, 1947) Broker Bro Bro Broker Key Value Key Value Client Master 192.150.187.12 21 192.150.187.12 21 131.159.14.1 5 131.159.14.1 5 Bro Broker Cached Version Authoritative Version Key Value 192.150.187.12 21 131.159.14.1 5 10 Broker Cached Version
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) c = create_clone(“my_store”) insert(s, 192.150.187.12, 21) n = lookup(c, 192.150.187.12) insert(s, 131.159.14.1, 5) insert(c, 192.150.187.43, 1947) insert(…) Broker Bro Bro Broker Key Value Key Value Client Master 192.150.187.12 21 192.150.187.12 21 131.159.14.1 5 131.159.14.1 5 Bro Broker 192.150.187.43 1947 Cached Version Authoritative Version Key Value 192.150.187.12 21 131.159.14.1 5 10 Broker Cached Version
Data Stores with Broker Broker maintains global, persistent key/value stores. s = create_master(“my_store”) c = create_clone(“my_store”) insert(s, 192.150.187.12, 21) n = lookup(c, 192.150.187.12) insert(s, 131.159.14.1, 5) insert(c, 192.150.187.43, 1947) insert(…) Broker Bro Bro Broker insert(…) Key Value Key Value insert(…) Client Master 192.150.187.12 21 192.150.187.12 21 131.159.14.1 5 131.159.14.1 5 Bro Broker 192.150.187.43 1947 192.150.187.43 1947 Cached Version Authoritative Version Key Value 192.150.187.12 21 131.159.14.1 5 192.150.187.43 1947 10 Broker Cached Version
Data Stores with Broker Demo 11 Broker
Data Store Features 12 Broker
Data Store Features Data Types Supports Bro data types for keys & values. 12 Broker
Recommend
More recommend