This discussion is archived
7 Replies Latest reply: Dec 5, 2011 1:01 PM by 642683 RSS

Managing Tuxedo Service Metadata Repository for SALT

642683 Newbie
Currently Being Moderated
Hello everyone,
First let me explain my scenario: There are 4 servers (let's call them A, B, C & D) and each of them has a WSDL interface to execute some operations (same wsdl/same operations)... according to some routing criteria, evaluated by my app, an operation is invoked in one server or another.

As there are 4 different access points, I've declared 4 different SALT gateways... I'm right so far?.
And I resolved to prefix service names with server names to differentiate them, that way, for service 'CreateUser' I have 'ACreateUser', 'BCreateUser' and so on...

Now it's time to fix the metadata information file... and I'm looking for the best way to do it:

_1° question:_
Can I do a single repository file for all services?, e.g.
service=CreateUser
tuxservice=ACreateUser,BCreateUser,CCreateUser,DCreateUser

or

service=CreateUser
tuxservice=ACreateUser
...
service=CreateUser
tuxservice=BCreateUser
...

_2° question:_
Must I do 4 repository files?, e.g.
A.repos:
    service=CreateUser
    tuxservice=ACreateUser
B.repos:
    service=CreateUser
    tuxservice=BCreateUser
...

_3° question:_
Anyone have a better idea to model this scenario?

Any comments will be appreciated.

Regards,
Charlie Garcia

Edited by: charliemays on Nov 30, 2011 10:31 AM
  • 1. Re: Managing Tuxedo Service Metadata Repository for SALT
    Todd Little Expert
    Currently Being Moderated
    Hi Charlie,

    When you say 4 servers, do you mean Tuxedo servers all running in the same Tuxedo domain, or do you mean 4 hosts (nodes, machines, whatever)? Is this application running in an SHM, MP, or multiple SHM domains?

    I'm not sure why you are configuring 4 different gateways if the answer above is Tuxedo servers. Actually the number of Tuxedo servers is irrelevant to the configuration of SALT. Are you defining 4 different gateways because you want 4 different listening endpoints?

    As for the Tuxedo service metadata repository, let's see what your answers to the above and then we can determine the best solution.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 2. Re: Managing Tuxedo Service Metadata Repository for SALT
    642683 Newbie
    Currently Being Moderated
    Hi Todd,
    By 4 servers, I meant 4 machines from an external provider (in 4 different cities btw) which are not Tuxedo related. They just give me the WSDL URL for each server.

    That said, I assumed that 4 different access points require 4 different gateways... that's the only reason. (if I'm wrong I take suggestions)

    Regards,
    Charlie Garcia
  • 3. Re: Managing Tuxedo Service Metadata Repository for SALT
    Todd Little Expert
    Currently Being Moderated
    Hi Charlie,

    So if I understand correctly, you are trying to call external SOAP services from Tuxedo. In that case, you only need a single SALT gateway. You control the access to the external services through the SALTCONFIG file and the associated WSDF files. The WSDF files and Tuxedo service metadata repository information is generated via the wsdlcvt command. You would load the generated MIF files into the service metadata repository and add the generated WSDF files to the SALTCONFIG and you should be good to go.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 4. Re: Managing Tuxedo Service Metadata Repository for SALT
    642683 Newbie
    Currently Being Moderated
    Hi Todd,
    By a single SALT gateway do you refer to something like this?:
    <WSDF>
        <Import location="A.wsdf"/>
        <Import location="B.wsdf"/>
        <Import location="C.wsdf"/>
        <Import location="D.wsdf"/>
    </WSDF>
    <WSGateway>
        <GWInstance id="GWWS1">
            <Outbound>
                <Binding ref="A:ServicePort"/>
                <Binding ref="B:ServicePort"/>
                <Binding ref="C:ServicePort"/>
                <Binding ref="D:ServicePort"/>
            </Outbound>
        </GWInstance>
    </WSGateway>
    Given this, e.g. if I call the 'ACreateUser' service... Tuxedo knows (by metadata I assume) that it has to use the 'A:ServicePort' binding?
  • 5. Re: Managing Tuxedo Service Metadata Repository for SALT
    642683 Newbie
    Currently Being Moderated
    Hello everyone...
    Back to my original question,

    I tried to define a single metadata repository file with my four -generated by SALT- MIF files but everytime I load a MIF file it replaces the service already loaded (remember service names are identical).
    A.mif                    B.mif                    C.mif                    D.mif
        service=CreateUser              service=CreateUser              service=CreateUser              service=CreateUser
        tuxservice=ACreateUser         tuxservice=BCreateUser         tuxservice=CCreateUser         tuxservice=DCreateUser
        ...                        ...                        ...                        ...
    I tried to define four different metadata repository files, one for each MIF file, but when I boot the servers (TMMETADATA -4-, GWWS -1 or 4-) I only get last group of service advertised, e.g. DCreateUser, DUpdateUser, DDeleteUser.

    It's possible to model my scenario on Tuxedo or should I look for another solution??.

    Any ideas will be appreciated.

    Regards,
    Charlie Garcia
  • 6. Re: Managing Tuxedo Service Metadata Repository for SALT
    Todd Little Expert
    Currently Being Moderated
    Hi Charlie,

    In your first post, you said your application decides which one of 4 external services (all named the same, but at different URLs) a request is to be sent. If that is the case, you will need to name each service slightly differently so Tuxedo knows which external service you want to invoke. If the decision is simply made based upon the range or one or more values in the payload, then you could potentially use Tuxedo's data dependent routing and configure 4 separate gateways each in their own group and then leave the routing decision up to Tuxedo. But if the routing decision is more complex, then you will need to name the services differently and in your application code do something like:

    if (route to A)
    tpcall("Aservice);
    else if (route to B)
    tpcall("Bservice");
    ...

    Since the WSDLs all have the same operation names, you will likely have to slightly modify the generated WSDF files to modify the <Service...> element. As for the service metadata information, again, you will likely have to modify the service name in the generated MIF file. All of this is because you have 4 different implementations of the same service and without using Tuxedo's data dependent routing, you'll need to have 4 unique service names as Tuxedo's service namespace is flat.

    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect
  • 7. Re: Managing Tuxedo Service Metadata Repository for SALT
    642683 Newbie
    Currently Being Moderated
    Hi Todd,
    Thanks for your answer.
    you will need to name each service slightly differently so Tuxedo knows which external service you want to invoke...
    you will need to name the services differently and in your application code do something like:

    if (route to A)
    tpcall("Aservice);
    else if (route to B)
    tpcall("Bservice");
    ...
    That's exactly what I'm doing right now... my doubts are in how to handle it on Tuxedo's side.
    you could potentially use Tuxedo's data dependent routing and configure 4 separate gateways each in their own group and then leave the routing decision up to Tuxedo
    I've never used Tuxedo's data dependent routing... however, it seems a better/neater approach to me (always there's a first time for everything).

    *PS*: about my previous post, the key was on define GWWS servers in different groups to advertise all services

    Regards,
    Charlie Garcia

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points