I'm new to mongodb and I'm not sure if parallel write/delete operations on one collection can be a problem.
Use-Case: --- There's a collection of the name 'message' and my program has two threads. Thread 'A' adds continuously new documents to the collection 'message' and thread 'B' removes old documents from the collection 'message' at the same time. Both threads access the same collection but they operate on different documents. Does mongodb manage this for me?
> I'm new to mongodb and I'm not sure if parallel write/delete operations on
> one
> collection can be a problem.
> Use-Case:
> ---
> There's a collection of the name 'message' and my program has two threads.
> Thread 'A' adds continuously new documents to the collection 'message' and
> thread 'B' removes old documents from the collection 'message' at the same
> time.
> Both threads access the same collection but they operate on different
> documents.
> Does mongodb manage this for me?
> Maybe there are other concepts to handle this.
> Thanks in advance.
> Best Regards
> OZ
> --
> 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
> I'm new to mongodb and I'm not sure if parallel write/delete operations
> on one
> collection can be a problem.
> Use-Case:
> ---
> There's a collection of the name 'message' and my program has two threads.
> Thread 'A' adds continuously new documents to the collection 'message' and
> thread 'B' removes old documents from the collection 'message' at the
> same time.
> Both threads access the same collection but they operate on different
> documents.
> Does mongodb manage this for me?
> Maybe there are other concepts to handle this.
> Thanks in advance.
> Best Regards
> OZ
> -- > 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
> On Thu, Oct 4, 2012 at 1:11 PM, OZAYAMA <markus.sc...@googlemail.com<javascript:> > > wrote:
>> Hi List,
>> I'm new to mongodb and I'm not sure if parallel write/delete operations >> on one >> collection can be a problem.
>> Use-Case: >> --- >> There's a collection of the name 'message' and my program has two threads. >> Thread 'A' adds continuously new documents to the collection 'message' and >> thread 'B' removes old documents from the collection 'message' at the >> same time. >> Both threads access the same collection but they operate on different >> documents. >> Does mongodb manage this for me?
>> Maybe there are other concepts to handle this.
>> Thanks in advance.
>> Best Regards
>> OZ
>> -- >> You received this message because you are subscribed to the Google >> Groups "mongodb-user" group. >> To post to this group, send email to mongod...@googlegroups.com<javascript:> >> To unsubscribe from this group, send email to >> mongodb-user...@googlegroups.com <javascript:> >> See also the IRC channel -- freenode.net#mongodb
> thanks for the fast response. I've seen that page a couple of days ago so
> it was a good reminder.
> I'll take a look at the following presentation and try to understand what
> concurrency means in the mongodb world.
>> On Thu, Oct 4, 2012 at 1:11 PM, OZAYAMA <markus.sc...@**googlemail.com>wrote:
>>> Hi List,
>>> I'm new to mongodb and I'm not sure if parallel write/delete operations
>>> on one
>>> collection can be a problem.
>>> Use-Case:
>>> ---
>>> There's a collection of the name 'message' and my program has two
>>> threads.
>>> Thread 'A' adds continuously new documents to the collection 'message'
>>> and
>>> thread 'B' removes old documents from the collection 'message' at the
>>> same time.
>>> Both threads access the same collection but they operate on different
>>> documents.
>>> Does mongodb manage this for me?
>>> Maybe there are other concepts to handle this.
>>> Thanks in advance.
>>> Best Regards
>>> OZ
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "mongodb-user" group.
>>> To post to this group, send email to mongod...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> mongodb-user...@**googlegroups.com
>>> See also the IRC channel -- freenode.net#mongodb
>> --
> 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
> On Thu, Oct 4, 2012 at 3:08 PM, OZAYAMA <markus.sc...@googlemail.com<javascript:> > > wrote:
>> Hi,
>> thanks for the fast response. I've seen that page a couple of days ago so >> it was a good reminder. >> I'll take a look at the following presentation and try to understand what >> concurrency means in the mongodb world.
>>> On Thu, Oct 4, 2012 at 1:11 PM, OZAYAMA <markus.sc...@**googlemail.com>wrote:
>>>> Hi List,
>>>> I'm new to mongodb and I'm not sure if parallel write/delete operations >>>> on one >>>> collection can be a problem.
>>>> Use-Case: >>>> --- >>>> There's a collection of the name 'message' and my program has two >>>> threads. >>>> Thread 'A' adds continuously new documents to the collection 'message' >>>> and >>>> thread 'B' removes old documents from the collection 'message' at the >>>> same time. >>>> Both threads access the same collection but they operate on different >>>> documents. >>>> Does mongodb manage this for me?
>>>> Maybe there are other concepts to handle this.
>>>> Thanks in advance.
>>>> Best Regards
>>>> OZ
>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "mongodb-user" group. >>>> To post to this group, send email to mongod...@googlegroups.com
>>>> To unsubscribe from this group, send email to >>>> mongodb-user...@**googlegroups.com
>>>> See also the IRC channel -- freenode.net#mongodb
>>> -- >> You received this message because you are subscribed to the Google >> Groups "mongodb-user" group. >> To post to this group, send email to mongod...@googlegroups.com<javascript:> >> To unsubscribe from this group, send email to >> mongodb-user...@googlegroups.com <javascript:> >> See also the IRC channel -- freenode.net#mongodb
I've inserted 1.000.000. documents in my 'message' collection and a concurrent task has deleted the older ones. I've counted all messages that came in and the number was exactly 1.000.000. So it seems that's no problem for mongodb to handle concurrent accesses on one collection - before this test this wasn't clear to me - lack of understanding on my side ;-)
> Yes, I'm using rabbitmq for that purpose - thanks for the hint.
> -OZ
>> On Thu, Oct 4, 2012 at 3:08 PM, OZAYAMA <markus.sc...@googlemail.com>wrote:
>>> Hi,
>>> thanks for the fast response. I've seen that page a couple of days ago >>> so it was a good reminder. >>> I'll take a look at the following presentation and try to understand >>> what concurrency means in the mongodb world.
>>>> On Thu, Oct 4, 2012 at 1:11 PM, OZAYAMA <markus.sc...@**googlemail.com>wrote:
>>>>> Hi List,
>>>>> I'm new to mongodb and I'm not sure if parallel write/delete >>>>> operations on one >>>>> collection can be a problem.
>>>>> Use-Case: >>>>> --- >>>>> There's a collection of the name 'message' and my program has two >>>>> threads. >>>>> Thread 'A' adds continuously new documents to the collection 'message' >>>>> and >>>>> thread 'B' removes old documents from the collection 'message' at the >>>>> same time. >>>>> Both threads access the same collection but they operate on different >>>>> documents. >>>>> Does mongodb manage this for me?
>>>>> Maybe there are other concepts to handle this.
>>>>> Thanks in advance.
>>>>> Best Regards
>>>>> OZ
>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "mongodb-user" group. >>>>> To post to this group, send email to mongod...@googlegroups.com
>>>>> To unsubscribe from this group, send email to >>>>> mongodb-user...@**googlegroups.com
>>>>> See also the IRC channel -- freenode.net#mongodb
>>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "mongodb-user" group. >>> To post to this group, send email to mongod...@googlegroups.com >>> To unsubscribe from this group, send email to >>> mongodb-user...@googlegroups.com >>> See also the IRC channel -- freenode.net#mongodb