Let’s say I want to build an application that lets users auto-tweet at certain times of the day. With this sure-fire million dollar idea in mind*, what’s the best practice method to structure the two different parts of my application?
I’ve built video games before, and I’ve built websites before. In a video game you have a game loop, where the game is always running, taking user input, processing updates and rendering an image at 30/60 FPS. In a website, it has no loop – it responds to URL calls with static or dynamic information, usually reading from a database.
But the auto-tweet app isn’t either of these. It has two parts:
- The part where the user inputs their data: the message, how often to auto-tweet etc.
- The part where the server sends the tweets at scheduled times.
These two parts are completely different. So my question is: how do you structure this application? Or should I have two completely separate applications? If so, how do I manage the communication between them? How do you manage the two parts, i.e. pausing the backend tweet sending, while leaving the front end up?
This is a vague question, so here are some specifics:
- For scheduled tasks, I’ve used cron for simple stuff, but this clearly isn’t suitable for this situation. Is there something more complex that can be used instead?
- I am sure there are complex solutions for solving this problem “at scale”. Unfortunately, I’m working on this at a scale of “me in my spare time”, so simplicity is very important.
- If it helps, I am considering Django for the front-end, and I’m aware there are Python packages for scheduling events.
- I know this is fairly opinion based, so to ground this a bit: are there established best practices so this situation?
*To be 100% clear: this is a joke.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!