I am thinking such as the techniques games like Counter Sstrike, WoW etc uses. In CS you frequently have much like 50 ping, can there be in whatever way to transmit information for an online MySQL database at this speed?

Presently I am utilizing an online PHP script which my program demands, but this is actually slow, since the program first needs to send headers and publish-information into it, after which retrieve the end result being an regular web page.

There need to be any simpler, faster method of carrying this out? I have learned about TCP/IP, is things i should use here? Is it feasible for this for connecting towards the database inside a faster way than not directly through the PHP script?

TCP/IP consists of three methods:

  1. TCP
  2. UDP
  3. ICMP

ICMP is what you're using whenever you ping another computer on the network.

Games, like CounterStrike, don't worry about that which you formerly did. So there is no requirement of completeness, to have the ability to rebuild that which you did (and that's why rivals need to tape what they're doing). This is exactly what UDP can be used for - there is no guarantee that information is shipped or received. And that's why lag could be this type of problem - you are already dead, you simply did not realize it.

TCP guarantees that information is sent and received. Reduced than UDP.

You will find to produce to understand to possess a fast connection - less hops, etc.

Client-to-server for latency-critical stuff? Use non-obstructing UDP.

For reliable stuff that is one little reduced, if you are using TCP make certain you need to do so inside a non-obstructing fashion (choose(), non-obstructing send, etc.).

The large reason to make use of UDP is for those who have time-sensitive data - when the position of the animal will get dropped, you are best disregarding it and delivering the following position packet instead of re-delivering the final one.

And That I don't believe any high-performance game has every single call resolve to some call towards the database. It's more prevalent to (if your database is even used) persist data from time to time, or at important occasions.

You are not likely to implement Counterstrike or anything similar on the top of http.

Most games such as the ones you cite use UDP with this (among the TCP/IP suite of methods.) UDP is selected over TCP with this application becasue it is lighter in weight permitting for better performance and TCP's reliability features aren't necessary.

Bear in mind though, individuals games have stand alone clients and servers usually designed in C or C++. In case your application is browser-based and you are trying to get this done over HTTP then make use of a lengthy-resided connection and strip back the headers whenever possible, including snacks. The Tornado framework might be of great interest for you there. You may even wish to consider HTML5 WebSockets however common support continues to be a reasonable way off.

If you're focusing on a browser-based wordpress plugin like Expensive, Java, SilverLight you might have the ability to use UDP but I'm not sure enough about individuals platforms to verify.

Edit:

Also worth mentioning: when your networking code and protocol is sufficiently enhanced there are still things you can do to enhance the knowledge for gamers rich in pings.

Most systems available have a link between the server and also the client open whatsoever occasions. HTTP is really quite a fast protocol. If you're wearing down and restarting an association any time you wish to send a packet, you're investing considerable time doing that.

You need to set factor up to ensure that you are able to effectively add information towards the stream without needing to wait for a response and without needing to reunite frequently. You will find some buss services which will connect clients and servers, HTTP with maintained connections with keep alive will also help.

I would suggest hunting lower good quality books about them though. You will find a lot of tools and libraries available.

Best of luck. Jacob