Futurescale, Inc.
PureMVC Home
The PureMVC Framework
Code at the Speed of Thought
Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
New discussions should be taken up in issues on the appropriate projects at
https://github.com/PureMVC
PureMVC Architects Lounge
Announcements and General Discussion
Architecture
Database blocking Notification?
Pages: [
1
]
« previous
next »
Author
Topic: Database blocking Notification? (Read 6748 times)
shizny
Full Member
Posts: 31
Database blocking Notification?
«
on:
March 18, 2008, 06:30:40 »
Hello. I have an application I'm creating that uses the sqlite database. I have one method where I am inserting quite a few rows of information into a database. I use a few insert statements to get all the data in their correct tables. I'm trying to output a status of how many rows have been inserted while the user waits 'cause sometimes it can take 20 seconds or so. The problem I'm running into is that when I broadcast a notification in between inserts it is not picked up until all the inserts have happened. I can trace out stuff in between inserts, and I even use a preliminary select statement to feed each insert statement so I know stuff is going on in between inserts. I open the database in synchronous mode. Does anybody know what I could be doing wrong?
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: Database blocking Notification?
«
Reply #1 on:
March 18, 2008, 07:58:49 »
Sounds as if AIR is unhappy relinquishing the thread during synchronous i/o. Trace doesn't count, that's debug player stuff.
Put a breakpoint on the line after you successfully trace and are sending a notification. Then step through in the debugger and see what happens.
-=Cliff>
Logged
shizny
Full Member
Posts: 31
Re: Database blocking Notification?
«
Reply #2 on:
March 19, 2008, 06:43:45 »
thanks. I'll give it a go.
Logged
puremvc
Global Moderator
Hero Member
Posts: 2871
Re: Database blocking Notification?
«
Reply #3 on:
March 19, 2008, 08:33:57 »
Also, you might want to give this Serialization Proxy that Nathan came up with a try:
http://forums.puremvc.org/index.php?topic=344.0
I think we'll probably can it as a utility so you don't have to bang your head against this sort of thing.
-=Cliff>
Logged
Rhysyngsun
Courseware Beta
Sr. Member
Posts: 51
Nathan Levesque
Re: Database blocking Notification?
«
Reply #4 on:
March 19, 2008, 12:52:14 »
Could you post a snippet of your code, shizny?
The only thing I can think of that could be causing this is if your notifications are within a transaction block.
Logged
My Blog/Site
shizny
Full Member
Posts: 31
Re: Database blocking Notification?
«
Reply #5 on:
March 31, 2008, 07:32:55 »
What happens if my notification gets called from a sqlite transaction block?
Logged
trilec
Sr. Member
Posts: 52
Re: Database blocking Notification?
«
Reply #6 on:
March 31, 2008, 09:42:35 »
Hi Shizny,
Its my understanding that while in a transaction block statistic (if this is the same problem you are having) information will not be updated instantly. Each server process transmits access counts to the collector before going idle; this means a transaction still in progress does not affect statistic totals. I also think the collector itself only reports intermittently, this can mean displayed information lags behind internal activity. So from within a mysql sometimes statistics will appear not to change as long as you continue the current transaction.
hope that helps
T
Logged
Pages: [
1
]
« previous
next »
Stack Overflow
GitHub
Linked In
Google Plus
Twitter
Powered by SMF 2.0.15
|
SMF © 2006-2007, Simple Machines LLC
|
Content © 2006-2018, Futurescale, Inc.
Loading...