---
# System prepended metadata

title: Untitled

---

Step 1)
Sync `after_commit`/`after_save`:
 - change only the callback we hook into

Step 1.5)?
 - sidekiq (reduce latency)

Step 2)
Async: 
  - gem (HTTP)-> moderation-service -> Kafka -> moderation-service -> Checkstep

Step 3)
Async: 
  - gem (sends to Kafka) -> Kafka -> moderation-service -> Checkstep

----


Decision making:

Dima:
    1: Run validation on `after_commit`. This fixes existing bug.
    2: Introduce sidekiq to submit validation asynchronously. This fixes our issue with latency.
    3. Introduce Kafka for async validation and eventually replace sidekiq with Kafka


Daniel:
  step 1) 
    Move forward
		use `after_commit`
		adds value? yes, no -1
	
  step 1.5)
    adds value? yes, it will let us have as "much latency as we want"
	
	step 2)
	   adds value? yes, we can experiment with the kafka schemas and try things out without involving other projects (monolith, gem)
		
	step 3) adds value? having the gem publish directly to Kafka will reduce roundtrips and have less points of failure.



Trish:
1. Deploy S3 upload changes 
    * This fixes issues with image moderation
2. Add some image fields back in place and monitor latency 
    * adds some features back in.
3. Move mod-service call to after_commit
    * to fix -1 issue
4. Add sidekiq for latency control
    * Move S3 uploads to sidekiq job
5. Start working on other features (soft delete, serverless)
6. Introduce asyn via Kafka to moderation-service
7. Move kafka calls to gem