Starr Duskk
asked on
Webservice calling itself. Issues?
I have a webservice that runs a loop through a client's employees.
When it is done, I want it to then call the webservice again to do another client's employees, and then close out the current web services connection.
Reason is: If I call the webservice to run until everything's done, everything does not get done, like there is a timeout.
If I run so many at a time, and then use a schedule to trigger the webservice again, apparently some clients take 4 minutes and some take 30 minutes for the same 500 employees (because some have much more data to process), so we have overlaps with the schedule with too many sessions running at the same time, or not enough running because one quit early and so time is wasted waiting for the schedule to trigger again.
So I was thinking, if I start up the webservice 6x at midnight, and then have each webservice session call the webservice again when it is done, that way there will constantly be 6 active sessions until I stop calling it at 5AM.
So if I do have a webservice call itself, that first webservice will end gracefully because it's done anyway, right? no problems?
thanks!
asp.net
When it is done, I want it to then call the webservice again to do another client's employees, and then close out the current web services connection.
Reason is: If I call the webservice to run until everything's done, everything does not get done, like there is a timeout.
If I run so many at a time, and then use a schedule to trigger the webservice again, apparently some clients take 4 minutes and some take 30 minutes for the same 500 employees (because some have much more data to process), so we have overlaps with the schedule with too many sessions running at the same time, or not enough running because one quit early and so time is wasted waiting for the schedule to trigger again.
So I was thinking, if I start up the webservice 6x at midnight, and then have each webservice session call the webservice again when it is done, that way there will constantly be 6 active sessions until I stop calling it at 5AM.
So if I do have a webservice call itself, that first webservice will end gracefully because it's done anyway, right? no problems?
thanks!
asp.net
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just a comment:
Just because something runs, doesn't mean it's correct from the perspective of software engineering.. It may be sufficient to fulfill your business requirements, but is in most cases at least a technical debt..
You should strongly consider to add additional logging and monitoring here..
Just because something runs, doesn't mean it's correct from the perspective of software engineering.. It may be sufficient to fulfill your business requirements, but is in most cases at least a technical debt..
You should strongly consider to add additional logging and monitoring here..
Where you place a job via the web service and you can poll the execution state of it or you may consider using SignalR to push the state back to your clients.
Then you can off-load the jobs to a Windows service or database job and you're not required to run it in an IIS/ASP.NET session.