(Migrated) internal data services

(This message has been automatically imported from the retired mailing list)

Hi,

I’m a new zato user. Thanks for this great job.

I deployed a 2 server zato by following your tutorial. Everthing works fine.

As in your tutorial outgoing plain http connections, I want to create
internal data sources. I mean that a zato service which produce data
in any format but isn’t exposed, only can be used by other services.

In your tutorial we can use outgoing connections as below:

    # Fetch connection to CRM
    crm = self.outgoing.plain_http.get('CRM')

    # Fetch connection to Payments
    payments = self.outgoing.plain_http.get('Payments')

Let’s say i have a service called recalculate_grads.py. It reads from
redis and takes some arguments and produces some recalculated data as
JSON. I want to use this service from my other services as maybe like below

    # Recalculate grads
    grads = self.xxxxxx.plain_http.get('Recalculate Grads')

Is it possible?

Thanks.


Ali Rıza

On 16/02/15 08:53, Ali Rıza KELEŞ wrote:

Let’s say i have a service called recalculate_grads.py. It reads from
redis and takes some arguments and produces some recalculated data as
JSON. I want to use this service from my other services as maybe like below

    # Recalculate grads
    grads = self.xxxxxx.plain_http.get('Recalculate Grads')

Is it possible?

Hi Ali,

yes, it’s not required that a service be made available on any channel.
It can be an internal one and external systems won’t have access to it.

You can simply invoke it using self.invoke - please check it out here:

https://zato.io/docs/progguide/invoking-services.html
https://zato.io/docs/progguide/service-dev.html#invoke