Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Background service for internet

36 views
Skip to first unread message

Javi Pérez

unread,
Jun 12, 2013, 7:35:28 AM6/12/13
to
Hello,

I am asking for advice about how to start a project for not restart it at the middle of the work.

What I plan is something like this (for let you understand):

* Background service based on HTTP requests, updating data profile from social networks
* Create routines that will be always running until the user ask for stop
* Create a web interface
* Store result in a database

The first problem is: using threads or not? will this generate different problems in the future?
I planed to create a main script which reads the database (the web interface will feed it with new commands) for start a new process which will run the routines creating a [thread::create] and separate every user commands per thread. Or is better to let the main script run every HTTP requests of all users at once and manage the user with the database ID?

About webinterface, i want to make it totally independent to this background script since it can be a webapp in the future and run on different servers (maybe)

is this a stable structure for a project like this?

Mark Janssen

unread,
Jun 12, 2013, 8:17:53 AM6/12/13
to
It seems that basically you want a web application backed by a database. And have a separate process for filing this database.
This seems a perfectly fine design to me. I would suggest to use separate processes for the social website collecting part and the web part. You could then in the future combine both using threads, but using two separate processes in the beginning makes it easier to keep their function modular.

So before diving into details of how to use threads or how to manage concurrent users (maybe separate interps are already enough), I would first think about what should be in the database and what type of commands you can run. So look at the bigger picture first.

Hope this helps,
Mark
0 new messages