Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Speed-up Kafka delivery with AsyncAPI & Microcks

Speed-up Kafka delivery with AsyncAPI & Microcks

Apache Kafka is getting used as an event backbone in new organizations every day. We would love to send every byte of data through the event bus. Like traditional REST APIs, a contract-first approach is beneficial when designing event-driven architectures. In the case of asynchronous APIs, we have the AsynAPI specification to document the endpoints where the schema of the records becomes the main part of the contract payload. Microcks allows us to deploy a testing and mocking platform to have a unified view of the endpoints to speed up application delivery.

Hugo Guerrero

July 27, 2021
Tweet

More Decks by Hugo Guerrero

Other Decks in Programming

Transcript

  1. @MICROCKSIO #KAFKASUMMIT Hugo Guerrero Mexican @ MA, USA @hguerreroo Event-Driven

    APIs Specialist Open Source Advocate History, Travel & Food Enthusiast
  2. Events everywhere. Why the raise of events-driven API ? Photo

    by Carol Jeng on Unsplash #KAFKASUMMIT @MICROCKSIO
  3. @MICROCKSIO #KAFKASUMMIT Because of distributed systems ! icons by Made

    x Made from the Noun Project TRADITIONAL REQUEST/RESPONSE API INVOLVE STRONG UPTIME COUPLING.
  4. #KAFKASUMMIT @MICROCKSIO Kafkaesque Situation ENDPOINT DOCUMENTATION ? DATA FORMAT AND

    VALIDATION ? INFRASTRUCTURE ACCESS ? PUBLISHERS & CONSUMERS COMPLIANCE ? EVENTS AVAILABILITY ? MIS-UNDERSTANDING SLOW TIME TO MARKET, POOR QUALITY
  5. #SOLACE SE icons by Made x Made from the Noun

    Project @MICROCKSIO HOW TO AVOID STRONG BUILD-TIME COUPLING ? Project Planning Architecture
  6. @MICROCKSIO #KAFKASUMMIT Event-Driven Secret-Weapon An open source initiative that seeks

    to improve the current state of Event-Driven Architectures. Created to describe Event-driven APIs using MQTT, AMQP, Apache Kafka, ... “Sister” specification to OpenAPI: same base syntax, use JSON Schema or Avro underhood.
  7. @MICROCKSIO #KAFKASUMMIT AsyncAPI Anatomy Info: metadata and documentation for this

    asynchronous API: version, title, description, contact and licensing terms Servers: list of brokers with binding details (URLs and security protocols) Channel Item: destination that will be used by the API to publish or consume events. Destination may be mapped to a topic, queue, address name depending on the protocol binding. Operation: whether the application using the AsyncAPI should subscribe or produce messages. Holds its own descriptive metadata Message: the content-type and structure of message headers and payload. May reference schemas of different types (AsyncAPI, JSON, Avro). May contain examples! Components: Common definitions (schemas, traits, messages) like in OpenAPI v3
  8. @MICROCKSIO #KAFKASUMMIT Introducing Microcks Open source Kubernetes-native tool for API

    Mocking and Testing. It provides an enterprise-grade solution to speed up, secure and scale your API strategy for the digital era. Microcks references any types of APIs or microservices contracts and examples.
  9. @MICROCKSIO #KAFKASUMMIT Microcks Use-cases API Provider API Provider API Consumer

    Turn specification into live mocks ! Ensure your implementation is compliant with contract
  10. @MICROCKSIO #KAFKASUMMIT All Kafka Every N sec. user-signedup-api-0. 1.1-user-signedup Microcks

    connected broker (mocking topic generated by Microcks) Microcks connected schema registry Any Schema Registry Listen events during test Any Kafka broker user-registration (real application topic) Azure Event Hubs
  11. icons by Made x Made from the Noun Project #SOLACE

    SE @MICROCKSIO EASE COLLABORATION REUSE EXISTING ASSETS CONSISTENT APPROACH REST, ASYNC, SOAP WS Microcks Benefits RUNS EVERYWHERE KUBERNETES IS RUNNING ON THE CLOUD OR ON-PREMISES ACCELERATE FEEDBACKS AND REDUCE TIME TO MARKET SIMULATE ENDPOINTS VALIDATE CONTINUOUSLY
  12. @MICROCKSIO #KAFKASUMMIT More Resources Apache Kafka Mocking and Testing https://microcks.io/blog/apache-kafka-mocking-testing/

    Continuous Testing - OpenAPI & AsyncAPI Together https://microcks.io/blog/continuous-testing-all-your-apis/ How Microcks Can Speed-Up Your AsyncAPI Adoption - Part 1 & 2 https://www.asyncapi.com/blog/microcks-asyncapi-part1 https://www.asyncapi.com/blog/microcks-asyncapi-part2 Join the community on Zulip https://microcksio.zulipchat.com
  13. @MICROCKSIO #KAFKASUMMIT We Need You! Try Microcks (microcks.io) ! Come

    chatting on Gitter gitter.im/microcks Follow us on Twitter @microcksio, Distribute & if you like it. It’s a 100% Open Source. And if you love it, contribute !