dgofman / nats_client

MIT License
13 stars 1 forks source link

Is there support for Microservices? #9

Open philipgen opened 6 months ago

philipgen commented 6 months ago

We're looking into implementing microservices with our Nats client (we would like it to be mobile) https://github.com/nats-io/nats.go/blob/main/micro/README.md

Is there any support of it in Dart and Flutter?

sty-holdings commented 6 months ago

There is a dart client that uses web sockets and others. Here is the link: https://docs.nats.io/using-nats/developer

dgofman commented 6 months ago

My code has web-socket support: https://github.com/dgofman/nats_client/blob/master/lib/natslite/transport.dart#L197

philipgen commented 6 months ago

Hi , I was asking specifically about nats’ microservices and if it was supported. A lot of languages are supported here https://natsbyexample.com/examples/services/intro/go

But I didn’t see an example of flutter or dart.

dgofman commented 6 months ago

This is simply a message wrapper that is used by the NATS stream. https://github.com/nats-io/nats.go/blob/main/micro/service.go#L407

dgofman commented 6 months ago

Hint: https://github.com/nii236/nii-finance?tab=readme-ov-file https://github.com/nii236/nii-finance/blob/develop/services/Python/yahoo_ticker.py

However, I recommend using a NATS request/response similar to a REST request.

https://github.com/dgofman/nats_client/blob/master/lib/natslite/nats.dart#L127 https://docs.nats.io/nats-concepts/core-nats/reqreply