#1 2017-06-26 14:05:04

cybexr
Member
Registered: 2016-09-14
Posts: 78

Question about TSQLHttpClient.ServicePublishOwnInterfaces

I'm tring to merge TTestServiceOrientedArchitecture.TestOverHttp implemention into Sample21-Multithread stress test tool,  but stucked on a weired statement:

in the TTestServiceOrientedArchitecture.TestOverHTTP  procedure :
HTTPClient.ServicePublishOwnInterfaces(fClient.Server); 

Everything is OK with original TestSQL3, but if I delete this line, then the later running HttpClient.ServiceRetrieveAssociated will get nothing.

Here, send fClient.Server (a TSQLRestServer instance) to httpclient,  can't figure out why it was designed like this. In most situation, client-side code will know nothing about server-implemention.  My version of Sample21, client code can't get fClient.Server instance, so I have to delete the line,  then stucked.  Am I missed something?

Offline

#2 2017-06-26 15:45:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,183
Website

Re: Question about TSQLHttpClient.ServicePublishOwnInterfaces

    /// allow to notify a server the services this client may be actually capable
    // - when this client will connect to a remote server to access its services,
    // it will register its own services, supplying its TSQLRestServer instance,
    // and its corresponding public URI, within its '_contract_' internal call
    // - it will allow automatic service discovery of Peer To Peer Servers,
    // without the need of an actual centralized SOA catalog service: any
    // client could retrieve an associated REST server for a given service,
    // via the ServiceRetrieveAssociated method
    procedure ServicePublishOwnInterfaces(OwnServer: TSQLRestServer);

This adds a client information to the server instance, which would work as a proxy.
Here the client is not a client to the OwnServer, but a client to another server.

Note that this feature has not been fully tested yet - since it is not used on production.

Offline

#3 2017-06-27 00:58:53

cybexr
Member
Registered: 2016-09-14
Posts: 78

Re: Question about TSQLHttpClient.ServicePublishOwnInterfaces

Got it , Thank you ab!

Offline

Board footer

Powered by FluxBB