Skip to content

Example high throughput non blocking data ingesting API for a placeholder backend - 1 million requests < 1 min

License

Notifications You must be signed in to change notification settings

davidmontoyago/go-event-ingestor-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-event-ingestor-api

Event ingesting APIs can be useful in Event Sourcing architectures to provide an interface for event producers and prevent coupling to backend systems.

Uses a channel work queue and worker goroutines to concurrently read (fan-out) payloads and send them to the backend. Uses a proxy channel (ingest) and a context cancelation signal to ensure all workers finish before program shutdown.

Also, uses codec for high performance JSON (un)marshalling.

Run it

make run

Benchmark it

./benchmark.sh

Generate JSON codec

make codec

About

Example high throughput non blocking data ingesting API for a placeholder backend - 1 million requests < 1 min

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published