Can we take a step back and understand what the business problem is that you're trying to solve? Why do you need the agent to run every second? What does this agent need to do? Are you processing queue items or just running an activity? Perhaps there is another way to address that need.
The Requirement is we need to send some communication to end user in real time, A third party is injecting data in our Database (Not a Listner but in DB :( .. So as soon as the record is inserted in DB we need to process it and send a communication within 1 min i.e Near Real time. Turn arround time given by business is only 1min, max they can extend is upto 3 min from the point the data is inserted in pega DB to the Message received by the customer.
Otherwise I would have never thought of running a agent every min.. NEVER..
Posted: 4 years ago
Posted: 16 Dec 2016 14:31 EST
Mike Townsend (MikeTownsend_GCS)
Director, Software Solutions Engineering
So there is no way to have the third party come in via a listener that could fire off an activity? Hmmm? That's tricky. As you mentioned, you can run an agent every 5 seconds, which is still not as frequent as you'd like, but close. Once the agent picks up the change, what are you doing with it? Are you just sending a notification or are you processing work based on it first and then communicating the outcome? Have you done timings for that work to understand if 5 seconds isn't frequent enough? How many nodes do you have? Presumably the more nodes, the higher the likelihood that one of them is running at any given second, so adding more nodes/agents running activities to pole the table for changes, the less likely that you'll miss your window. Of course, then you need to start worrying about concurrency/race type conditions.
All of that will have performance impacts, so you will need to ballance performance needs against the need to process the change near instantaneously.