Last time, from the comments it turned out to highlight two specific problems of the project for which many thanks to not indifferent users. The first problem is the lack of an SSL certificate on the site. And second, disclosing access passwords to anyone is an extremely dubious idea.
The solution to the first problem is purely technical - installing a free certificate does not cause much difficulty.
But the solution to the second problem - to exclude the disclosure of connection parameters to its database - this is a question.
Let me remind you, the essence of the project is an online client for the mysql database. The key issue - connecting to the database immediately causes several difficulties:
')
- Disclosure of database connection parameters;
- Even in the case of the disclosure of parameters, it is not a fact that it will turn out to be connected due to administrative restrictions, for example, only local access to the database is allowed.
In this situation, technical contradiction (TP) in the system of triz is cut out on the face. To disclose parameters is necessary to connect, but at the same time, it is impossible to disclose parameters for security. In addition, the disclosure of parameters does not solve the second difficulty - the presence of administrative restrictions.
At Trise, one of my favorite methods is the method of an ideal end result (IFR). This is the strongest method, which allows people to be not afraid to think it would seem absurd, but it is this one that sometimes allows you to achieve the desired results, where it would not seem possible at all.
So on a tripe, I can mentally turn the task upside down. And start solving the problem from the other end.
- It was. The site wants to connect to your private internal database, and wants to do this without disclosing access passwords (Perfect end result).
- And if on the contrary. The database itself wants to connect to a third-party site, but cannot do this due to administrative restrictions.
On the one hand, the song turned out (you are on land, I am at sea ... we can’t meet at all). On the other hand, there are two forces that want to meet, but cannot do this.
It would seem that some land, which sea? And here the database and server. But wait. We all know that it often happens that a boy is liked by a girl and vice versa the same girl is liked by this boy. They are afraid to take a step towards each other. I can not do it myself. It's impossible. But then suddenly, a common girlfriend appears suddenly in both unfortunates. Girlfriend introduces and brings the two shy together. And then everything by itself somehow turns out.
It is important to note here that one cannot do without the appearance of a third force. Just as in the case of a three-fold — you need to enter a third force into the system (a two-force system is considered not complete) and complete the triangle. The clerk made a third force and brought the boy with the girl.
Another policy example. There is Germany, which wants to buy cheaper fuel. There is Iran, which wants to sell fuel to Germany. But Germany has a tough administrative restriction on fuel supplies from Iran. Finish the system of two forces to a full triangle. We introduce the third force - this is Russia. Which can interact with both Germany and Iran. As a result, Germany perfectly interacts with Iran, through transport through Russia.
So a third force is needed. We carry the third force into the incomplete system from the database and the client. As a transport, we will use a certain driver, which will fulfill the role of transmitting (the word here is of course rude, but quite appropriate, if not to dwell on rudeness).
We list the requirements for our driver-transport. Actually there are only two requirements:
- Must interact without restrictions with both the client and the database, acting as a transport
- Must be able to connect to the database
Let's look at the first requirement. Two forces need the same thing. Namely: you need to send requests and in return receive a data set for display. The data channel is naturally used by the Internet.
Let's look at the second requirement. Connecting to the database is possible only on the database side and nothing else. So the driver must be located on the side of the base or be able to connect to it with administrative restrictions. What usually is the default, TC. mysql is used for web applications.
Taking into account the listed requirements, it turns out that it is enough for me to write a simple script translator of queries to the database and return the results as an array of strings. And place it somewhere on the side of the database. I take php, because I can and write literally twenty lines.
Code
header('Content-Type: text/html; charset=utf-8');
Here such simple turned out the driver. Now this script remains to be placed somewhere on your site in an arbitrary place. And register this driver on the client -
dataincrement.com specifying
how to connect to its database.
Thus, it turned out to connect to the database without disclosing the connection parameters in principle. As well as bypassing administrative restrictions. In addition, the driver turned out so simple and understandable that it can be easily modified at will and implemented independently in another language, if necessary. For example, you can add a query history or restrict access only from certain ips to just a couple of additional lines.
Conclusion
In this example, I tried to show the power of the triz in resolving seemingly paradoxical contradictions. I believe that common sense and the logical constructions on which the triz is based and the science of logic, should sooner or later, oust the dominance of home-grown clerics, evangelists, and propagandists. For which no business is the mission, no project is the belief in all good against all bad.