mangos icon indicating copy to clipboard operation
mangos copied to clipboard

surveyor pattern example

Open ghost opened this issue 5 years ago • 5 comments

Hi,

Hope you are all well !

Is there a simple way to convert this example, based on nanomsg, to mangos ? ref. https://github.com/daniel-j-h/DistributedSearch

It would be awesome to have more real world use cases for mangos. ^^

Cheers, X

ghost avatar Dec 15 '19 17:12 ghost

That example relies on "Bond", which is a serialization format that I don't think Go supports, and that I'm completely unfamiliar with.

It might be easier to build a similar thing using slightly different technologies for the marshalling layer.

There is a demo of using the surveyor pattern in demo/survey

gdamore avatar Dec 20 '19 15:12 gdamore

my point was more about cascading requests like in this example. Like how to use a yaml file, defining the recursion for requests, and create a server with the surveyor pattern.

for the serialization, it can be msgpack or protobuf.

I mean it misses of server like example with a config file...

ghost avatar Dec 20 '19 16:12 ghost

Hi,

Sorry to bother you again, but I would like to build this proxy server for my telegram bot.

My goal is to survey several dockerized restful apis (respondents) with a surveyor embedded into a rest a server.

Is it possible ? Can you just publish/push a basic example like that please ?

Cheers, X

ghost avatar Nov 08 '20 09:11 ghost

Did you look in the repo:

https://github.com/nanomsg/mangos/blob/master/examples/survey/survey.go

This doesn't include embedding inside a REST server, but that's all going to be fairly bog standard REST API stuff that depends on the REST framework you use.

gdamore avatar Nov 08 '20 21:11 gdamore

The surveyor stuff does uses the mangos/SP protocols, and not REST. If you're looking for something to go out over REST you're looking for a vanilla REST (HTTP) client I think - that's not this project.

gdamore avatar Nov 08 '20 21:11 gdamore