Caching or why Steam banned my IP [Mob development history. applications]

Foreword



A long time ago, back in 2017, I came up with the idea of ​​creating a mobile application that will be useful for those guys who buy and resell things on Steam. But for a long time my knowledge did not allow me to do this. A lot of time has passed, and I remembered about this idea. Having estimated my strength now, I set about developing.



Main part



Then, in 2017, I began my development path with an interesting service for creating simple MIT App Inventor applications (a kind of application builder from Google).



image



(This is the design that I did in 2017, as a beginner. Isn't that awful? I stopped on the design)



Once, at one of the local hackathons in my city, I pretty well pumped up the skill of server technologies, how it works there, what POST / GET requests are, how the server responds to them and all that. At home, I picked up a local server in a week and made several scripts: a small chat and registration. The API was written in PHP.



image



And so I remember about that application and begin to google the Steam API. After sitting on the forums for 10-15 minutes, I realized that finding the Steam API is not so simple. But it is.



image



The application should work like this: the user downloads it. Somehow adds items that interest him. Signs the price for which they bought. And this price is compared with the present, and profit is shown. After 20 minutes, I understand that I found everything you need, you can write code.



For two approaches, for two evenings I wrote the main script, which, by the exact name of the item from Steam in English, adds it to the list and displays the price. On the third day, I launch the application and it does not work. The first thing I thought about: “Maybe I'm so lucky that at the time when I decided to make such an application, Steam decided to change the api?” That's because null came in response to those very requests. I had to go to the forums again.



image



After reading a little, I realized that this problem is not with me alone. It reassured me. In general, it was about caching. At that moment I did not know what it was. He knew more precisely, but he never applied it and forgot about this moment. As a result, this situation: every time I do refractoring (application logic, design) and compile the application, requests are sent to Steam servers. Over the last evening, Steam just thought that I was a bot that every 10 seconds restlessly bangs on the prices of certain items, and banned my ip. I also found various information that there is a certain number of requests per day that can be made so as not to be banned.



image



And what do you think? All the messed up I downloaded the VPN (ha ha). He stopped the flow of requests and made a delay that would update prices once every 300 seconds ~ 5 minutes. I had to rewrite the system, since the real prices will already be stored in the local storage and will be updated every 5 minutes, and not delivered every time from the Steam servers.



Here the system works, and I set about designing the application and designing it on the page on Google Play. The word "Steam" stuck in the name. The icon should have been something like this:



image



Upon request, there are several unofficial applications on the Google Play “Steam” that somehow work with the most popular gaming platform. But not one of them has its exact logo in it. I contacted one developer and asked him questions like: “But do you have problems with Valve using their API, why is there such an icon and can the word“ Steam ”be shoved into the name?” The answer was this:



image



(Not well, in fact, “Steam” from the English “Steam.” What can I not use the word “Steam”? I redid the icon)



Conclusion



Most probably will not understand the fact that in some games pixels can cost something ...



Such a funny story. I learned a lot of experience. I hope that those who read this article will not make the same mistakes as me.



PS a couple of screenshots from the application:



image







All Articles