watermill icon indicating copy to clipboard operation
watermill copied to clipboard

Cross-languages example

Open joeblew99 opened this issue 6 years ago • 9 comments

@roblaszczak The Architectural constructs are really nice. But if someone has to use python or rust or blah blah for their "MicroService" what options are there ?

GRPC API wrapping Watermill BUS and SQL layers ? GRPC Gateway wrapping GRPC ? Other ideas ?

Or OUT OF SCOPE ?

joeblew99 avatar Aug 14 '19 10:08 joeblew99

Hey @joeblew99. Do you mean other microservices communicating with watermill-based applications? If so, it shouldn't be an issue, as the messages are not any special when consumed/produced by watermill (except metadata). You can use any other library to produce messages that will be consumed by watermill and the other way around.

Can you think of some example of this?

m110 avatar Aug 15 '19 20:08 m110

I hope that examples should be much better now. If something is not clear, please ask :)

https://github.com/ThreeDotsLabs/watermill/tree/master/_examples

roblaszczak avatar Sep 16 '19 18:09 roblaszczak

@m110

Hey @joeblew99. Do you mean other microservices communicating with watermill-based applications? If so, it shouldn't be an issue, as the messages are not any special when consumed/produced by watermill (except metadata). You can use any other library to produce messages that will be consumed by watermill and the other way around.

Yes, for example if you code in python or whatever. I was thinking about the idea of using protobufs for all API aspects. Then the transport is independent and so can be used in various ways by developers using different languages.
Of course you could just use grpc gateway and default to a Rest like approach but it can to limiting.

Can you think of some example of this?

Example. A team and they are building a large system that is composed of many microservices. The Ml team want to use python. The CRM team want to use Nodejs. But as an architect you want a unified SQL and Messaging system that they all use. And you want those 2 points to do metrics, tracing, etc, so that you have a centralised system for that.

joeblew99 avatar Sep 16 '19 19:09 joeblew99

@joeblew99 is the title better now?

roblaszczak avatar Sep 16 '19 20:09 roblaszczak

@roblaszczak yes thanks :)

joeblew99 avatar Nov 19 '19 20:11 joeblew99

I still don't get it what's to do here

bkielbasa avatar Oct 28 '20 06:10 bkielbasa

@bkielbasa I believe it's about adding example that works with for example Python microservice ;-) It should be pretty easy to do (and it should illustrate that it is possible).

roblaszczak avatar Dec 30 '20 12:12 roblaszczak

I can add PHP example if it is relevant... Should i?

imbpp123 avatar Mar 29 '23 08:03 imbpp123

example that works with for example Python microservice

Could you, for example, follow watermill publisher example with a Kafka broker, then follow documentation from kafka-python or aiokafka, or confluent-kafka-python on consuming from that?

Pick and chose the order of sequence or queue for this scenario, but I would personally prefer the documentation here to focus on the Go library and how it interacts with a message queue, not conflate the docs/examples with extra, unrelated code bases

OneCricketeer avatar Sep 24 '23 04:09 OneCricketeer