Technoboy- commented on code in PR #20828:
URL: https://github.com/apache/pulsar/pull/20828#discussion_r1271864991


##########
pip/pip-284.md:
##########
@@ -0,0 +1,32 @@
+# Background knowledge
+
+1. Apache pulsar introduced the topic-level policy by 
[PIP-39](https://github.com/apache/pulsar/wiki/PIP-39%3A-Namespace-Change-Events).
+It was using reader API to read messages and load the event into the local 
cache.
+
+2. Apache pulsar introduced new consumer type - table view by 
[PIP-104](https://github.com/apache/pulsar/issues/12356) 
+   which can make the topic as a table by key and save it in the memory.
+
+# Motivation
+
+Since we have already implemented the table view, we can try to refactor topic 
policies service
+using the table view component to avoid complex logic.
+
+There are some issues caused by this complex logic:
+
+- https://github.com/apache/pulsar/pull/20763
+- https://github.com/apache/pulsar/pull/20613
+- https://github.com/apache/pulsar/pull/19746
+
+# Goals
+
+Refactor existing system topic-based topic policies service from reader API to 
table view API.
+
+## In Scope
+
+- Table view can help reduce complex logic in the previous implementation. 
+  - Demo of [new 
implementation](https://github.com/apache/pulsar/pull/20811/files#diff-76c55144efe73cecffaa74152c79271ed84f133bad6e4c2608633c35a674c5ebR60).
+  - Code of [old 
implementation](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java).
+
+# Backward & Forward Compatibility
+
+There are no backwards compatibility issues because we use the same topic as 
before.

Review Comment:
   Need to add the discussion mail to this PIP



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to