This topic contains 1 reply, has 0 voices, and was last updated by Olivier Gagnon NC 6 years, 8 months ago.
-
AuthorPosts
-
February 27, 2018 at 10:09 am #21338
NSThriverHey All,
I was hoping someone could lend their expertise to this question I have been mulling over. I know there are some obvious trade-offs to these two, but I just don't know what effects we will incur on our system which is currently on a shared server.
So, we have about 10k products in our instance for which we receive contract/promotional pricing over EDI. We currently have a scheduled script of about 1000 lines of code that essentially does a search of all these custom records that get created in our system and then applies these prices to the items on a daily basis. The script usually takes about 8 retries to completely finish which can take 30 deployments in about 2 hours time to complete. As a software engineer who didn't know much about the requirements, my initial reaction was just refactor this beast and optimize it. It turns out the code is absolutely terrible in every sense of the word, so I figured I would just redesign this whole thing.
I think what I would like to do instead is created a workflow script that never exits and runs during the same time frame, off hours. Creating such a script would be a lot more manageable and only require maybe 100 lines of code and therefore would be easier to read and maitain. Each item would now be in charge of scouring the instance for the custom price record that is applicable only to itself and applying these rates.
What, if anything, would happen to our system if I made this change, going from one scheduled script to one workflow action script that is endlessly initiated on 10k records? I tried searching the documentation and user groups but no one has mentioned this scenario and how it turned out for them. Does anyone have any real experience to this end?
This is a cached copy. Click here to see the original post. -
February 28, 2018 at 7:52 am #21339
Olivier Gagnon NCI think it's ok. What I would probably recommend more though, since you're gonna recode this sucker anyway, is to go with a Map/Reduce script. You'll get much better performance, as you can make use of your multiple threads.
-
AuthorPosts
You must be logged in to reply to this topic.