OZONE Asylum
Forums
Server-Side Scripting - Oh my!
Anyone used IMAP Proxy????
This page's ID:
30748
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I am sorry parity, but you're teeming up this horse from the wrong end. (and there's *no* benefit using an iframe instead of ajax. But the ajax can tell you to refresh the client side inbox as well). All client side initiated requests are subject to 'timing out'/being cancelled at any given time. So is anything called by a cron job or the windows schedulder equivalent. So is actually anything running on your server - because the server might go down, or the network connection is interrupted or what not. You need to be able to handle an interruption during download of each single e-mail. Once you've done that you can choose any of the methods you have proposed to actually run your mail copying (provided you can provide a way to ensure that there aren't multiple copise trying to download the same e-mails at the same time. A central 'connection managment' instance comes to mind, that keeps a imap-box->open connection list...). Basicially, for each given mailbox-imap box connection you need to do the following: -find the last e-mail you have sucessfully copied (or at least, have a token that the next step will accept). -ask the server for all newer e-mails. -start with the oldest one in the list: -Write down that you're going to retrieve this e-mail (note 1) -retrieve the e-mail. -note that you have retrieved the e-mail, and will now put it in the database(note 2). -Remove note 1. -store e-mail in the database (now becomes 'last sucessfully retreived e-mail') -remove note 2. -proceed with next e-mail in list. -if list is emtpy, refresh list. anytime your code starts, it starts checking backwards: if there's a note 2, we have an e-mail to push into the database. if there's a note 1, we know what e-mail to retrieve. otherwise, we work from the bottom of our list. if our list runs empty, we fetch the new e-mails. Once you have established such an interruptible workflow, (read up on journaling systems), no matter what happens, the system will start retrieving messages again afterwards. Then you can put the actuall calls easily in a continously refreshing ajax call. so long, ->Tyberius Prime ps: 100 messages/minute is no real load for a scalable e-mail system...
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail