Inspiration

I'm seeing a lot of REST APIs which are not made for the new event-driven microservice world. It's always a pain to either rewrite these services or build wrappers around them which can handle asynchronous events. eventor is here to solve this pain.

What it does

eventor is an ultra lightweight proxy which turns your synchronous REST API into an asynchronous, event-driven microservice. It does that by consuming an event from a Kafka topic, sending the event to your REST API endpoint and publishing the response onto another Kafka topic.

In the cloud-native Kubernetes world a common use case could be to add eventor as a sidecar container to your existing pod. That way your so far synchronous RESTful service is immediately opened up for an event-driven architecture without any code changes.

How we built it

It's one of my first Golang projects ever, so I've learned a lot about structs, channels, error handling and interfaces, especially since I'm coming from the Java world where everything is quite different compared to Go :)

Challenges we ran into

There were a lot of challenges, e.g. the official Golang Kafka client is not using channels at all, so it was quite challenging wrapping an asynchronous channel-based application around a synchronous API with blocking calls.

Accomplishments that we're proud of

My first Golang project ever which is indeed working and useful :)

What we learned

Golang, Kafka and a lot of stuff concerning asynchronous processing.

What's next for eventor

  • support for custom Kafka event keys (null is used for now, which does not guarantee event ordering when multiple partitions are used)
  • support for proper error handling if the call to the eventHandler fails or responds with a none 2xx status code
  • support for additional HTTP authentication schemes like OAuth2.0, ...
  • support for other eventListener, eventHandler and eventResultProcessor types like NATS or RabbitMQ

Built With

  • api
  • event-driven
  • go
  • golang
  • kafka
  • microservices
  • rest
  • restapi
Share this project:

Updates