View Single Post
Old 08-25-2016, 06:01 AM  
drexl
Whale Hunter
 
drexl's Avatar
 
Industry Role:
Join Date: Jan 2016
Posts: 945
Quote:
Originally Posted by astronaut x View Post
Anyone have an opinion on a time interval to cron the database update? 4 seconds? 10 seconds? Less frequent?

Whats an acceptable amount of time for the update file to take to run? If I just run the chaturbate update, it only takes a few seconds in my browser. However, I also added a livejasmin to it and it takes nearly 15 to 20 seconds in a browser (locally). Maybe its faster running it on a server and setting up cron?

If I have several different cam sites I am updating, should I run them all on the same update file? or should I set and cron each one up using a different update file?

I suppose I will probably answer some of my questions after I move operations to my server. Any friendly advice is greatly appreciated though.

You can use 1 cron that runs multiple threads (1 per sponsor) or 1 cron per sponsor
The idea is each thread imports into a MySQL table for example, and then you have a SQL view that display aggregated data from across these tables.
Synchronization doesn't matter much, you just display when the data is there.

My cron is scheduled to run every minute for Chaturbate. It is not real time but I don't mind because if the broadcaster is not online I show someone else. I am not sure you can make a cron more granular than 1 mn and it wouldn't be acceptable for the sponsors because of the unnecessary strain on their servers (ie: if everyone was to pull data every second for example)
__________________
drexl is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote