This discussion is archived
1 2 Previous Next 25 Replies Latest reply: Jan 3, 2013 1:31 PM by 936409 Go to original post RSS
  • 15. Re: Need to popup error message peopelsoft environment
    jim.marion Pro
    Currently Being Moderated
    Nicolas, what you have said is all true. The problem with resetting the flag is that the first client to check the database would be the only one to get the message. Everyone else would get the N value (unless you store OPRID, session ID, or some other ID per Y response). That is what makes it so critical to notify the client rather than waiting for the client to ask. As far as network saturation, using Ajax is a definite concern. Using long polling/sockets, that is different and should not be an issue. My only concern with long polling/sockets would be maximum concurrent connections exceeded at the server. But after reading this blog post, I don't think it will be a problem: http://blog.caustik.com/2012/08/19/node-js-w1m-concurrent-connections/.
  • 16. Re: Need to popup error message peopelsoft environment
    Nicolas.Gasparotto Oracle ACE
    Currently Being Moderated
    Jim,
    jim.marion wrote:
    ... (unless you store OPRID, session ID, or some other ID per Y response).
    And even if you got it, is this a worth overload ? I don't know what could make the value changes to Y less than a second after the previous update to N (and popup). And if the value is back to Y in that interval, then a new popup will be send a second later, what human can click every second on a popup window ? I'm sure, the customers have better to do than click on popup.
    That is what makes it so critical to notify the client rather than waiting for the client to ask. As far as network saturation, using Ajax is a definite concern.
    And I can assure there's many admin who'd be scared about that.
    Using long polling/sockets, that is different and should not be an issue. My only concern with long polling/sockets would be maximum concurrent connections exceeded at the server. But after reading this blog post, I don't think it will be a problem: http://blog.caustik.com/2012/08/19/node-js-w1m-concurrent-connections/.
    I cannot comment, it's out of my knowledge here. But I'm sure PS has not been designed for this.
    By the way, what about firewall for internet client if any ?
    What about the timeout ? I mean, usually after x minutes of client inactivity, the client is disconnected. Does this solution marks the client as "active" even if he/she does not touched anything ?
    And if the timeout still works fine, then the popup will disappear without the client notices it, would it mean the value is also updated to N ?
    Many questions.

    Again, that's really a very nice challenge you solved here with all the beauty of your code. But I'd be rather skeptical about that every second checking need. And sorry, I'm probably too old for such approach, but I am not sure if I would recommand it for prd use (maybe except as a pure alert/information message without any db update behind - as you said for maintenance...).

    Nicolas.

    Edited by: N Gasparotto on Dec 7, 2012 3:18 PM
  • 17. Re: Need to popup error message peopelsoft environment
    jim.marion Pro
    Currently Being Moderated
    Nicolas, again, everything you said is correct and your concerns are valid.This is a very good discussion and should help other readers better understand how to send notifications from the server.
    And even if you got it, is this a worth overload?
    No. I would not recommend a 1 second ajax interval. That is why I propose a notification option using socket.io and having a real time update sent into node.js from the database, effectively eliminating polling. In my scenario, the database notifies node.js and node.js sends a response to all those waiting requests. Nevertheless, for the original poster, creating the initial Ajax version was a good and necessary learning process.
    What about the timeout ? I mean, usually after x minutes of client inactivity, the client is disconnected. Does this solution marks the client as "active" even if he/she does not touched anything ?
    No, it would not keep the PeopleSoft session active. Once the redirect to the signon page happened, the web socket would close and notifications would stop. The service side of this solution is outside of PeopleSoft, because, like you said, PeopleSoft's design doesn't support it. Since it is outside of PeopleSoft and does not go through the Weblogic server, it won't touch the PeopleSoft session.

    The iScript every second approach, however, would keep the server side session alive, but would not touch the client side notification timer, so the browser would automatically expire the session by calling cmd=logout as designed.
    And I can assure there's many admin who'd be scared about that
    ...
    By the way, what about firewall for internet client if any ?
    This is a misunderstanding. The client initiates the connection. The server keeps the connection open until it has a response. Firewall rules would never allow a server to connect to a client and no admin should allow a web server to initiate a connection to a client. The comet/long polling/socket.io approach uses standard HTTP where the client initiates a connection for the standard request/response cycle. The key difference is that the server doesn't return a response until it has one to send. There is no real TCP/IP overhead involved in this. You just have to make sure your OS is configured to support enough concurrent connections, since client connections will be active.
    I'm probably too old for such approach
    Nicolas, you are FAR from too old. This is very similar to using RENS.
  • 18. Re: Need to popup error message peopelsoft environment
    Nicolas.Gasparotto Oracle ACE
    Currently Being Moderated
    Jim, thanks for clarifying. I think I start to understand what you said. However, whatever the chosen solution, I still don't understand and would not do a check every second as requested by Sabari. Moreover, it would required a lot of tests.
    I'm not sure, but would be an other way to achieve this by making that check on db side after any action triggered by the client and then send back to him/her something like a popup modal prompt on top of the current page ?

    Nicolas.
  • 19. Re: Need to popup error message peopelsoft environment
    jim.marion Pro
    Currently Being Moderated
    Nicolas, you could perform a notification check each time the client makes an HTTP request and then inject a JavaScript notification response. That is another good alternative. It might not be valuable though if the message is, "Server is going down in 10 minutes for maintenance." I agree, I would prefer no polling, not even every 60 seconds -- never. Instead, I would prefer a DB trigger or something that tells all the waiting listeners it is time to send a message.
  • 20. Re: Need to popup error message peopelsoft environment
    Nicolas.Gasparotto Oracle ACE
    Currently Being Moderated
    jim.marion wrote:
    ... It might not be valuable though if the message is, "Server is going down in 10 minutes for maintenance."
    Yes, sure, not in that case. I rather thought that could be an alternative for the Sabari's case.
    Anyway, thanks a lot for sharing your invaluable coding knowledge !

    Nicolas.
  • 21. Re: Need to popup error message peopelsoft environment
    jim.marion Pro
    Currently Being Moderated
    I rather thought that could be an alternative for the Sabari's case.
    Yes, absolutely. And it might be. The requirement didn't give enough details to know.
  • 22. Re: Need to popup error message peopelsoft environment
    936409 Newbie
    Currently Being Moderated
    jim marion /N Gasparotto ,

    Thanks for this nice discussion and information.

    To N Gasparotto - For your question "Why this requirement came?" "Why we need to have 1 sec check with database?"

    Answer : My requirement is kind of customer support. Cutomer will call via phone system using emplid as input. Once support agent pick up the call a interface from external phone system will update the table in peoplesoft with EmplD and current agent Info. Support agent should get popup window Emplid information component with out touching the keyboard (if the current user is active login in the system ), agent ca be there in any page, component , any where in the peopesoft . But it should pop once he attend the call.

    Note : Peoplesoft delivered CTI system already does this , i gone through the code. Its kind of non stopping analysis. Its a huge frame work. Reason why i am looking for some other option.

    To jim marion,

    I came up with some new ideas for this solution. Please provide your comments here.

    1.Record got Inserted from External phone interface.
    2.Create a Database trigger for the interface record.
    3.Database trigger update the PS_SCHDLDEFN record(peoplesoft Scheduling) field STARTDATETIME to current date time.
    4.Create a application engine to populate the Global variables with current userID and Boolean.
    5.PS_SCHDLDEFN update will tigger the job for the application engine process.
    5.Ajax will check for every one second current userID and Boolean via Iscript.
    6.If the Boolean is ture for the USERID then popu the window for the current user.


    I was also analysing on following thing in peoplesoft
    1. how peoplesoft Scheduling component is automatically schedule the application engine process ? Where this code is tigggered ?
    2. how peoplesoft IB handler packing code is automatically tiggering the Application package peoplecode when XML response we got from external system? Where this code is tigggered ?

    If we can able to find out this , we may create a new frame work ourself like below

    A component with following fields

    1. Peoplesoft record
    2. Which application code needs to tigger?

    Once we configure this , when there is a new row inserted this package will tigger automatically . Like this we can do for query, CI and so on.

    This wil simpley the efforts for external interface in peoplesoft.

    Thanks,
    Sabari
  • 23. Re: Need to popup error message peopelsoft environment
    936409 Newbie
    Currently Being Moderated
    jim marion /N Gasparotto ,

    Thanks for this nice discussion and information.

    To N Gasparotto - For your question "Why this requirement came?" "Why we need to have 1 sec check with database?"

    Answer : My requirement is kind of customer support. Cutomer will call via phone system using emplid as input. Once support agent pick up the call a interface from external phone system will update the table in peoplesoft with EmplD and current agent Info. Support agent should get popup window Emplid information component with out touching the keyboard (if the current user is active login in the system ), agent ca be there in any page, component , any where in the peopesoft . But it should pop once he attend the call.

    Note : Peoplesoft delivered CTI system already does this , i gone through the code. Its kind of non stopping analysis. Its a huge frame work. Reason why i am looking for some other option.

    To jim marion,

    I came up with some new ideas for this solution. Please provide your comments here.

    1.Record got Inserted from External phone interface.
    2.Create a Database trigger for the interface record.
    3.Database trigger update the PS_SCHDLDEFN record(peoplesoft Scheduling) field STARTDATETIME to current date time.
    4.Create a application engine to populate the Global variables with current userID and Boolean.
    5.PS_SCHDLDEFN update will tigger the job for the application engine process.
    5.Ajax will check for every one second current userID and Boolean via Iscript.
    6.If the Boolean is ture for the USERID then popu the window for the current user.

    I was also analysing on following thing in peoplesoft
    1. how peoplesoft Scheduling component is automatically schedule the application engine process ? Where this code is tigggered ?
    2. how peoplesoft IB handler packing code is automatically tiggering the Application package peoplecode when XML response we got from external system? Where this code is tigggered ?

    If we can able to find out this , we may create a new frame work ourself like below

    A component with following fields

    1. Peoplesoft record
    2. Which application code needs to tigger?

    Once we configure this , when there is a new row inserted this package will tigger automatically . Like this we can do for query, CI and so on.

    This wil simpley the efforts for external interface in peoplesoft.

    Thanks,
    Sabari
  • 24. Re: Need to popup error message peopelsoft environment
    jim.marion Pro
    Currently Being Moderated
    I followed you up to step 2.

    On step 3 it sounds like you are trying to insert into the process scheduler tables to start an App Engine. I've never done this.
    Step 4 populate global variables -- I believe they will just be global for the life of the App Engine. I don't think that is what you want.
    Step 5, yes, I believe if you update the process scheduler tables correctly, that will happen
    Step 5.2 If you were hoping your Ajax iScript would read from the global variables, then I'm not sure it will work. You can try it, but the App server instances between process scheduler and online app server are not connected
    Step 6, yes, that is good

    Step 5 still doesn't address the network traffic issue of reconnecting every second. Yes, if globals would have worked, you would have eliminated the database traffic, but that is minimal.

    For your other questions, when you submit a job to the process scheduler, the PeopleSoft API's write the job information into the process scheduler tables. On interval, the process scheduler checks those tables and launches any scheduled processes. IB OnRequest handlers are triggered by code within the IB pub/sub processes. It calls the PeopleCode handler and renders a response. This is a standard request/response cycle. Some external application initiated a request, IB used metadata to call an app class and render a response.

    It is nice to hear your scenario. It is a very, very good scenario for a call center. If you don't want to use MCF and RENS for this, I still recommend socket.io. Sockets will eliminate the bottleneck and performance issue caused by a 1 second polling interval. In the solution I described, your external phone system could send the notification directly to a node.js server running socket.io. This would send the notification out to the appropriate user. If you need to use logic in PeopleSoft to identify the appropriate support agent, then you would continue to have PeopleSoft receive the external phone system message, perform any logic, and then make a %IntBroker.ConnectorRequestURL call out to node.js to notify the appropriate connected client. It is a very simple solution. I had it up and running in my VirtualBox portal VM in a matter of hours.
  • 25. Re: Need to popup error message peopelsoft environment
    936409 Newbie
    Currently Being Moderated
    Thanks Jim,

    I really want to use this socket.io/ node.js . But i am not having the basic knowladge how to use this . Please provide some guidelines which will help me.


    Regards,
    Sabari
1 2 Previous Next

Legend

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