Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Pricing

Darren Broemmer

👤 Person
192 total appearances

Appearances Over Time

Podcast Appearances

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

of objects and entities. So let's say I'm gonna go online to pay my credit card bill. I don't think about that in terms of, well, there's an account object and a vendor and a payment behavior. I think about that of, I'm gonna go pay my bill. It's an action I take, something I do.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

of objects and entities. So let's say I'm gonna go online to pay my credit card bill. I don't think about that in terms of, well, there's an account object and a vendor and a payment behavior. I think about that of, I'm gonna go pay my bill. It's an action I take, something I do.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

And so you can try to push logic further down the stack, but usually it ends up kind of bubbling back up to this service layer because those are encapsulated units of work. Now, paying your bill. Now, I personally wouldn't do this, but let's say I was late. I'm paying my bill, so I'm going to incur a fee.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

And so you can try to push logic further down the stack, but usually it ends up kind of bubbling back up to this service layer because those are encapsulated units of work. Now, paying your bill. Now, I personally wouldn't do this, but let's say I was late. I'm paying my bill, so I'm going to incur a fee.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

So that's probably another service to calculate what the late fee is based on when I submitted all of that. So you can see that kind of breakdown. And so reusing those services and actually, you know, this almost gets back to like functional programming. It's funny how things kind of come full circle every year. every so often.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

So that's probably another service to calculate what the late fee is based on when I submitted all of that. So you can see that kind of breakdown. And so reusing those services and actually, you know, this almost gets back to like functional programming. It's funny how things kind of come full circle every year. every so often.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

But to me, the service level is the easiest way to decompose and be close to how you mirror the real world. And if you can do that, if you can model that closer, you're going to be better off in the long run when you need to make changes. So now segue that into microservice, because microservice often has the connotation of being a separate physical deployment.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

But to me, the service level is the easiest way to decompose and be close to how you mirror the real world. And if you can do that, if you can model that closer, you're going to be better off in the long run when you need to make changes. So now segue that into microservice, because microservice often has the connotation of being a separate physical deployment.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

So there's different steps you can take to migrate this, right? So you mentioned the beautiful monolith. I might have tons of code all sitting there. It's in one deployable unit. You know, Rome's not built in a day. I can't do all of this at once. So, you know, one of the articles I wrote that you referenced was really just, well, how do I take that first step?

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

So there's different steps you can take to migrate this, right? So you mentioned the beautiful monolith. I might have tons of code all sitting there. It's in one deployable unit. You know, Rome's not built in a day. I can't do all of this at once. So, you know, one of the articles I wrote that you referenced was really just, well, how do I take that first step?

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

How do I go from the beautiful monolith to whatever my target architecture is, whatever your favorite decomposition model is? So the beautiful thing, one really nice thing about Rails is I think it helps you out here. So even in my existing code base, a controller action, let's say you're using Rack as your middleware, that controller action is actually a Rack, its own Rack application.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

How do I go from the beautiful monolith to whatever my target architecture is, whatever your favorite decomposition model is? So the beautiful thing, one really nice thing about Rails is I think it helps you out here. So even in my existing code base, a controller action, let's say you're using Rack as your middleware, that controller action is actually a Rack, its own Rack application.

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

So in the Rackup file, rather than just doing Rails application new, you can actually just point it directly to that controller action. So now you can deploy that as a deployable unit. It's going to use the same code base, but from a logical standpoint, I've separated that out from the rest of the system. I can begin to reason about it more, think about What changes when? How do I reuse things?

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

So in the Rackup file, rather than just doing Rails application new, you can actually just point it directly to that controller action. So now you can deploy that as a deployable unit. It's going to use the same code base, but from a logical standpoint, I've separated that out from the rest of the system. I can begin to reason about it more, think about What changes when? How do I reuse things?

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

And then just to tease the topic a little bit, just to throw the container bit out there. So it's an easier migration then to make it a separate deployable unit because that same image, that same code base, I'm just going to have a different rackup file that I use for each of those. I can deploy those separately. I can scale them independently. I can observe them, see...

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

And then just to tease the topic a little bit, just to throw the container bit out there. So it's an easier migration then to make it a separate deployable unit because that same image, that same code base, I'm just going to have a different rackup file that I use for each of those. I can deploy those separately. I can scale them independently. I can observe them, see...

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

you know how they behave if one if the cpu goes off the rails on one of them it's going to be easier to identify where the problem was so you don't you don't get those kind of advantages until you actually make them true microservices and you get that observability but there's a lot of benefits when you start to go down that road and rails i think helps rails gives you tools to help do that incrementally so that

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

you know how they behave if one if the cpu goes off the rails on one of them it's going to be easier to identify where the problem was so you don't you don't get those kind of advantages until you actually make them true microservices and you get that observability but there's a lot of benefits when you start to go down that road and rails i think helps rails gives you tools to help do that incrementally so that

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

kind of an overview of where i'm at there i don't i don't think there's one there's certainly not a one-size-fits-all but to the extent that you can go with microservices to break that out from a logical design perspective and then the the actual deployment get the observability scalability independence i think there's a lot a lot of benefit there

Ruby Rogues
Architectures and Microservices with Darren Broemmer - RUBY 657

kind of an overview of where i'm at there i don't i don't think there's one there's certainly not a one-size-fits-all but to the extent that you can go with microservices to break that out from a logical design perspective and then the the actual deployment get the observability scalability independence i think there's a lot a lot of benefit there