User Tag List

Results 1 to 10 of 10

Thread: MySQL Repeated POST or GET (What is a reasonable interval?)

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    137
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    MySQL Repeated POST or GET (What is a reasonable interval?)

    Working on a small app which can communicate with other instances of the app via MySQL. For example, when USER1 sends a message it is stored in USER2's table with a binary switch set to let USER2's app know there is a message waiting. I want to essentially ping the MqSQL database to see if that switch has been flipped, which would trigger another request for the message.

    How frequently could I do this without bogging down the database or causing problems with GET commands colliding? I assume every second is way too frequent. Would every 5 or 10 seconds be okay? This would be for a VERY small number of users, but could potentially be used in the future for hundreds, if possible.

    This would be in lieu of setting up server somewhere running an active app to control connections. I'm not sure of any other way to do this from a normal web server.

  2. #2
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,164
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    No feedback but curious. Following.

  3. #3
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    California, USA
    Posts
    1,247
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Your SQL db (server) should be able to handle 1 per second with a limited number of users with no problem.
    If I understand correctly your User2 would be checking the db for the switch and will be getting a negative response most of the time. This is not a problem at all.
    DT
    Special Projects Director

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    137
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DT View Post
    Your SQL db (server) should be able to handle 1 per second with a limited number of users with no problem.
    If I understand correctly your User2 would be checking the db for the switch and will be getting a negative response most of the time. This is not a problem at all.
    That is great insight. Thank you so much for responding!

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Christian_Wheel's Avatar
    Join Date
    Mar 2010
    Location
    Los Angeles
    Posts
    358
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    MySQL is designed to handle thousands of queries per second, so don't be afraid to step up the interval a bit if it will enhance the functionality.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    137
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Christian_Wheel View Post
    MySQL is designed to handle thousands of queries per second, so don't be afraid to step up the interval a bit if it will enhance the functionality.
    Maybe I'll do some testing to see how much I can push it. I just didn't want to bog everything down with MySQL queries which are going to return nothing most of the time.

  7. #7
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,164
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CruddyBuddy View Post
    Maybe I'll do some testing to see how much I can push it. I just didn't want to bog everything down with MySQL queries which are going to return nothing most of the time.
    How are you communicating between your app and database?

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    137
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ratty View Post
    How are you communicating between your app and database?
    Just using the GET object.

  9. #9
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,164
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CruddyBuddy View Post
    Just using the GET object.
    Do you go through a php script or something else?

    Just asking because I have a php script I go through but sometimes my site gets hammered with requests and some php events get timed out or dropped. Looking for a good way to make lots of calls while pulling back on the dropped events.

    I use it for simple save/loading of settings but also usage/activity tracking so lots of random calls in addition to routine calls. I used to save them up and make a single cal and end of frame/application, but if a user walks away with the browser open or closes the browser without logging out I ran into issues.

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    CruddyBuddy's Avatar
    Join Date
    May 2010
    Posts
    137
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ratty View Post
    Do you go through a php script or something else?

    Just asking because I have a php script I go through but sometimes my site gets hammered with requests and some php events get timed out or dropped. Looking for a good way to make lots of calls while pulling back on the dropped events.

    I use it for simple save/loading of settings but also usage/activity tracking so lots of random calls in addition to routine calls. I used to save them up and make a single cal and end of frame/application, but if a user walks away with the browser open or closes the browser without logging out I ran into issues.
    If you want to send me your php (without the database/user/pass info of course) and the mfa I'd be willing to test it on my server and see if it's an issue with your php, game code, or the server itself.

Similar Threads

  1. Spelling error | Particles speed interval
    By thinzy in forum Fusion 2.5
    Replies: 1
    Last Post: 22nd May 2018, 10:05 PM
  2. post.PHP MySQL
    By markymoniom in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th January 2013, 09:49 PM
  3. Reasonable Game Price
    By L13n in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 20th July 2011, 05:17 AM
  4. What's a reasonable swf size?
    By clean_citrus in forum SWF/Flash Export Module Version 2.0
    Replies: 20
    Last Post: 25th October 2010, 10:48 AM
  5. Add repeated substrings based on a value
    By Ran_TH in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 30th April 2009, 08:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •