The question is transaction boundaries try unrolling a change that had to touch state of several services and one of the requests failed
Right, because we write against DynamoDB/Etcd transactions were a non-option anyways, and we only have CompareAndSwap as a locking primitive
https://github.com/gravitational/teleport/blob/master/lib/ba...
In addition to that Golang's context
https://golang.org/pkg/context/
is used to broadcast the failure of a distributed operation and release associated resources with it
DynamoDB has transactions now.
https://aws.amazon.com/blogs/aws/new-amazon-dynamodb-transac...
It's probably closer to multi-writes though, than transactions in a classic sense, but good improvement nevertheless.
It's a real transaction like MySQL or PG.
https://docs.aws.amazon.com/amazondynamodb/latest/developerg...
Re:Give Me Back My Monolith
by AmrMostafa on Thursday March 14, 2019 @05:16AM
(#19387590)
I don’t think it is ok to try and make service boundaries transparent and swappable. A service speaking to another service has to know the cost and overhead of the call it is making as otherwise it can’t provide an efficient interface
Consider the following API:
What if AppCatalog and UsersService implement both local version of the interface and GRPC one? Then the distinction whether it's a microservice vs a monolith goes away, it becomes a matter of whether they are deployed in a single linux process or across boundaries of processes/servers.I have implemented this technique in teleport:
https://github.com/gravitational/teleport/tree/master/lib/se...
Integration test suite is run against RPC version and local version at the same time to make sure the contract remains the same:
https://github.com/gravitational/teleport/blob/master/lib/se...
A single teleport binary can be deployed on one server with all microservices, or multiple cluster scenarios.
where the binary is simply instantiated with different roles:
Is Teleport a monolith? Yes! Is it a micro-service app? Yes! I'm so happy that we don't have to think about this split any more.