Message from discussion
Job Schedule in Mongodb
Received: by 10.58.222.100 with SMTP id ql4mr1468630vec.22.1349341137595;
Thu, 04 Oct 2012 01:58:57 -0700 (PDT)
X-BeenThere: mongodb-user@googlegroups.com
Received: by 10.220.147.138 with SMTP id l10ls1960043vcv.7.gmail; Thu, 04 Oct
2012 01:58:47 -0700 (PDT)
Received: by 10.58.207.43 with SMTP id lt11mr1443882vec.17.1349341127870;
Thu, 04 Oct 2012 01:58:47 -0700 (PDT)
Received: by 10.58.207.43 with SMTP id lt11mr1443881vec.17.1349341127849;
Thu, 04 Oct 2012 01:58:47 -0700 (PDT)
Return-Path: <sam.mill...@gmail.com>
Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182])
by gmr-mx.google.com with ESMTPS id bn19si365183vdb.0.2012.10.04.01.58.47
(version=TLSv1/SSLv3 cipher=OTHER);
Thu, 04 Oct 2012 01:58:47 -0700 (PDT)
Received-SPF: pass (google.com: domain of sam.mill...@gmail.com designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of sam.mill...@gmail.com designates 209.85.220.182 as permitted sender) smtp.mail=sam.mill...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-vc0-f182.google.com with SMTP id fw7so510522vcb.27
for <mongodb-user@googlegroups.com>; Thu, 04 Oct 2012 01:58:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=e9PRUz3z0ZQPRWLBzDSLbTLRXcMj3R63tsCzTStj+uE=;
b=bqPhME8KfCokF2r9vAsQ6bgaCQDIyGxyjmoGMzoNIDN7yafkSKh2phvF1Bz3rKZEAm
aboFSq2kXNRxwmuYRr19Hugry21b9vJ1WHZJDg/KBkF01heJoUP8+cBMVsWxZYJ4N3M+
xs8wuHosuBqzBYuDs84TVQ0CIQ5nANkx0K5fKjo9IFjncshVB2ghPMgYlAkhUobUZqg/
TkAD+ESG+dHnJdsK0XZ+ZuIgnwRiua0GBHUew01QvaAX4tZawaF7uoej/SaXNbEuf0/J
r31UBQIhNBS8yQhxTLPywY3XJ+qBBgWWKEQhqlKYd1qffxEup8swUIohb4h7EZicC/3O
jJrg==
MIME-Version: 1.0
Received: by 10.220.16.12 with SMTP id m12mr2759879vca.14.1349341127730; Thu,
04 Oct 2012 01:58:47 -0700 (PDT)
Received: by 10.58.79.161 with HTTP; Thu, 4 Oct 2012 01:58:47 -0700 (PDT)
In-Reply-To: <CANscxGiPgq5_Gu0jmuM-P9q7nqu2BLcN+aAzeUWpDa1-mqu...@mail.gmail.com>
References: <e5ad9eb2-2c5a-4a6b-859b-1ae31c10a563@googlegroups.com>
<58a18165-31ef-43a6-9f54-9cfa604058d9@googlegroups.com>
<CANscxGiPgq5_Gu0jmuM-P9q7nqu2BLcN+aAzeUWpDa1-mqu...@mail.gmail.com>
Date: Thu, 4 Oct 2012 09:58:47 +0100
Message-ID: <CALKyTE77e=fxQ2efcNPFkaOu_9OA4cFK2T2xdNr3pVLqu15...@mail.gmail.com>
Subject: Re: [mongodb-user] Re: Job Schedule in Mongodb
From: Sam Millman <sam.mill...@gmail.com>
To: mongodb-user@googlegroups.com
Content-Type: multipart/alternative; boundary=bcaec54b46c499667c04cb37f67c
--bcaec54b46c499667c04cb37f67c
Content-Type: text/plain; charset=ISO-8859-1
Server-side execution will lock yes.
I am unsure why you need to run a file in the mongo client application from
your own server side application.
Why can you not run this from your application directly?
On 4 October 2012 03:45, Tom Vo <tom...@nexcel.vn> wrote:
> Hi William
> 1) As your guide, I should not use Stored JavaScript Procedures on
> MongoDB. I have to execute JavaScript file on Mongo Client.
>
> 2) You said that the JavaScript engine is single-threaded. That's
> mean MongoDB will be write locked when this script have not been finished.
> Could you give me document introduce about them?
>
> http://www.mongodb.org/display/DOCS/Server-side+Code+Execution
>
> Thank you for your reply and kindly supports.
>
> On Wed, Oct 3, 2012 at 11:58 PM, William Zola <william.z...@10gen.com>wrote:
>
>>
>>
>> Hi Tom!
>>
>> 1) You should avoid using MongoDB stored JavaScript procedures if you
>> possibly can. The JavaScript engine is single-threaded. If you run
>> critical processes using the JavaScript stored procedures you are likely to
>> have performance problems.
>>
>> 2) MongoDB currently does not have any ability to schedule any tasks to
>> run. There is an existing SERVER ticket with a request to add this
>> functionality. You can follow this ticket and vote it up here:
>> https://jira.mongodb.org/browse/SERVER-2573
>>
>> 3) If you want to schedule a task to run in MongoDB, the best way to do
>> this is with the operating system scheduler. For example, 'cron' on
>> Unix/Linux.
>>
>> Have a great day!
>>
>> -William
>>
>>
>> On Tuesday, October 2, 2012 7:43:52 PM UTC-7, Tom Vo wrote:
>>>
>>> Dear all
>>> Mongodb have support JS function like store procedure, function in SQL
>>> Server. Does Mongodb have to support Job Schedule? How do you do on it?
>>>
>>> Thanks and Regards.
>>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "mongodb-user" group.
>> To post to this group, send email to mongodb-user@googlegroups.com
>> To unsubscribe from this group, send email to
>> mongodb-user+unsubscribe@googlegroups.com
>> See also the IRC channel -- freenode.net#mongodb
>>
>
>
>
> --
>
> Thanks and Best Regards
>
> -------------------------------------------------------------------------------------------------------------
> *Tom Vo*
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
>
--bcaec54b46c499667c04cb37f67c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Server-side execution will lock yes.<br><br>I am unsure why you need to run=
a file in the mongo client application from your own server side applicati=
on.<br><br>Why can you not run this from your application directly?<br><br>
<div class=3D"gmail_quote">On 4 October 2012 03:45, Tom Vo <span dir=3D"ltr=
"><<a href=3D"mailto:tom...@nexcel.vn" target=3D"_blank">tom...@nexcel.v=
n</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi William<div>1) As your guide, I should not use Stored JavaScript Procedu=
res on MongoDB. I have to execute JavaScript file on Mongo Client.=A0</div>=
<div><br></div><div>2) You said that the JavaScript engine is single-thread=
ed. That's mean=A0MongoDB=A0will be write locked when this script have =
not been finished. Could you give me document introduce about them?=A0</div=
>
<div><br></div><div><a href=3D"http://www.mongodb.org/display/DOCS/Server-s=
ide+Code+Execution" target=3D"_blank">http://www.mongodb.org/display/DOCS/S=
erver-side+Code+Execution</a><br><br></div><div>Thank you for your reply an=
d kindly supports.</div>
<div><div><div class=3D"h5"><br><div class=3D"gmail_quote">On Wed, Oct 3, 2=
012 at 11:58 PM, William Zola <span dir=3D"ltr"><<a href=3D"mailto:willi=
am.z...@10gen.com" target=3D"_blank">william.z...@10gen.com</a>></span> =
wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<br><br>Hi Tom!<br><br>1) You should avoid using MongoDB stored JavaScript =
procedures if you possibly can.=A0 The JavaScript engine is single-threaded=
.=A0 If you run critical processes using the JavaScript stored procedures y=
ou are likely to have performance problems.<br>
<br>2) MongoDB currently does not have any ability to schedule any tasks to=
run.=A0 There is an existing SERVER ticket with a request to add this func=
tionality.=A0 You can follow this ticket and vote it up here: <a href=3D"ht=
tps://jira.mongodb.org/browse/SERVER-2573" target=3D"_blank">https://jira.m=
ongodb.org/browse/SERVER-2573</a><br>
<br>3) If you want to schedule a task to run in MongoDB, the best way to do=
this is with the operating system scheduler.=A0 For example, 'cron'=
; on Unix/Linux.<br><br>Have a great day!<span><font color=3D"#888888"><br>
<br>=A0-William <br></font></span><div><div><br><br>On Tuesday, October 2, =
2012 7:43:52 PM UTC-7, Tom Vo wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
>
Dear all<div>Mongodb have support JS function like store procedure, functio=
n in SQL Server. Does Mongodb have to support Job Schedule? How do you do o=
n it?</div><div><br></div><div>Thanks and Regards.</div></blockquote>
<p></p>
-- <br>
You received this message because you are subscribed to the Google<br>
Groups "mongodb-user" group.<br>
To post to this group, send email to <a href=3D"mailto:mongodb-user@googleg=
roups.com" target=3D"_blank">mongodb-user@googlegroups.com</a><br>
To unsubscribe from this group, send email to<br>
<a href=3D"mailto:mongodb-user%2Bunsubscribe@googlegroups.com" target=3D"_b=
lank">mongodb-user+unsubscribe@googlegroups.com</a><br>
See also the IRC channel -- <a href=3D"http://freenode.net#mongodb" target=
=3D"_blank">freenode.net#mongodb</a><br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div></div><=
/div><span class=3D"HOEnZb"><font color=3D"#888888">-- <br><br>Thanks and B=
est Regards<br>------------------------------------------------------------=
-------------------------------------------------<br>
<b>Tom Vo</b><br>
</font></span></div><div class=3D"HOEnZb"><div class=3D"h5">
<p></p>
-- <br>
You received this message because you are subscribed to the Google<br>
Groups "mongodb-user" group.<br>
To post to this group, send email to <a href=3D"mailto:mongodb-user@googleg=
roups.com" target=3D"_blank">mongodb-user@googlegroups.com</a><br>
To unsubscribe from this group, send email to<br>
<a href=3D"mailto:mongodb-user%2Bunsubscribe@googlegroups.com" target=3D"_b=
lank">mongodb-user+unsubscribe@googlegroups.com</a><br>
See also the IRC channel -- <a href=3D"http://freenode.net#mongodb" target=
=3D"_blank">freenode.net#mongodb</a><br>
</div></div></blockquote></div><br>
--bcaec54b46c499667c04cb37f67c--