In the synchronous world, we have a direct response to any action, but when triggering asynchronous events, we have to be able to collect them after the fact.
There are many different ways to tackle this problem, all of which have benefits and trade-offs. We’ve never been 100% happy with all the current solutions at Leighton. Over the past year, we have developed our internal way of collecting these as part of customer projects, but we thought it was only fitting to release this publicly.
We’ve entirely rewritten an internal tool called EventNet and upgraded the dependencies to track the latest CDK release and use v3 of the AWS SDK. As such, there are a few features that we still have to move over. The Leighton team will continue to add and refine.
EventNet is made up of three parts:
1. A CDK construct to be used on test builds that captures events and sends them through a WebSocket. This real-time delivery avoids using queues or other mechanisms to get them to the test suite as soon as possible.
2. An EventNet client connects to your WebSocket and collects events captured by the CDK construct, enabling you to test event producers. The client also lets you send events to the bus to test event consumers.
3. A Jest Assertion to check event fidelity against JSON schemas.
For more information, visit our on:tech publication on Medium or head straight to the GitHub repo here.
In the synchronous world, we have a direct response to any action, but when triggering asynchronous events, we have to be able to collect them after the fact.
There are many different ways to tackle this problem, all of which have benefits and trade-offs. We’ve never been 100% happy with all the current solutions at Leighton. Over the past year, we have developed our internal way of collecting these as part of customer projects, but we thought it was only fitting to release this publicly.
We’ve entirely rewritten an internal tool called EventNet and upgraded the dependencies to track the latest CDK release and use v3 of the AWS SDK. As such, there are a few features that we still have to move over. The Leighton team will continue to add and refine.
EventNet is made up of three parts:
1. A CDK construct to be used on test builds that captures events and sends them through a WebSocket. This real-time delivery avoids using queues or other mechanisms to get them to the test suite as soon as possible.
2. An EventNet client connects to your WebSocket and collects events captured by the CDK construct, enabling you to test event producers. The client also lets you send events to the bus to test event consumers.
3. A Jest Assertion to check event fidelity against JSON schemas.
For more information, visit our on:tech publication on Medium or head straight to the GitHub repo here.
In the synchronous world, we have a direct response to any action, but when triggering asynchronous events, we have to be able to collect them after the fact.
There are many different ways to tackle this problem, all of which have benefits and trade-offs. We’ve never been 100% happy with all the current solutions at Leighton. Over the past year, we have developed our internal way of collecting these as part of customer projects, but we thought it was only fitting to release this publicly.
We’ve entirely rewritten an internal tool called EventNet and upgraded the dependencies to track the latest CDK release and use v3 of the AWS SDK. As such, there are a few features that we still have to move over. The Leighton team will continue to add and refine.
EventNet is made up of three parts:
1. A CDK construct to be used on test builds that captures events and sends them through a WebSocket. This real-time delivery avoids using queues or other mechanisms to get them to the test suite as soon as possible.
2. An EventNet client connects to your WebSocket and collects events captured by the CDK construct, enabling you to test event producers. The client also lets you send events to the bus to test event consumers.
3. A Jest Assertion to check event fidelity against JSON schemas.
For more information, visit our on:tech publication on Medium or head straight to the GitHub repo here.
In the synchronous world, we have a direct response to any action, but when triggering asynchronous events, we have to be able to collect them after the fact.
There are many different ways to tackle this problem, all of which have benefits and trade-offs. We’ve never been 100% happy with all the current solutions at Leighton. Over the past year, we have developed our internal way of collecting these as part of customer projects, but we thought it was only fitting to release this publicly.
We’ve entirely rewritten an internal tool called EventNet and upgraded the dependencies to track the latest CDK release and use v3 of the AWS SDK. As such, there are a few features that we still have to move over. The Leighton team will continue to add and refine.
EventNet is made up of three parts:
1. A CDK construct to be used on test builds that captures events and sends them through a WebSocket. This real-time delivery avoids using queues or other mechanisms to get them to the test suite as soon as possible.
2. An EventNet client connects to your WebSocket and collects events captured by the CDK construct, enabling you to test event producers. The client also lets you send events to the bus to test event consumers.
3. A Jest Assertion to check event fidelity against JSON schemas.
For more information, visit our on:tech publication on Medium or head straight to the GitHub repo here.