The scheme selects different colors, and the pattern will overlay the child. At present, I use PHP, but considering the large concurrency in the future, PHP may be difficult to cope with, of course...
There is a recent project that requires an image synthesis function.
Probably like this station http://www.teeume.com/goods/2408.html
Select different colors, and the pattern will be superimposed on different backgrounds.
Currently, I am using PHP, but considering the large concurrency in the future, PHP may be difficult to cope with. Of course, some caching technologies will be used here, such as DoubanDB, to put the first generated image in DoubanDB
I don't know if there can be a better solution, such as using other methods to generate, python, ruby, nodejs... php
In addition, it is said that the performance of php to connect to redis is not very good. It is far from connecting to mysql. Is it better to change it to python?
Reply content:
There is a recent project that requires an image synthesis function.
Probably like this station http://www.teeume.com/goods/2408.html
Select different colors, and the pattern will be superimposed on different backgrounds.
Currently, I am using PHP, but considering the large concurrency in the future, PHP may be difficult to cope with. Of course, some caching technologies will be used here, such as DoubanDB, to put the first generated image in DoubanDB
I don't know if there can be a better solution, such as using other methods to generate, python, ruby, nodejs... php
In addition, it is said that the performance of php to connect to redis is not very good. It is far from connecting to mysql. Is it better to change it to python?
I don't know how big your project is, but I 'd like to say that PHP processes a few images.
Summary: 1. How to do PHP?
A T-shirt has 6 colors (or multiple), that is, 1x6. How many T-shirts does your website have? We can estimate the number of submissions per day.
If 1000 is submitted/day, It is 1000x6/24/60. Is it difficult to process 4 images per minute?
2. How to store 6 colors in a style, one color, and one image on the hard disk? Where can I store the data? Mysql and redis are your choice, but I personally choose mysql because it is linked to my SKU. For example, I need to calculate which sku is sold well every month, mysql is the most suitable
3. What should I do if the user needs frontend operations? For example, you need to move the position and size of the T-shirt pattern. The canvas is not used for your server resources. But you need to consider compatibility. There are also many solutions for SVG and flash. This is not within the scope of the problem, not detailed description
The answer is no need to process images, right ???
Directly record the location information, angle information, and baseboard information of the texture. Php is enough.
In addition, if you have to generate images, we recommend that you do not use fpm, and the process will get stuck if it is not enough.