Developer forum

Forum » Development » Stock update
Ben Doorn
Reply

Guys,

Is it save to bypass the API for stock updates, and push them directly to the database. I always prefer using the API, but with one project updating through the API take more than an hour. We can speed up this by pushing the data direcly to the database, but what are the riscs of doing.

The client wants to update the stock data more frequently, but then we have to make it faster.

Ben


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Ben,

Did you consider using the Data Integration Framework? Conceptually, it sits somewhere between the API and the database. It performs really well and also handles cache issue that you might run into when you do a direct database update.

Imar

 
Ben Doorn
Reply

Hi Imar,

Yes we did, but at the start from the project (2 years ago) the framework was to limited. When this project start now, I sure would have used the integration framework. But right now we need to speed it up without rebuilding the integration, there is a lot more integration than stock state.

Ben

 
Nicolai Høeg Pedersen
Reply

Hi Ben

You can go directly on the database with regards to stocklevels being relatively 'save'. As Imar suggests, caching could be the issue depending on what else you update. But stock states are changing all the time, so actual stocklevels are not cached - but stock locations etc. is. Also make sure the index is updated if you use that one after the update.

You can use IF for this task only if you want to...

BR Nicolai

 
Ben Doorn
Reply

Hi Nicolai,

We will only update the stocklevels, stocklevels can change very fast in this case, thanx. If this was a new project I would certainly go for the IF.

Kind regards,

Ben

 

You must be logged in to post in the forum