Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Designing Scalable and Extendable Data Pipeline for Call Of Duty Games


Published on

Designing Scalable and Extendable Data Pipeline for Call Of Duty Games.

Published in: Software
  • If you are looking for trusted essay writing service I highly recommend ⇒⇒⇒ ⇐⇐⇐ The service I received was great. I got an A on my final paper which really helped my grade. Knowing that I can count on them in the future has really helped relieve the stress, anxiety and workload. I recommend everyone to give them a try. You'll be glad you did.
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Designing Scalable and Extendable Data Pipeline for Call Of Duty Games

  1. 1. Designing Scalable and Extendable Data Pipeline for Call of Duty Games Yaroslav Tkachenko Senior Data Engineer at Activision
  2. 2. 1+ PB Data lake size (AWS S3)
  3. 3. Number of topics in the biggest cluster (Apache Kafka) 600+
  4. 4. 10k+ Messages per second (Apache Kafka)
  5. 5. Scaling the data pipeline even further Volume Well-known industry techniques Games Using previous experience Use-cases Completely unpredictable Complexity
  6. 6. 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 Kafka topic Consumer or Producer Partition 1 Partition 2 Partition 3 Kafka topics are partitioned and replicated
  7. 7. We need to keep the number of topics and partitions low More topics means more operational burden. Number of partitions in a fixed cluster is not infinite. Autoscaling Kafka is impossible, scaling is hard.
  8. 8. Topic naming convention $env.$source.$title.$category-$version prod.glutton.1234.telemetry_match_event-v1 Unique game id “CoD WW2 on PSN”Producer
  9. 9. A proper solution has been invented decades ago. Think about databases.
  10. 10. Messaging system IS a form of a database Data topic = Database + Table. Data topic = Namespace + Data type.
  11. 11. telemetry.matches user.logins marketplace.purchases prod.glutton.1234.telemetry_match_event-v1 dev.user_login_records.4321.all-v1 prod.marketplace.5678.purchase_event-v1 Compare this
  12. 12. Each approach has pros and cons • Topics that use metadata for their names are obviously easier to track and monitor (and even consume). • As a consumer, I can consume exactly what I want, instead of consuming a single large topic and extracting required values. • These dynamic fields can and will change. Producers (sources) and consumers will change. • Very efficient utilization of topics and partitions. • Finally, it’s impossible to enforce any constraints with a topic name. And you can always end up with dev data in prod topic and vice versa.
  13. 13. After removing necessary metadata from the topic names stream processing becomes mandatory.
  14. 14. Stream processing becomes mandatory Measuring → Validating → Enriching → Filtering & routing
  15. 15. Refinery
  16. 16. Having a single message schema for a topic is more than just a nice-to-have.
  17. 17. Number of supported message formats 8
  18. 18. Stream processor JSON Protobuf Custom Avro ? ? ? ?
  19. 19. // props.put("value.deserializer", "com.example.CustomDeserializer"); // public class CustomDeserializer implements Deserializer<???> { @Override public ??? deserialize(String topic, byte[] data) { ??? } } Custom deserialization
  20. 20. Message envelope anatomy ID, env, timestamp, source, game, ... Event Header / Metadata Body / Payload Message
  21. 21. Unified message envelope syntax = "proto2"; message MessageEnvelope { optional bytes message_id = 1; optional uint64 created_at = 2; optional uint64 ingested_at = 3; optional string source = 4; optional uint64 title_id = 5; optional string env = 6; optional UserInfo resource_owner = 7; optional SchemaInfo schema_info = 8; optional string message_name = 9; optional bytes message = 100; }
  22. 22. Schema Registry • API to manage message schemas • Single source of truth for all producers and consumers • It should be impossible to send a message to the pipeline without registering its schema in the Schema Registry! • Good Schema Registry supports immutability, versioning and basic validation • Activision uses custom Schema Registry implemented with Python and Cassandra
  23. 23. Summary: scaling and extending the data pipeline Games • By using unified message envelope and topic names adding a new game becomes almost effortless • “Operational” stream processing makes it possible • Still flexible enough: each game can use its own message payload format via Schema Registry Use-cases • Topic names express data types, not producers or consumers • Stream filtering & routing allows low-cost experiments • Data catalog built on top of Schema Registry promotes data discovery
  24. 24. Thanks! @sap1ens