The purpose of this document, is to guide implementations where real time processing is needed instead batch in background. I’ll try to clarify all the common points related with real time jobs included in DS 4.X based on my recently experiencie with this kind of objects.
The main use of RTJB (real time jobs) is for online processing where by an input message whit a PK or ID, you can get by response, all the information about your “request”, in this case the KEY ID provided in the input message.
Usually RT processing is asociated to a Web service where you have an Input Message and a output as well, eventhough what happend in the middle of the job.
Anyway, you can use RTJB to write in tables, create flat files or any other action that you can perform in batch processing. Please note there are some limitations that also I going to describe on this document.
Important informatión that you must consider:
Why Real time instead Batch?
It depends of the processing type that you are looking for. An example of this:
a) I need to load my DW hourly or once a day ( programed batch jobs)
b) I need a reproceses a lookup table (demand batch job exec or batch job as web service)
c) third party system, need the status of a client by a XML nested schema response ( Real time job web service with custom XML input and response)
Is Web service the only way to use RTJB?
I guess so, maybe there is another use that I hope you discover in your own experience.
But as I said, Real time processing involves you send a message and wait for the response, like WS works. That’s why they work together
What diferences / limitations in deployment have RTJB vs Batch Jobs?
A) RTJB starts with a message and ends with a message. Input message must be the first step in the job. and the end message the last one. The main limitation here, is that you cannot englobe this with a try catch for example. Supose you have an XML with 3 parameter to handle your Real time job, you need to save these
on some persistent area in a DF in order to use them in the following steps. this first DF cannot be handle by try catch.
B) there are diferences in the use of flat files and Template tables. In batch job, the check to delete the table o delete the file, performs the action before the load. In real time jobs if done when jobs ends. This means that TT and Flatfiles keep empty after execution. To avoid this, use persistent tables and use scritps to delete the files instead use the check in the object
C) When the realtime job is published, DS checks the job inside (tables, sintax, and all objects) and if everything is OK, the job starts and can accept request.
D) by design, flat files used in the real time job, keeps blocked by the process. Maybe you need to update the file while the real time job is ready for accept requests. This is not possible if the quantity of requests procesed is greater than 0. In order to update source files you need to restart the job or use Recycle count property.
E) When use flat files or TT, query object does not work as expected or does not have the same behavior as batch job. use XML MAPS or XML Pipeline instead
F) Some transformations that works in Batch job with “lookup_ext” does not work in real time, eventhough validation is OK. As far I know there is a limitation when use XML map where you cannot use another table not involved in the function.
Note: all this information was relevated on DS 4.2 SP6
hope this informatión can help us like helped me.
fell free to ask and I will try to response and update this doc.