Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 2.9 KB

event-driven-api.md

File metadata and controls

51 lines (37 loc) · 2.9 KB

Backend Challenge - Event-Driven Architecture API

Introduction

The "Event-Driven Architecture API" challenge focuses on building a RESTful API that enables event-driven communication and processing within your application.

Objectives

  • Set up a web server capable of handling API requests for event registration, processing, and notification.
  • Implement endpoints for publishing and subscribing to events.
  • Support reliable event delivery, event routing, and handling of event-driven workflows.
  • Understand HTTP methods (POST, GET) and status codes.

Instructions

  1. Objective: Develop an Event-Driven Architecture API that facilitates event-driven communication and processing.

  2. Environment Setup: Choose your preferred programming language (e.g., JavaScript, Python, Java, Go) and set up the necessary environment.

  3. Implementation Details:

    • Define endpoints:
      • POST /events: Publish an event to the event bus.
      • GET /events/{eventId}: Retrieve details about a specific event.
      • POST /subscriptions: Subscribe to events based on specific criteria (e.g., event type, topic).
      • DELETE /subscriptions/{subscriptionId}: Unsubscribe from events.
    • Implement support for event sourcing and event-driven workflows:
      • Use message brokers (e.g., Kafka, RabbitMQ) for reliable event delivery and processing.
      • Handle event serialization, deserialization, and schema evolution.
      • Implement mechanisms for event replay and dead-letter handling.
    • Ensure fault tolerance and error handling for event processing and subscription management.
    • Implement authentication and authorization mechanisms to restrict access to event endpoints.
  4. Testing: Test your API using a HTTP client (e.g., Postman, curl).

    • Publish events and verify their delivery and processing.
    • Subscribe to events and validate event propagation and handling.
    • Test error scenarios such as event duplication or subscription failures.
    • Validate API responses include appropriate status codes and error handling for edge cases.

Possible Improvements

  • Event Orchestration: Implement workflows and state machines based on event-driven triggers.
  • Event Monitoring: Integrate with monitoring tools to track event throughput and latency.
  • Event Replay: Provide mechanisms to replay events for debugging or analytics purposes.
  • Integration: Integrate with third-party event-driven platforms (e.g., AWS EventBridge, Azure Event Grid) for interoperability.
  • Real-time Dashboards: Develop dashboards to visualize event streams and processing metrics.

Conclusion

By completing this challenge, you will gain practical experience in developing an Event-Driven Architecture API and learn essential practices for backend development related to event-driven communication and processing. Explore additional improvements and challenges to further enhance your skills.

Happy coding!