Live data from Hacker News

Domain-Oriented Microservice Architecture

eng.uber.com

111–116 of 116 posts

Re: Domain-Oriented Microservice Architecture

#111

Earlier quoted context omitted.

We are talking about a 16x difference in resources. Would you also suggest scaling a database that was more read heavy than write heavy instead of splitting reads and writes when you can deal with eventual consistency and just autoscale the read replicas?

The comparison is not equivalent.

Agreed, I think the comparison is not equivalent,

because a read replica actually is the same database application (same "monolith") just started with different parameters, to behave as a replica

Re: Domain-Oriented Microservice Architecture

#112

Earlier quoted context omitted.

The comparison is not equivalent.

Agreed, I think the comparison is not equivalent, because a read replica actually is the same database application (same "monolith") just started with different parameters, to behave as a replica

The database is the same but you have to then separate your code into reader and writer services with different connection strings, you have to make sure that anything that can’t be eventually consistent uses the writer connection string, etc.

It’s not just a matter of spinning up a database.

Also, since many enterprise apps live stores procedures and putting business logic in the database, that’s another ball of wax you have to untangle.

Re: Domain-Oriented Microservice Architecture

#113
post #46
post #42

Earlier quoted context omitted.

As far as I can tell from reading Evans' DDD, there's nothing forbidding network calls inside a service. For a trivial example, you make network calls from your API to your DB. And also to your Redis cache, and then if your service runs async/periodic tasks, to your task queue, say your RMQ & Celery instances. So to me the OP reads like "we're coming up with some new terminology for a bounded context, and also defini…

> As far as I can tell from reading Evans' DDD, there's nothing forbidding network calls inside a service. You're quite right. > [...] defining how those contexts should be allowed to layer [...] This, however, seems to go against the spirit of things. There is a consistent "ubiquitous language" within a bounded context, where domain terms are concrete and unambiguous. (Or rather, the context disambiguates the langua…

Playing devil's advocate for a second, I'm wondering if, at Uber's scale (thousands of microservices, perhaps that means hundreds of bounded contexts after applying "DORA"?), the observations that make hexagonal/layered architectures a useful design within a single service become relevant at the system level.

I'm not sure how many systems have been built using DDD with hundreds of interacting bounded contexts, but I suppose I could believe that _some_ structure would be beneficial. (If you know of any case studies here I'd love to hear of them, I've not actually seen anything published on this topic.)

In general the concept of an "infrastructure bounded context" seemed a bit weird to me from my understanding of DDD, but then I though about Kubernetes, and you could make a case that it is an example of such a bounded context; it has its own ubiquitous language, etc. It would be weird for your infrastructure to have any understanding of the domain objects running on top of it, so a hierarchy makes sense.

Likewise if you have BFFs for your different API clients; the domain services underneath them could be abstracted away from things like REST, if all your internal services use gRPC (for example). You could consider this the UI layer in DDD's layered architecture.

I'm struggling to come up with more sensical layers than that though; in DDD there's the Application and Domain layers; I don't really see how you'd pull "Application" vs. "Domain" bounded context layers together in a way that made sense.

> But the origin here suggests most of it is left over from what came before.

I'd certainly agree with this -- it seems like lots of the intra-BC complexity is excessive compared to what you'd get if you built your services with a BC in mind from the start.

I don't think I'd emulate their intra-BC structure, it's only the inter-BC organization that I think has any merit for other systems (and even then I'm not fully convinced yet).

Re: Domain-Oriented Microservice Architecture

#115

I despise Uber as a company, but I've always loved them as a technology group ever since I used to go to their meetups in NYC. You can always count on Uber to throw a great party and also come up with the worst possible technology. If you want to know how not to do things, Uber is a very good place to look.

And all the people who worked there will consider the fact that they did 1) something and 2) were successful means that that 'something' had anything to do with it, and therefore we should keep doing it.

Not that this is unique to Uber, mind. I just described half of my coworkers too.

Re: Domain-Oriented Microservice Architecture

#116
post #84

Very interesting and seems like a logical next step with things get a bit too messy with micro services. One thing that was not touched on - how is security done in DOMA? * Is auth happening at domain gateways or at each service? * Similarly for encryption, does it terminate at Domain GW or at each service?

Hopefully both
Post reply on HN