December 11th, 2013, 04:12 PM
Is Facebook done with Php Mysql?
Hi I have 2 web related questions:
1 - What is the right way to find out what server side scripting language has a website been done with? Can't tell much from the URLs.
2 - There is a feature on Facebook I am not sure how it works.
If someone sends me a message, it instantly pops up on "my" screen. Is it something like Jquery periodic updater? If so does it update every second? That wouldn't amke sense, that would be too much work. So what is it really?
December 11th, 2013, 05:19 PM
1. It's not always possible. Good sites will try to hide that information from you (with varying degrees of success) but sometimes you can recognize an implementation by how it behaves. It's detective work and not always easy to teach.
2. I don't use Facebook so I can't actually see that happening, but they could use something advanced like WebSockets or something simple like AJAX polling (possibly with a very long timeout as the server waits for something to say rather than immediately respond with nothing).
December 11th, 2013, 08:05 PM
in regards to question 2, being that it is happening on the front end you could investigate the page source to see what's going on a bit.
From memory facebook is written in their own derivative of PHP which has been optimised for what they want to do, with a nuts mysql cluster behind it.
The front end stuff you're asking about would probably be some form of jquery at a total guess.
if you're trying to mimic this, there is probably something on github that would do what you need.
December 12th, 2013, 09:40 AM
The web based chat programs I've written have always been long-timeout polls back to the server. The server will wait until a message is available, then spit it out and die. The client receives the new message, puts it on your screen, then initiates another long-running poll.
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.
December 12th, 2013, 09:55 AM
I think that facebook uses "Now JS"
"For if leisure and security were enjoyed by all alike, the great mass of human beings who are normally stupefied by poverty would become literate and would learn to think for themselves; and when once they had done this, they would sooner or later realise that the privileged minority had no function and they would sweep it away"
- George Orwell, 1984
December 23rd, 2013, 07:47 AM