Home  >  Q&A  >  body text

php - ecshop group purchasing function development

ecshop group purchasing function development, if there is a plug-in, please share it, or share your development ideas and implementation process at that time?

黄舟黄舟2737 days ago911

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-05-16 13:17:17

    Group buying will cause large concurrency problems. Considering the number of concurrencies per second or tens of thousands, then simply writing and reading through the database is definitely not enough.
    First, consider the number of PVs users visit to avoid slow loading. Please use CDN acceleration to accelerate static resources.
    The second point is that dynamic data should be stored in redis and other nosql, which can speed up data loading.
    Third, the occupied inventory only occurs during the group purchase phase (when clicking to buy, or when paying). This needs to be considered. Of course, in general, I think it is better to take inventory after payment. Because this link is not good enough for the server or a single server can reduce the risk of concurrency
    Considering the concurrency issue, it is of course better to save it in nosql when calculating whether there is still inventory on the day. When the degree of concurrency is too high, nosql may not be able to process a large amount of concurrent data in a timely manner , this requires queue discipline, and then asynchronously returns data to the user. You may need to find corresponding information online~~~

    reply
    0
  • 黄舟

    黄舟2017-05-16 13:17:17

    ecshop Xiaojingdong brings this, it can be downloaded online, just refer to it

    reply
    0
  • Cancelreply