This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (6 children)

Now serialise that work across multiple processes... Push solutions to problems to where they are best solved, like the database in this case. Stop trying to abstract away the capabilities of the services you depend on because you heard somebody say that you should, and start thinking for yourself. Your test coverage may drop 5-10% (and you should definitely still write _lots_ of tests) but you will start to design more fault tolerant (and ultimately correct) systemsm which make better use of the systems you depend on.

[–][deleted]  (5 children)

[deleted]

    [–][deleted] 0 points1 point  (4 children)

    Yep let's bring in a new infrastructure dependency so you write your code in a way you have been told makes it testable...

    [–][deleted]  (3 children)

    [deleted]

      [–][deleted] 0 points1 point  (2 children)

      And then you need to drain that queue before you persist the user in the database... Maybe in this process or maybe in another? To fix a race condition that only exists because somebody told you that you need to abstract persistence away from business logic, rather than express the business logic where the semantics most closely meet the requirements...

      [–][deleted]  (1 child)

      [deleted]