Where we're going... we don't need batch jobs - Adam Ralph - NDC London 2023

Explore the limitations of batch jobs and discover how sagas, service buses, and other patterns can be used to process data in real-time, while maintaining simplicity and maintainability in your code.

Key takeaways
  • Batch jobs are the wrong answer: Batch jobs are not suitable for real-time processing and can lead to inefficiencies and technical debt.
  • Sagas are good objects: Sagas are objects that receive lots of messages and can be used to process orders and invoices in real-time.
  • Use a service bus: A service bus can be used to implement sagas and handle messages in a decoupled way.
  • Avoid unnecessary complexity: Avoid adding unnecessary complexity to your code by using heuristics and workarounds.
  • Test your code: Test your code thoroughly to ensure that it works correctly.
  • Communicate with the business: Communicate with the business to understand their requirements and ensure that your code meets their needs.
  • Use ubiquitous language: Use ubiquitous language to make your code more maintainable and understandable.
  • Avoid data migrations: Avoid data migrations whenever possible, and use sagas to handle changes in business logic.
  • Use a persister: Use a persister to store and retrieve saga state, and to handle persistence and concurrency.
  • Delay messages: Use delay messages to implement timeouts and concurrency control.
  • Avoid entangling state and logic: Avoid entangling state and logic in your code, and use sagas to separate them.
  • Use a business-friendly API: Use a business-friendly API to communicate with the business and ensure that your code meets their needs.