You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May is here and here in Sweden we survived the yearly ritual bonfire night unscathed. You know what that means: more features!
Transactional Outbox
One of the hardest parts of building an event-driven application is ensuring consistency between services. A common pattern is for each service to have its own database and use Pub/Sub to notify other systems of business events. Inevitably this leads to inconsistencies since the Pub/Sub publishing is not transactional with the database writes.
To better handle such use cases, Encore now provides a utility package for implementing the Transactional Outbox pattern. To use it make sure you're on Encore v1.17.0 (this release), then read up on the docs.
Code viewer 2.0
We've spruced up the code viewer over on the Cloud Dashboard. With this update, you now get cross-links to jump between code and the Service Catalog and Tracing. This makes it super quick to navigate between code and API Docs / Traces to see how everything connects. Check out the video below, or head over to the Uptime demo app to see it for yourself.
codeviewer.mp4
Improved database management
Encore now supports creating databases using the new sqldb.NewDatabase, bringing the encore.dev/storage/sqldb package in line with the other infrastructure resources. This approach to creating databases is more explicit and better allows for future extensibility than the previous behavior (which implicitly created a database based on the presence of a migrations folder).
Test-only infrastructure
Encore now supports defining most infrastructure resources in _test.go files, allowing tests to declare their own infrastructure resources. This allows library code that operates on infrastructure resources to be more easily tested (normal infrastructure resources can only be defined within Encore services). For an example of such a use case see the new transactional outbox tests.
On a related note, most encore db commands now take an optional --test flag to connect to test databases.
Client generation service filter
The encore gen client command now supports filtering which services to be included in the output with the new --services flag. Thanks @jdbann for the suggestion!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
May is here and here in Sweden we survived the yearly ritual bonfire night unscathed. You know what that means: more features!
Transactional Outbox
One of the hardest parts of building an event-driven application is ensuring consistency between services. A common pattern is for each service to have its own database and use Pub/Sub to notify other systems of business events. Inevitably this leads to inconsistencies since the Pub/Sub publishing is not transactional with the database writes.
To better handle such use cases, Encore now provides a utility package for implementing the Transactional Outbox pattern. To use it make sure you're on Encore v1.17.0 (this release), then read up on the docs.
Code viewer 2.0
We've spruced up the code viewer over on the Cloud Dashboard. With this update, you now get cross-links to jump between code and the Service Catalog and Tracing. This makes it super quick to navigate between code and API Docs / Traces to see how everything connects. Check out the video below, or head over to the Uptime demo app to see it for yourself.
codeviewer.mp4
Improved database management
Encore now supports creating databases using the new
sqldb.NewDatabase
, bringing theencore.dev/storage/sqldb
package in line with the other infrastructure resources. This approach to creating databases is more explicit and better allows for future extensibility than the previous behavior (which implicitly created a database based on the presence of amigrations
folder).Test-only infrastructure
Encore now supports defining most infrastructure resources in
_test.go
files, allowing tests to declare their own infrastructure resources. This allows library code that operates on infrastructure resources to be more easily tested (normal infrastructure resources can only be defined within Encore services). For an example of such a use case see the new transactional outbox tests.On a related note, most
encore db
commands now take an optional--test
flag to connect to test databases.Client generation service filter
The
encore gen client
command now supports filtering which services to be included in the output with the new--services
flag. Thanks @jdbann for the suggestion!This discussion was created from the release Outboxes, Dashboards & Databases.
Beta Was this translation helpful? Give feedback.
All reactions