RE: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Yes, polling using Timer will work fine. I even have an example on www.cflex.net http://www.cflex.net/ , but it is pretty simple to do. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of anuj sharma Sent: Wednesday, October 22, 2008 12:02 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Guys Thanks for your different approaches to solve this problem.I will try all of them and see which one will suit my management, but i really appreciate that. I have one solution which recently struck me , please let me know if this is the right one. Can I use the Timer class to create a timer instance which will periodically call HTTP and check which entries are in database and update the dataProvider with the recent entries. Do you guys think this is going to work. i am going to explore all the solutions recommended by you guys and see which is most convenient and efficient to implement with my deadline. Please let me know if Timer thing is going to work for database. Again Appreciate your help Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
@mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Mark I looked at the official website of Light stream , it seems that that's what we need. Now my question to you is if I am using this for my company do i have to pay something or is it totally going to be free. Are there any licensing issues involved with that. Please let me know Thanks Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED]wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Tracy Thanks for the link. Now in the link i couldn't find the specific example using timer for constant calling for HTTP service. Can you please tell me where exactly the example is located. Your help will be appreciated. Thanks Anuj On Wed, Oct 22, 2008 at 10:15 AM, Tracy Spratt [EMAIL PROTECTED]wrote: Yes, polling using Timer will work fine. I even have an example on www.cflex.net, but it is pretty simple to do. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, October 22, 2008 12:02 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Guys Thanks for your different approaches to solve this problem.I will try all of them and see which one will suit my management, but i really appreciate that. I have one solution which recently struck me , please let me know if this is the right one. Can I use the Timer class to create a timer instance which will periodically call HTTP and check which entries are in database and update the dataProvider with the recent entries. Do you guys think this is going to work. i am going to explore all the solutions recommended by you guys and see which is most convenient and efficient to implement with my deadline. Please let me know if Timer thing is going to work for database. Again Appreciate your help Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED] wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Anuj, i would go for Paul's recommendation with some small variations: 1) if the application is single user, the you do not need to poll, you can insert the data directly in your data source as at any given point you know that new nodes are added to the database. For example: You do some sort of backend call to insert new staff in the db and in the response handle you update the tree data source manually via addChild or similar (depending on xml array collection and so on). 2) if your application is multiuser, i would go for 1) and at the same time poll the db with a timestamp or last id, so you ask only for new data (insertions or deletions) and then manually update your datasource... It might be slightly more complicated but you have far far less wire communications, db and backend processing and so on... Fotis On Wed, Oct 22, 2008 at 9:21 PM, anuj sharma [EMAIL PROTECTED] wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation [EMAIL PROTECTED],
RE: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
http://www.cflex.net/showFileDetails.cfm?ObjectID=560 Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of anuj sharma Sent: Wednesday, October 22, 2008 2:20 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Tracy Thanks for the link. Now in the link i couldn't find the specific example using timer for constant calling for HTTP service. Can you please tell me where exactly the example is located. Your help will be appreciated. Thanks Anuj On Wed, Oct 22, 2008 at 10:15 AM, Tracy Spratt [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Yes, polling using Timer will work fine. I even have an example on www.cflex.net http://www.cflex.net/ , but it is pretty simple to do. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of anuj sharma Sent: Wednesday, October 22, 2008 12:02 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Guys Thanks for your different approaches to solve this problem.I will try all of them and see which one will suit my management, but i really appreciate that. I have one solution which recently struck me , please let me know if this is the right one. Can I use the Timer class to create a timer instance which will periodically call HTTP and check which entries are in database and update the dataProvider with the recent entries. Do you guys think this is going to work. i am going to explore all the solutions recommended by you guys and see which is most convenient and efficient to implement with my deadline. Please let me know if Timer thing is going to work for database. Again Appreciate your help Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Tracy Thank you very much for the link. I really appreciate that. Anuj On Wed, Oct 22, 2008 at 1:05 PM, Tracy Spratt [EMAIL PROTECTED] wrote: http://www.cflex.net/showFileDetails.cfm?ObjectID=560 Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, October 22, 2008 2:20 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Tracy Thanks for the link. Now in the link i couldn't find the specific example using timer for constant calling for HTTP service. Can you please tell me where exactly the example is located. Your help will be appreciated. Thanks Anuj On Wed, Oct 22, 2008 at 10:15 AM, Tracy Spratt [EMAIL PROTECTED] wrote: Yes, polling using Timer will work fine. I even have an example on www.cflex.net, but it is pretty simple to do. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *anuj sharma *Sent:* Wednesday, October 22, 2008 12:02 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Hi Guys Thanks for your different approaches to solve this problem.I will try all of them and see which one will suit my management, but i really appreciate that. I have one solution which recently struck me , please let me know if this is the right one. Can I use the Timer class to create a timer instance which will periodically call HTTP and check which entries are in database and update the dataProvider with the recent entries. Do you guys think this is going to work. i am going to explore all the solutions recommended by you guys and see which is most convenient and efficient to implement with my deadline. Please let me know if Timer thing is going to work for database. Again Appreciate your help Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED] wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED]john%40jpfisher.net wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
A word of caution Anuj. I don't know if your timer works once a second or once a minute, or once every two minutes. If you have only one online user, it's not too huge a deal either way. If you have a hundred users you can cause big problems for your server. The timer technique just makes the best of a bad job. Usually a lot of care is taken over database and query design to minimise the impact of large numbers of users. Unfortunately the timer technique gives the server a lot of work even when the number of users is quite small. Remember a timer on the client just affects one user and there's usually processor power to spare. A timer in conjunction with a server database access stresses the server. It stresses the server a lot. End of cautionary note. Paul - Original Message - From: anuj sharma To: flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:31 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Just one more word of caution. The timer MUST allow enough time for the server to complete the request that you have asked of it. The last thing that you want is to stack up requests to the server. Ideally in this timer environment you won't make a request to the server while the last request hasn't yet completed. Bit harder than at first sight, isn't it? Paul - Original Message - From: Paul Andrews To: flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:39 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help A word of caution Anuj. I don't know if your timer works once a second or once a minute, or once every two minutes. If you have only one online user, it's not too huge a deal either way. If you have a hundred users you can cause big problems for your server. The timer technique just makes the best of a bad job. Usually a lot of care is taken over database and query design to minimise the impact of large numbers of users. Unfortunately the timer technique gives the server a lot of work even when the number of users is quite small. Remember a timer on the client just affects one user and there's usually processor power to spare. A timer in conjunction with a server database access stresses the server. It stresses the server a lot. End of cautionary note. Paul - Original Message - From: anuj sharma To: flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:31 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
RE: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Obviously you must look at the overall picture, but I have a production install where 300 clients hit the server once every 15 minutes, and about 30 of those actually hit it about every 2 minutes. Because of essentially random effects sometimes there are often more than 60 hits per minute. The server is pretty beefy, a Xeon processor (now about 3 years old) and I have yet to see it breathe hard. The data payloads are quite small. I suspect I could up the frequency of the polling by a factor of 10 and still would not trouble the server. So pay attention to the server load, but don't dismiss polling out of hand. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews Sent: Wednesday, October 22, 2008 6:51 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Just one more word of caution. The timer MUST allow enough time for the server to complete the request that you have asked of it. The last thing that you want is to stack up requests to the server. Ideally in this timer environment you won't make a request to the server while the last request hasn't yet completed. Bit harder than at first sight, isn't it? Paul - Original Message - From: Paul Andrews mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:39 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help A word of caution Anuj. I don't know if your timer works once a second or once a minute, or once every two minutes. If you have only one online user, it's not too huge a deal either way. If you have a hundred users you can cause big problems for your server. The timer technique just makes the best of a bad job. Usually a lot of care is taken over database and query design to minimise the impact of large numbers of users. Unfortunately the timer technique gives the server a lot of work even when the number of users is quite small. Remember a timer on the client just affects one user and there's usually processor power to spare. A timer in conjunction with a server database access stresses the server. It stresses the server a lot. End of cautionary note. Paul - Original Message - From: anuj sharma mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:31 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] mailto:john%40jpfisher.net wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
- Original Message - From: Tracy Spratt To: flexcoders@yahoogroups.com Sent: Thursday, October 23, 2008 12:17 AM Subject: RE: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Obviously you must look at the overall picture, but I have a production install where 300 clients hit the server once every 15 minutes, and about 30 of those actually hit it about every 2 minutes. Because of essentially random effects sometimes there are often more than 60 hits per minute. The server is pretty beefy, a Xeon processor (now about 3 years old) and I have yet to see it breathe hard. The data payloads are quite small. I suspect I could up the frequency of the polling by a factor of 10 and still would not trouble the server. So pay attention to the server load, but don't dismiss polling out of hand. It wasn't my intention to dismiss polling. It's a question of getting it to work right according to the circumstances. Your figures show a modest load on the server. If your 300 clients hit the server every minute it might be different. As you rightly say, spreads of polling times would mean that the peak server hit would be far worse than five hits per second. You have a dedicated server, the OP might have a more modest setup. It just needs a little thought about loading levels and polling frequency. It all depends as they say! Paul Tracy -- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews Sent: Wednesday, October 22, 2008 6:51 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Just one more word of caution. The timer MUST allow enough time for the server to complete the request that you have asked of it. The last thing that you want is to stack up requests to the server. Ideally in this timer environment you won't make a request to the server while the last request hasn't yet completed. Bit harder than at first sight, isn't it? Paul - Original Message - From: Paul Andrews To: flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:39 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help A word of caution Anuj. I don't know if your timer works once a second or once a minute, or once every two minutes. If you have only one online user, it's not too huge a deal either way. If you have a hundred users you can cause big problems for your server. The timer technique just makes the best of a bad job. Usually a lot of care is taken over database and query design to minimise the impact of large numbers of users. Unfortunately the timer technique gives the server a lot of work even when the number of users is quite small. Remember a timer on the client just affects one user and there's usually processor power to spare. A timer in conjunction with a server database access stresses the server. It stresses the server a lot. End of cautionary note. Paul - Original Message - From: anuj sharma To: flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:31 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
I'd start the timer only when a successful result returns, and then I'd set it for (pollingFrequencyDelay + Math.round(Math.random() * lastResponseTime)) each time, so as to slow things down a little when it's under load. -Josh On Thu, Oct 23, 2008 at 8:50 AM, Paul Andrews [EMAIL PROTECTED] wrote: Just one more word of caution. The timer MUST allow enough time for the server to complete the request that you have asked of it. The last thing that you want is to stack up requests to the server. Ideally in this timer environment you won't make a request to the server while the last request hasn't yet completed. Bit harder than at first sight, isn't it? Paul - Original Message - *From:* Paul Andrews [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Wednesday, October 22, 2008 11:39 PM *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help A word of caution Anuj. I don't know if your timer works once a second or once a minute, or once every two minutes. If you have only one online user, it's not too huge a deal either way. If you have a hundred users you can cause big problems for your server. The timer technique just makes the best of a bad job. Usually a lot of care is taken over database and query design to minimise the impact of large numbers of users. Unfortunately the timer technique gives the server a lot of work even when the number of users is quite small. Remember a timer on the client just affects one user and there's usually processor power to spare. A timer in conjunction with a server database access stresses the server. It stresses the server a lot. End of cautionary note. Paul - Original Message - *From:* anuj sharma [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Wednesday, October 22, 2008 11:31 PM *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED]john%40jpfisher.net wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Do not dismiss Paul's advice... 300 hundrend or even 2000 clients is not a problem...Polling every second would not create a problem on a server with correct caches and so on... Add your app in facebook and then you have a problem (possibly 1-4 millions registers in first couple of months) On Thu, Oct 23, 2008 at 2:14 AM, Josh McDonald [EMAIL PROTECTED] wrote: I'd start the timer only when a successful result returns, and then I'd set it for (pollingFrequencyDelay + Math.round(Math.random() * lastResponseTime)) each time, so as to slow things down a little when it's under load. -Josh On Thu, Oct 23, 2008 at 8:50 AM, Paul Andrews [EMAIL PROTECTED] wrote: Just one more word of caution. The timer MUST allow enough time for the server to complete the request that you have asked of it. The last thing that you want is to stack up requests to the server. Ideally in this timer environment you won't make a request to the server while the last request hasn't yet completed. Bit harder than at first sight, isn't it? Paul - Original Message - *From:* Paul Andrews [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Wednesday, October 22, 2008 11:39 PM *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help A word of caution Anuj. I don't know if your timer works once a second or once a minute, or once every two minutes. If you have only one online user, it's not too huge a deal either way. If you have a hundred users you can cause big problems for your server. The timer technique just makes the best of a bad job. Usually a lot of care is taken over database and query design to minimise the impact of large numbers of users. Unfortunately the timer technique gives the server a lot of work even when the number of users is quite small. Remember a timer on the client just affects one user and there's usually processor power to spare. A timer in conjunction with a server database access stresses the server. It stresses the server a lot. End of cautionary note. Paul - Original Message - *From:* anuj sharma [EMAIL PROTECTED] *To:* flexcoders@yahoogroups.com *Sent:* Wednesday, October 22, 2008 11:31 PM *Subject:* Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED]john%40jpfisher.net wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation [EMAIL PROTECTED],
RE: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Definitely skip a poll if a previous call has not returned.. I poll every 15 minutes in general, but if a client has pending business, then I increase that clients polling frequency, and return it to normal frequency when the business is completed. I have to whine a bit here and say here that my polling solution was a last minute change. I had built the app using sockets and had essentially zero latency, but the client changed the network topology at the last minute and their IT people were unable to open my socket access, so with less than two weeks to drop-dead go-live, I implemented polling. It still hurts, but there is no funding to make another go at socket connection, especially when the client is quite happy with the status quo. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Wednesday, October 22, 2008 7:14 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help I'd start the timer only when a successful result returns, and then I'd set it for (pollingFrequencyDelay + Math.round(Math.random() * lastResponseTime)) each time, so as to slow things down a little when it's under load. -Josh On Thu, Oct 23, 2008 at 8:50 AM, Paul Andrews [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Just one more word of caution. The timer MUST allow enough time for the server to complete the request that you have asked of it. The last thing that you want is to stack up requests to the server. Ideally in this timer environment you won't make a request to the server while the last request hasn't yet completed. Bit harder than at first sight, isn't it? Paul - Original Message - From: Paul Andrews mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:39 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help A word of caution Anuj. I don't know if your timer works once a second or once a minute, or once every two minutes. If you have only one online user, it's not too huge a deal either way. If you have a hundred users you can cause big problems for your server. The timer technique just makes the best of a bad job. Usually a lot of care is taken over database and query design to minimise the impact of large numbers of users. Unfortunately the timer technique gives the server a lot of work even when the number of users is quite small. Remember a timer on the client just affects one user and there's usually processor power to spare. A timer in conjunction with a server database access stresses the server. It stresses the server a lot. End of cautionary note. Paul - Original Message - From: anuj sharma mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 11:31 PM Subject: Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help Bingo Guys Thats' exactly what i need. Tracy's Timer example works perfect for me. Again thanks a lot for your help. Anuj On Wed, Oct 22, 2008 at 2:29 PM, john fisher [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Anuj I meant, search through the online adobe docs for 'timer polling example' or other keywords like those. there are many many examples in the online docs at Adobe. John anuj sharma wrote: Hi John I am not sure i get what you are trying to say. Can you be please elaborate little bit more. Thanks Anuj On Wed, Oct 22, 2008 at 10:13 AM, john fisher [EMAIL PROTECTED] mailto:john%40jpfisher.net wrote: @mark: thanks will check it out @anuj: this is just exactly what the adobe sample code does, except not directly to the database. anuj sharma wrote: ... Can I use the Timer class to create a timer instance which will periodically call HTTP a -- Therefore, send not to know
Re: [flexcoders] Re: How to keep Tree control synchronized with the database. Please Help
Hi Guys Thanks for your different approaches to solve this problem.I will try all of them and see which one will suit my management, but i really appreciate that. I have one solution which recently struck me , please let me know if this is the right one. Can I use the Timer class to create a timer instance which will periodically call HTTP and check which entries are in database and update the dataProvider with the recent entries. Do you guys think this is going to work. i am going to explore all the solutions recommended by you guys and see which is most convenient and efficient to implement with my deadline. Please let me know if Timer thing is going to work for database. Again Appreciate your help Anuj On Tue, Oct 21, 2008 at 7:26 PM, markgoldin_2000 [EMAIL PROTECTED]wrote: I have been working on a data pushing solution using Lightstreamer push server. Works with Flex via Ajax bridge. True real time data updates. Take a look at LS push server web site. They have examples for Flex. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, john fisher [EMAIL PROTECTED] wrote: I am working on a similar problem... I don't use PostGres, but there may be some sort of export to XML function. *If* that can fire on changes ( or you set up the inserts/updates that way), then you have something that an httpservice can acquire directly. But somebody still has to ask the file if it changed... unless You use a socket connection to stuff an event into the dataprovider. Theres some examples in the adobe docs. or you poll, but don't refresh the whole html page, just the data in the swf, and only when it changes. My users cant tell the difference between polling and the socket connection in the two demos I made. I'm just a newbie, so if there is another way, I'd sure like to hear about it. John Paul Andrews wrote: Isn't this simply a problem that multiple calls are required to poll the database for change? I think the OP really needs a push type service. There's no way to know that the database table has changed without polling the database..