LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2011, 07:30 AM   #16
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985

Quote:
Originally Posted by resetreset View Post
yes... I guess what my questions was was... HOW do you write a server running inside the browser?
erm... wtf??
 
Old 01-12-2011, 11:53 AM   #17
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
what didn't you understand kewpie?
 
Old 01-12-2011, 12:29 PM   #18
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
Quote:
Originally Posted by arizonagroovejet View Post
You don't.
Oh come on! I wanna try something really cool for the New Year! (too many *15* yr. olds getting into web dev. , gotta keep my reputation intact, y'know? )
 
Old 01-12-2011, 01:25 PM   #19
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by resetreset View Post
Oh come on! I wanna try something really cool for the New Year! (too many *15* yr. olds getting into web dev. , gotta keep my reputation intact, y'know? )
You don't write a mail server that runs a in a web browser because the idea is absurd. I wouldn't like to say that it is technically impossible to do so, but it wouldn't make any sense at all to even consider trying and it would be very, very, very (add in as many more 'very' as you have breath for) complicated.

As acid_kewpie already said the Gmail web interface is just a web page. A fancy web page, but just a web page. There is no 'server' running in the web page. AJAX, in case you don't already know (you didn't know what POP and IMAP are which makes your question of how to write a mail sever that runs in a web browser all the more ludicrous), is Asynchronous Javascript And XML. Traditionally when you wanted to have a web page send data to a web server or display new data that had been receive from the web server you could only do this by reloading the web page. That's still the case in fact if you don't use Javascript. AJAX allows you to send data to the web server in the background without having to reload the web page and also receive new data from the web server in the background which can then be passed to some more Javascript which can up date the web page content without reloading it. (See also using the Document Object Model to manipulate the content of web pages via Javascript.)

The GMail web interface is able to tell that you have got new email without you reloading the web page or manually checking because it contains at regular intervals is uses AJAX calls to talk to the servers at Google and ask them if you've got an new mail in your inbox. When you write an email and hit send some Javascript uploads what you typed to Google's servers along with details of who you want it to be sent to and Google's servers then turn that in to an email and sent it out.


What Gmail does to notify you of new email has nothing to do with what a mail client such as Thunderbird or Evolution would have to do.

The reason typing was slow on your 'really old' machine was probably because your really old machine was, well, really old. Hence slow. The default Gmail interface does have a lot of Javascript it and Javascript needs CPU cycles to run it so if you have a very old slow processor it might struggle. Or it could just have been that your CPU was also busy doing other things. It could also be that your really old machine had very little RAM and had use it all up so and was using the harddisk for swap space as you were typing. Running out of RAM and having to start using swap on harddisk will always make a machine very slow to respond. GMail does have a plain HTML interface without all the Javascript for use on old machines.
 
1 members found this post helpful.
Old 01-12-2011, 01:52 PM   #20
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
Quote:
Originally Posted by arizonagroovejet View Post
receive new data from the web server in the background
Ahh - THIS is what I was wanting to know.

Last edited by resetreset; 01-12-2011 at 01:56 PM.
 
Old 01-12-2011, 02:59 PM   #21
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by resetreset View Post
what didn't you understand kewpie?
I'm concerned you don't even know what a server is...

---------- Post added 12-01-11 at 09:00 PM ----------

Quote:
Originally Posted by resetreset View Post
Ahh - THIS is what I was wanting to know.
You didn't know that?? Did you think it was pixies making the emails appear? How could there possibly not be data flowing in the background?
 
Old 01-14-2011, 01:57 AM   #22
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
Quote:
Originally Posted by acid_kewpie View Post
I'm concerned you don't even know what a server is...

---------- Post added 12-01-11 at 09:00 PM ----------

Eh I meant "listener" - sorry, not something that would, AFTER something (a request) came in, get something from disk and spit it to the network, like a web server or whatever... JUST a listener.

Quote:
Originally Posted by acid_kewpie View Post
You didn't know that?? Did you think it was pixies making the emails appear? How could there possibly not be data flowing in the background?

So - is this WebSockets and WebWorkers then?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why get compiler error: suffix or operands invalid for 'push' (or 'pop') maxreason Programming 1 08-10-2008 10:42 AM
Imap, Pop ziox Linux - Networking 2 01-23-2006 04:35 PM
POP and IMAP together SiE Linux - General 2 06-14-2005 02:26 AM
I need POP and IMAP rufassa Linux - Networking 1 11-08-2003 10:56 AM
email server POP and IMAP petebud Linux - General 3 05-09-2003 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration