06-25-2012 1:17 PM
Hi all,
I lock for a technique to share data between background jobs. The jobs could run on different application servers, so I guess "shared objects" would not work. Is there any solution to share data in kind of global server independent memory? I know, DataBase could be an option, but exists an other way?
Thanks for your support
Markus
06-26-2012 2:12 PM
The only way, except using the database, is to use one of the application servers to store the data, and allow access from the other application servers.
Let's say you've got three app servers - A, B and C. Create a destination for A in SM59. Create an RFC to handle the shared objects that you want, with logic like this:
If the function module is running on app server A - return the value of the shared object.
If the function module is running on B or C - call the function module, with DESTINATION A.
matt
06-25-2012 1:34 PM
Why are you concerned with which Application Server the process runs on?
Does your object consumes lot of time and resources? I doubt that. As it is, you are running the program in back ground mode. I hope you are not expecting any real time outputs from the same.
Focus on code optimization, don't worry about the execution details. (In case of performance Issue).
In case you really want to execute the program in "multi-run" mode, you can go for Asynchronous RFC calls, but it is too much programming effort, with no guarantee for optimization.
06-25-2012 2:04 PM
Hi Chinmay,
the background is the following:
We work with massactivity runs, where parallel jobs run on different appl. servers. Now often we face the requirement to process one input file with this parallel jobs. So I want to implement a central class, that manages file processing and supplies the single jobs with the corresponding file content to process. The class should be stored in a kind of global server independent memory, in order that all jobs can access it.
06-25-2012 2:51 PM
This concept is new to me. Sorry, can't help you. Would be very much interested in knowing how it is done. But anyway, you should focus on your query.
06-26-2012 2:12 PM
The only way, except using the database, is to use one of the application servers to store the data, and allow access from the other application servers.
Let's say you've got three app servers - A, B and C. Create a destination for A in SM59. Create an RFC to handle the shared objects that you want, with logic like this:
If the function module is running on app server A - return the value of the shared object.
If the function module is running on B or C - call the function module, with DESTINATION A.
matt
06-26-2012 2:25 PM
06-27-2012 2:16 PM
Hello Markus,
For typical scenarios like yours require persistent storage of data objects - as Matt has mentioned.
I've used the INDX-like tables to store the data & access it using the corresponding EXPORT/IMPORT statements.
: Quite interesting way of handling Shared Objects over multiple servers Thanks for the tip!
BR,
Suhas
07-24-2020 3:14 PM
Isn't SM59 connection is bound to hostname, not to instance? One cannot create separate connection for AS instance of the same server
07-27-2020 10:58 AM
I'm not sure what your point is. But, if your instance comprises two application servers - serv01 and serv02, say - there's nothing to stop you creating multiple RFC destinations directly to either server.
Maybe some special instance setup could stop this, but I've used specific appserver RFC destinations in multiple landscapes.