ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

webservice running in unique job

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • webservice running in unique job

    Hi All,

    When several clients consume my web service deployed on IBM-i by HTTPAdmin, it seems that the program is running always in the same job. That means, that the same *LDA and QTEMP is used by all the consumers.

    Does anyone have experience about letting all consumers running in a unique job?

    Thanks in advance,
    Klara Farkas

  • #2
    Re: webservice running in unique job

    Is it One-way invocation or request-response invocation?

    only possible solution that I can think of is submitting the actual program to the different subsystem from WebService Interface program (If it is One-way invocation or there's no response based on the return values of original program - since it is in batch )

    I'm afraid, I don't have any idea of how to handle the request-response messages in this situation
    Last edited by dhanuxp; June 26, 2013, 01:21 AM.

    Comment


    • #3
      Re: webservice running in unique job

      Thank you very much Dhanuxp!
      It is a good idea to submit the actual program, but my webservice is a request-response one.

      Klara

      Comment


      • #4
        Re: webservice running in unique job

        It is annoying, Not only IWS, I just checked with WebSphere WAS7 and it is also same
        hmmm...

        Comment


        • #5
          Re: webservice running in unique job

          *LDA is a old school thing. I bet you can work around it. And for Qtemp, just build your work file with a unique sequence, or perhaps just use SQL and not build a work file (my assumption).
          Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

          Comment


          • #6
            Re: webservice running in unique job

            Thank you DeadManWalks!

            You are right.
            But I had to write my webservice as an interface to an old but still working system, and I have to call programs, that are using *LDA.

            Klara

            Comment


            • #7
              Re: webservice running in unique job

              are you limited to IWS & RPGLE service?
              If you can write a WebService in java and wrap your program to a bean and call it using jt400 will not gives that type of problem.
              do you runing websphere there or any other JEE server ?

              Comment


              • #8
                Re: webservice running in unique job

                Thank you Dhanuxp for the good idea!
                Nowadays we are limited to IWS and RPGLE, but in the future we will keep in mind your solution!!

                Comment


                • #9
                  Re: webservice running in unique job

                  ...the program is running always in the same job.
                  What is "the ... job"? What name? What subsystem? And what is the OS release?

                  Tom
                  Tom

                  There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                  Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                  Comment


                  • #10
                    Re: webservice running in unique job

                    Klara, Thanks for posting this information here..

                    @Tom
                    It is the JOBS which created for each WebService Application at the time of server started .
                    all sub-sequence soap request are goes to A JOB that already assigned to the particular Application.
                    I guess IWS is creating thread for each request (that is how J2EE servers working right? ) but access already assigned JOB -How are they doing this??


                    Let's see the details

                    Code:
                    Job 057031/QUSER/QZRCSRVS started on 06/28/13 at 11:54:29 in subsystem    
                      QUSRWRK in QSYS. Job entered system on 06/28/13 at 11:54:29.            
                                    
                    User DHANUXP from client TESTSRV.yyyy.COM connected to server.          
                                    
                    Library QSYS2924 not found.                                               
                    Client request - run command QSYS/CHGJOB.                                 
                    Client request - run command QSYS/ADDLIBLE.                               
                    Library DHANULIB added to library list.                                   
                    Ownership of object ZRCRPCSPC in QTEMP type *USRSPC changed.              
                    Client request - run program DHANULIB/SRVPGM5.                            
                    Client request - run program DHANULIB/SRVPGM5.
                    see last 2 lines, I made 2 soap request. all client request are running on same job.

                    For the testing purpose, I end the job from the rpg program itself with 5 second delay - just before the Inlr . then next soap request is creating a new JOB.
                    but we cannot apply it for production

                    then I turn into WAS7 but this is same to the RPG WebService that are running on WAS7 too..

                    ( that make me confuse, RPG webservice which running on websphere are using java-program call beans right?
                    generally when we issue a CONNECT from java, it will always creates new job, so the way they using program call beans are different than us , may be have some good reason for this architecture but who knows? )
                    Last edited by dhanuxp; June 28, 2013, 02:30 AM.

                    Comment


                    • #11
                      Re: webservice running in unique job

                      Job 057031/QUSER/QZRCSRVS started on...
                      I'm not experienced with IWS. The name of the job gives possible hints of what might be done to change the behavior.

                      Run DSPSBSD SBSD(QUSRWRK) and take option 10., 'Prestart job entries'. Enter 5=Display details against the QZRCSRVS entry. Copy/paste the lines for these five items back here:
                      Initial number of jobs
                      Threshold
                      Additional number of jobs
                      Maximum number of jobs
                      Maximum number of uses

                      Some tweaking of those might give you the *LDA and QTEMP behavior closer to what you want, but it will also affect some system performance.

                      Multiple requests use the same job in order to avoid creating whole new jobs every time. For systems with many requests per second, the system would be spending more time creating and destroying jobs than doing the requests themselves.

                      But you can possibly make some test changes to see what might be acceptable.

                      Tom
                      Tom

                      There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                      Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                      Comment


                      • #12
                        Re: webservice running in unique job

                        PHP Code:
                        Start jobs . . . . . . . . . . . . . . . . . . . :   *YES      
                        Initial number of jobs 
                        . . . . . . . . . . . . . :   1         
                        Threshold  
                        . . . . . . . . . . . . . . . . . . . :   1         
                        Additional number of jobs  
                        . . . . . . . . . . . :   2         
                        Maximum number of jobs 
                        . . . . . . . . . . . . . :   *NOMAX    
                        Maximum number of uses 
                        . . . . . . . . . . . . . :   1         
                        Wait 
                        for job . . . . . . . . . . . . . . . . . . :   *YES      
                        Pool identifier  
                        . . . . . . . . . . . . . . . . :   
                        Originally posted by tomliotta View Post

                        Multiple requests use the same job in order to avoid creating whole new jobs every time. For systems with many requests per second, the system would be spending more time creating and destroying jobs than doing the requests themselves.

                        But you can possibly make some test changes to see what might be acceptable.

                        Tom
                        Disappointing! I CANNOT see any advantages of using RPGLE webservice that if we cannot run the programs as it is.
                        Amending or rewriting the perfectly running business program is very costly in our situation.
                        If It is the only option remaining, WHY would I re-write it in RPGLE for SOA?
                        Last edited by dhanuxp; June 28, 2013, 03:32 AM.

                        Comment


                        • #13
                          Re: webservice running in unique job

                          Any other system would work similarly if specific process-level objects are used. In any language, you can create programming that won't work as a web service. And for things like a *LDA or QTEMP, the language is irrelevant. If it was C or COBOL or any other language, a *LDA or an object in QTEMP would behave the same. The ILE RPG language has nothing to do with it.

                          Personally, I don't think I've used a *LDA in 20 years... no... there was a set of procedures I ran into a little over ten years ago that used one. But it was already in use and wasn't part of what I was doing, so I could ignore it.

                          Regardless, a *LDA doesn't make much sense in the midst of a web-service project. There are likely far better methods. For example, an entry in a keyed user index could replace a *LDA, and an environment variable could pass the index key. A session ID might make a useful key or key component. But it's not clear why it's a problem in your case yet.

                          QTEMP is more difficult to think about. Without knowing what trouble it causes, there's no way to understand its problem either.

                          Tom
                          Tom

                          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                          Comment


                          • #14
                            Re: webservice running in unique job

                            Than you Tomliotta for your reply!

                            You are right, that *LDA is an old school thing. But I had to write a WS interface to an old but still working system, and have to call programs that use *LDA.
                            But it seems, that we shall modify this old programs leaving *LDA using out.

                            Klara

                            Comment


                            • #15
                              Re: webservice running in unique job

                              Originally posted by tomliotta View Post
                              But it's not clear why it's a problem in your case yet.

                              QTEMP is more difficult to think about. Without knowing what trouble it causes, there's no way to understand its problem either.

                              Tom
                              The reason is all repeatable business tasks are already written & well tested.
                              All We have to do is integrate the business with reduced risk,cost & time for business growth.

                              Personally we use WAS and team work here don't know (use) rpg-webservices but Java and warping well tested existing business task called "RPG programs"
                              - Lucky we are!!, that's why we didn't have above issue...

                              Comment

                              Working...
                              X