Skip to content

Good idea! Let's talk about? #14

@dobryakov

Description

@dobryakov

Hi guys! It's really nice idea to fix the contracts between publisher and consumers!

And I want to tell you about two other approaches from my practice. Not for holywar, but as a subject to discuss :)

"Test workflow" concept.

In this approach you need to test not only each service, but whole workflow from one service to another, and another, and so on. (for example, we had a special "workflow service").

If you have a business logic, you know that will happen then one event occurs: he will disperse like ripples from a stone thrown to the water, and you will expect specified events as a reaction to initial event. The goal is to test it - throw the "start" event and wait for correct "answers" from all services. If no answer or some answer will incorrect - the test fails.

"Cloned monolith" concept.

This approach is simplier than first. In this approach you develop your distributed application as one monolith application, but you need to avoid using direct method calls, and use "async messages" to communicate between your components (still in single monolith application in development environment, of course, it will be direct inline calls in fact).

And in production environment you need clone, clone, and clone it as much as many services you want. Every service starts with his own configuration only, and begins to use (for example) AMQP as a transport for your "async messsages". You can grow (scale) your architecture by separating application to smaller parts.

This approach allows you to test your application (on developer's machine, or on CI stage) as usual monolith application, and your test will not pass if any intern brokes backward compatibility :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions