Skip to main content

Timeline for answer to Design and communication between microservies by Robbie Dee

Current License: CC BY-SA 4.0

Post Revisions

16 events
when toggle format what by license comment
Oct 6, 2024 at 17:31 comment added user2463506 @RobbieDee Normally calling Generator that then calls minecraft should happen, but in my case it's impossible. ComputerCraft only allows for Post and Get, which means that I basically have web browser, something similar to web browser called Minecraft and my services that are something like some crossbreed between MITM and adapter. Thats the best analogy I have.
Oct 6, 2024 at 12:50 comment added Robbie Dee @Steve In the diagram I was just explaining how data stores are connected. No operations between these Microservices is inferred for the sake of this example.
Oct 6, 2024 at 12:49 comment added Robbie Dee @user2463506 N.B. in your diagram, you have HTTP verbs but I think you were talking about message bus initially. Which of these you go with (event or REST) will have a bearing on the design too.
Oct 6, 2024 at 12:49 comment added Robbie Dee @user2463506 Ah, OK - makes sense. In that case it sounds like you need 3 Microservices. Those being Inventory, Mana & Generator. When Inventory is changed, it checks mana level and calls Generator if needed.
Oct 6, 2024 at 12:35 comment added Steve @user2463506, I'm not sure if I'm wading into something that is highly Minecraft-specific (of which I have no experience), but my experience of customer-facing ordering applications is that they usually depend on the maintenance of a customer list which determines things like the authority to place an order, keeps account of invoices and payments, that kind of thing. Autonomy and avoiding unnecessary coupling is always a good thing if it's free, but my understanding is that there is no decoupling between customer and order data (in typical applications where both concepts actually exist).
Oct 6, 2024 at 11:18 comment added user2463506 @RobbieDee because I forgot to mention you in my response.
Oct 6, 2024 at 11:17 comment added user2463506 @Steve Within Minecraft it makes sense. What I want to create is a set of services that will allow players to "check" their in game base and save time by not forcing them to build the same setup a few times just because they want to scale up resource generation. It will be aimed at players with modded games, which also means that I have to support any modpack available. By making services more autonomous, potential user will be able to mix and match them to fit his needs.
Oct 6, 2024 at 8:40 comment added Steve Assuming these are autonomous services, then under what circumstances could the "order service" ever proceed autonomously of the "customer service"? Why are these things so complicated that they require two independent services?
Oct 5, 2024 at 20:57 comment added user2463506 Minecraft in this case can be equated to real life (with some leeway here and there). I want to always have 5t of gravel in my warehouse, and if it dips below that, turn on the rock crusher. If the amount of that gravel dips below 3t then I clearly use lots of it and I need to give that rock crusher way more power, so I check my nitrous oxide reserves and if I have enough I want to use it to power up rock rusher engines.
Oct 5, 2024 at 20:40 comment added user2463506 Let's say that my goal is to have about 5000 of something. If I go below that then generation should start, but if I go below 3000 It is way too low for me, and if I have enough mana stored to boost production of that resource it should be boosted.
Oct 5, 2024 at 14:36 comment added Robbie Dee Just trying to figure out the flow (don't know Minecraft - sorry). So if a POST to Mass Storage or Magical Generator happens you ultimately want Resource Generation to send Minecraft a message if it has enough of each of a given item, enough mana to generate the resource and any extra mana to speed up generation of that resource?
Oct 5, 2024 at 12:17 comment added user2463506 In my case mass storage will hold thousands of items and liquids, I will also potentially have multiple of those "non-core" services so notifying everyone about everything is not really feasible. I thought about observer because that would allow me to pass some sort of filter in subscribe, that I could use to match items against and then just respond with everything that passed said test. Unless you have better idea on how to handle that?
Oct 5, 2024 at 10:57 comment added Robbie Dee Yep, that sort of thing. I was thinking Hollywood Principle, but yeah - there might be multiple parties that need to know if a product was discontinued in the example above.
Oct 5, 2024 at 10:24 comment added user2463506 So in my case and in above example Resource Generation should "tell" Mass Storage that it wants to know how much of item X I have and every time Mass Storage has its counts updated it should broadcast it to every service that is interested in it? That sounds like ideal case for Observer pattern.
Oct 5, 2024 at 10:07 history edited Robbie Dee CC BY-SA 4.0
added 10 characters in body
Oct 5, 2024 at 10:02 history answered Robbie Dee CC BY-SA 4.0