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.