A solution for real-time image processing in large concurrent online

Source: Internet
Author: User

Recently, there's a project that needs to do a picture synthesis function.
is probably similar to this station http://www.teeume.com/goods/2408.html


Choose a different color, the pattern will be superimposed on different backgrounds.

I am currently using PHP to implement, but considering the future of large concurrency, PHP may be difficult to cope with, of course, there will be some caching techniques, such as DOUBANDB, the first generation of images placed in the DOUBANDB

Do not know whether this piece can have a better plan, such as in other ways to generate, python,ruby,nodejs...php

In addition, it is said that PHP even the performance of Redis is not good, and even MySQL is far away, whether to change to Python connection?

Reply content:

Recently, there's a project that needs to do a picture synthesis function.
is probably similar to this station http://www.teeume.com/goods/2408.html


Choose a different color, the pattern will be superimposed on different backgrounds.

I am currently using PHP to implement, but considering the future of large concurrency, PHP may be difficult to cope with, of course, there will be some caching techniques, such as DOUBANDB, the first generation of images placed in the DOUBANDB

Do not know whether this piece can have a better plan, such as in other ways to generate, python,ruby,nodejs...php

In addition, it is said that PHP even the performance of Redis is not good, and even MySQL is far away, whether to change to Python connection?

I don't know how big your project is, but I want to say that PHP handles so many pictures.

Let's make a summary: 1. What does PHP do?

A T-shirt 6 colors (also can be many), that is 1x6, your website now how many T-shirts? The amount of submissions per day, this can be fully estimated.

If 1000 commits/day, then it is 1000x6/24/60; processing 4 pictures per minute is difficult?

2. How to save, a style 6 colors, a color a picture, pictures put hard disk, as to where the data put? MySQL, Redis, this is up to you, but I will choose MySQL personally, because this is linked to my SKU oh, and then I need to count the monthly which SKU sells well, MySQL is the most suitable

3. What if the user needs a front-end operation? For example, users need to move the T-shirt pattern position, size or something. Slightly, Downstairs said canvas, do not occupy your server resources of Oh, but you have to consider compatibility Oh, the solution also has a lot of svg,flash, this is not within the scope of the problem, not detailed description

The answer should be no need to deal with the picture???
Directly record map location information, angle information, backplane information on the line. PHP is enough.
In addition, if you do not want to generate pictures, it is recommended not to use FPM, process is not enough to get stuck.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.