A
A
Alexander Kouznetsov2011-04-15 15:17:06
PHP
Alexander Kouznetsov, 2011-04-15 15:17:06

What to write a demon on

There is a need to write a demon that will perform various manipulations with databases. Now this is provided by a cyclic call to a php script from bash, which is somewhat crooked (in the sense that such tasks should not be solved in php).
To implement such a task on the pluses, IMHO, bust.
Please advise someone.

So far, apart from Erlang, nothing has come to mind, but it has dynamic typing, which I would like to avoid.
I added Python applicants to the piggy bank, but again, dynamic typing, which I don’t want.

Answer the question

In order to leave comments, you need to log in

14 answer(s)
A
antivir, 2011-04-15
@antivir

Why don't you like dynamic typing?

Y
yadeveloper, 2011-04-15
@yadeveloper

What to write a demon on

In Ada language? :)
But seriously, why not just run a direct query from the interpreter (mysql --execute="" or < script.sql)? There, you can transfer it through the pipeline, and you don’t need to do any processing and compile anything

M
mark_ablov, 2011-04-15
@mark_ablov

If you want php - phpdaemon
In general, node.js is a good solution.

R
Roman, 2011-04-15
@WNeZRoS

If you don't like php, use bash instead. From a simple one, it can also be perl or python.

A
asm0dey, 2011-04-15
@asm0dey

Need a simple scripting language? Well, try groovy, or something.
Of course, it is not as easy as Javascript, but its typing is very static (only implicit).

A
Alexander, 2011-04-15
@akalend

php + php_libevent - the best option
if you really need the performance of a daemon, then C / C ++
is a lot of examples on the net

V
Vladimir Chernyshev, 2011-04-16
@VolCh

If you definitely need a static language, but not c / pluses, then look towards Java / C #.

F
Fafnir, 2011-04-16
@Fafnir

Java + Quartz. Time tested! Take only a lightweight container, not JBOSS, it will be easier.

A
andrewsh, 2011-04-16
@andrewsh

I will suggest Tcl.

V
vanxant, 2011-04-17
@vanxant

In general, on modern pluses with modern libs (mysql ++), working with a muscle turns out to be just surprisingly pleasant. =)
So on what you know how - on that and write.

S
strib, 2011-04-17
@strib

Is there any point in an external application?
DBMS support task execution (JOB in Oracle, EVENT in MySQL, etc.)

E
el777, 2011-04-15
@el777

That means
> different manipulations with databases.
?
Is it recalculation of statistics once per hour? Or accepting user data? That is, the work of a regular website?
Decide on a task. If closer to the first option, then I would choose python - it is very convenient to write, everything works fine.
My task is this: from several suppliers, data is taken in XML form, parsed, added to the database.

F
Fafnir, 2011-04-16
@Fafnir

By the way, regarding dynamic typing, there are unit tests, integration tests. You still have to write them, so you should not dismiss Python for this reason, nevertheless, the development speed is higher.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question