cancel
Showing results for 
Search instead for 
Did you mean: 

POWL shared memory usage - multi-application server

ChrisPaine
Active Contributor
0 Kudos

Hello,

Following on from a comment that Thomas made in a recent thread:

[Thread where Thomas Jung made an interesting observation about shared memory objects|;

Keep in mind that Shared Memory objects are per application server. If you have multiple application servers you either need to try something else or build in logic to check/populate Share Memory on each application server.

I've been having a look at the standard POWL shared memory handling in the POWL Easy Feeder and I couldn't see how it would cope with a multi-app server environment. (Perhaps it can and I'm not looking hard enough).

If it could it would seem that it would get that functionality from the CL_SHM_SERVICE class, etc.

Is there any particular way that we should consider using shared memory objects - as per the POWL Easy Feeder, or otherwise, to ensure that we don't end up with issues in a multi-app server environment? Or is there certain settings we should be making where we are using shared memory within our WD ABAP applications to ensure that they are all running on the same app server? (Like how I managed to tie the question back into WD ABAP? - I'm seriously considering if I need to cross post to a different forum...)

I would be interested in any experiences/examples/blogs that people have put out there.

Cheers,

Chris

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Is there any particular way that we should consider using shared memory objects - as per the POWL Easy Feeder, or otherwise, to ensure that we don't end up with issues in a multi-app server environment?

I've not ever looked into the implementation details fo POWL, but it may not need be concerned with the multiple application server situation. If you are just using Shared Memory for a cache, then what does it matter? The first request from another application server will fill the cache on that server. No reason to propigate to all application servers.

On the other hand if you are using Shared Memory as a cross session communication mechanism you do have to consider the multiple application server situation. This is the case in the new WDA Notification System in 7.02. Event registration is placed into a shared memory object on the current application server. When an update to the status of that event occures the logic in the SAP Code calles TH_SERVER_LIST to get the listing of all current application servers. It then calls an RFC with Destination (for the hostname where the event is registered). This RFC makes the update the shared memory object.

If you really need a cross appliation server cache you can folllow the same process of calling an RFC with Destination to each application server whenever data is created or updated in the shared memory object.

ChrisPaine
Active Contributor
0 Kudos

Thanks Thomas,

If I wasn't already handing out for EhP2 - I would even more so now!

As per your comment on POWL - it is using the cache to share information between sessions - clicking on an action can trigger the launch of the a new window (new- non modal - different session) which then reads details passed from the launching POWL.

in the feeder implementation handle_action method of class CL_POWL_EASY_FEEDER around line 315 you can see how they use shared memory object to pass details of the current POWL and the data within it - this can then be picked up by any subsequently launched applications. - for example the WD ABAP POWL_EASY_DEMO - which reads the URL parameter GUID generated in the HANDLEDEFAULT event of the main window and uses it to retrieve the data from the shared memory object.

Seems to me like it would be worth writing an abstract implementation of CL_SHM_AREA that does this multi-server work and using it as a basis for all app that need this type of access. Sounds like a great idea - but as the platforms I'm on at the moment are all single app server - it'll have to wait a while.

I look forward to a blog on the usage of the Notification system when it comes up.

Cheers,

Chris

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>I look forward to a blog on the usage of the Notification system when it comes up.

If you are interested in the notification service, then you might want to watch this eLearning on it:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0802995-3433-2c10-2787-d7db5135...

I've built a couple of additional demos since then. One is a push version of the ESME API that uses their long polling REST based interface. I also used the technique at TechEd last year to create "racing" demos to show how two different programming approaches take different amounts of processing time. I'm also building a prototype now that uses the Notification Service for an interesting effect - but I can't talk more about that yet. Overall a very cool technology.

Answers (0)