4 ms·
As a coda to this, I think that we are entering a new world where services truly can have minimal operational overhead. At my last company, we were all in on s
by acjohnson55 3y ago
As a coda to this, I think that we are entering a new world where services truly can have minimal operational overhead.
At my last company, we were all in on serverless, with AWS tools like SQS coupling things together. It worked extremely well for keeping the architecture simple to operate and approachable for new people.
But even better, I think we want logical services that interface with each other as though they were in a single process. We want the ability to write code as though it is monolithic (e.g. lexical scope and native-language APIs), while availing ourselves of the advantages of independently deployed services. I believe projects like Temporal point the way. I haven't had the opportunity to use it, but philosophically, I think it's the right direction.
- throw04323 3y agoI don't have experience with it myself, but Polylith architecture looks interesting. There you compose services based on shared components. You can start developing it as a monolith, and then extract components to separate services by just changing the interface between components. https://polylith.gitbook.io/polylith/ https://polylith.gitbook.io/polylith/
- acjohnson55 3y agoIf I'm understanding Polylith, it seems like a way to do monoglot monorepo in a way that avoids explicitly using libraries. That looks pretty interesting and similar to what Artsy did with Ezel for front-end development. https://github.com/artsy/ezel https://github.com/artsy/ezel
- jakjak123 3y agoI have been working mostly with Kafka for five years, and I found SQS to be a little weird to work with. How do you keep an overview of all services that consume a queue? What if you want multiple services to read the same data in the same order? Granted I am very new to AWS.
- 8note 3y agoI think you're really looking to use kinesis rather than SQS. SNS+SQS make a pub/sub setup, but every queue subscribed to the event is fully separate, and you wouldn't expect to try to couple the different listening queues together. You could make all the queues into SQS fifo queues, and put them all on the same sorting group, but I think network time could still break the ordering on different subscribers? The simple way to use SQS is to have a queue for each message type you plan to consume, and treat it as a bucket of work to do, where you can control how fast you pull the work out
- osigurdson 3y ago>> as though they were in a single process The problem is, you cannot abstract away a 3 order of magnitude difference in performance and latency. This problem increases with larger teams as people don't understand what is happening. Abstractions shorten the learning curve but also greatly slow the formation of an accurate mental model of how a system works.
- nostrebored 3y agoThe mental model of using SQS and serverless is extremely simple. You put a message in, get a message out, and have your code run. This is something I’ve been able to teach teams how to do in a few hours. This is the a huge part of the value prop of these services. Performance and latency have a trade off, sure. But you get teams who have complete ownership over their service. You get services that can scale to millions of requests per minute transparently. Some of the highest scale workloads I know use microservices behind SQS.
- chriswarbo 3y ago> You put a message in, get a message out, and have your code run. In my experience it's more like put a message in, get an `AuthenticationException`, copy/paste some IAM stanzas into CloudFormation and redeploy, put a message in, get a configuration error, add dependency-injected config loaders to constructors, add env vars to CloudFormation and rededeploy, put a message in, get a deadlock from the threaded HTTP client due to class loading being single-threaded, refactor config loading to happen after construction but populate a cache, redeploy, put a message in, get a timeout due to a stampede on the cache, get a hefty bill from AWS for spinning up a load of long-lived serverless processes, ...