forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Event Queue

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Sun Mar 20, 2005 12:53 pm    Post subject: Event Queue Reply with quote

Would it be possible to have multiple events stored in a queue or buffer?

As I write VDS apps they often grow and grow and get more complex.
I eventually find I have difficulty picking up every event expecially
unexpected network events (such as via VDSIPP). At first thought,
It seems to me that if they were queued I could more easily
process them. I guess you would also need to check queue size
and even have the ability to flush.

Question Question

REB

_________________
OLD and eager!
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Mar 20, 2005 11:37 pm    Post subject: Reply with quote

what about storing them in a list, something like

Code:

:evloop
wait event
list add, 1, @event()
goto evloop


this way, you could do a @COUNT() to see if there are any events to process and flushing the queue is very easy as you just need to clear the list

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Mon Mar 21, 2005 2:05 am    Post subject: Reply with quote

Hi Serge;

Thats a good thought and I will certainly keep that approach in mind.
But it seems to me the problem I encounter is that while the script
executes outside this loop, two events sometimes occur. For Instance,
my apps involve constant device polling via SNMP protocol and VDSIPP.
So I get many UDP ON MESSAGE events rapidly and also unpredictably
as well. So if a button CLICK happened while outside the loop it could
get dumped by the ONUDP message event. By the time the script comes
back to the loop it may only have 1 event to add to the list while two have
actually occured. I hope this makes a bit of sense.
And like I mentioned, the scripts get complex managing SNMP
data dumps so a built in queue would seem to be most helpful.

Many thanks for your input Very Happy

REB

_________________
OLD and eager!
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1537

PostPosted: Mon Mar 21, 2005 4:54 am    Post subject: Reply with quote

I'd recommend running the actual UDP within it's own process/exe and then sending back the data to the program/exe with a GUI to display the data. This allows the internet connectivity exe/app to run in it's own processes without having to worry about any other events to handle other then internet related events.
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Mar 21, 2005 8:59 am    Post subject: Reply with quote

PG's advice is sound as regards the working of extensions. VDS is not suited to handling activities that generate large numbers of events. However, VDS (since version 5) does queue events, so I don't know why this topic is in "wish list."
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Mon Mar 21, 2005 11:35 am    Post subject: Reply with quote

Jules said.

Quote:
However, VDS (since version 5) does queue events, so I don't know why this topic is in "wish list."



Ooops ! Guess I should have stated I am using VDS 4. I DID
happen to browse through the help files of the demo of VDS 5
before I posted but did not spot that change. Embarassed

A good reason to look forward to VDS 6 !!!



Thanks all.

REB

_________________
OLD and eager!
Back to top
View user's profile Send private message
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Mon Mar 21, 2005 11:44 am    Post subject: Reply with quote

Serge suggested:


Quote:
:evloop
wait event
list add, 1, @event()
goto evloop


I suppose if i added

list add,1,@event

at busy and critical areas of the script, this may in fact do
what I need it do. Very Happy

Thanks Serge.


REB

_________________
OLD and eager!
Back to top
View user's profile Send private message
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Mon Mar 21, 2005 11:51 am    Post subject: Reply with quote

PGWARE Wrote:

Quote:
I'd recommend running the actual UDP within it's own process/exe


I will mull over that a bit more.Thanks

Very Happy

REB

_________________
OLD and eager!
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Mon Mar 21, 2005 12:44 pm    Post subject: Reply with quote

glad to help reb Smile

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group