What is the best way to make an almost e-commerce site with a current system in as400 database?
I have an as400 system that stores all information about our articles, like price, availability, code, description and so on. The availability use to change more often as things get sold, but all this happens into the as400 system.
N开发者_高级运维ow I would need to make an online store with all the articles, but I only have access to the database.
My question:
Is better to make a copy of the articles state every day and put on another database (mysql) to use on a web server, or is better to make a link ( * ) between the webserver and the database?
( * ) The webserver can't be on the same server where as400 works
Link to DB2 always, MySQL for IBM i is discontinued, the last version is 5.0.67
You can improve performance caching common results with Zend_Cache or other techniques.
For the moment, ignore the fact that your database server is DB2 on i. What would you do if the database were on SQL Server? Oracle? MySQL? The answer is probably that external factors like 24 x 7 availability or the desire to keep the full database machine out of the DMZ are more important than the database platform itself.
DB2 on i has the same facilities every other database has. Stored procedures, ODBC/JDBC access - it's really not that different from other databases. No matter whether you choose to extract the data elements you need or to directly access the database in real time, I would advise you to ask the DB2 programmers to make you some stored procedures.
If you want live access to your availability, you should use some sort of remote connection to your i so you can dynamically update the availability. Depending on how your network and web server is setup, you can do direct DB connection or use a web service. Just remember security while setting this up.
Another option may be automatic updates to the web database on a regular basis. Regular would be based on your expected traffic volume. I would probably do more than one update a day so you don't have people over-ordering what you have in stock.
The other challenge is updating your back-end database with the orders. That should use the same method as you use to pull the data.
精彩评论