MongoDB is a scalable, high-performance, open source, document-oriented database. It supports a large number of languages and application development platforms.
0
votes
0answers
18 views
Can this implementation heavily harm write performance? [on hold]
For some reason I need to reimplement a method of this interface:
Task Save(ISagaData sagaData, Dictionary<string, string> sagaAuditMetadata);
This is the ...
2
votes
0answers
30 views
Knowledge base app using MEAN stack
I've been working on an app based on the MEAN Framework. I have got the app working but I just wasnt sure whether my coding structure and standard was good enough, meaning does it adhere to the ...
0
votes
0answers
41 views
Optimizing LINQ with SelectMany aggregation
I have the following query which appears to be a bottleneck in my app:
...
1
vote
0answers
14 views
1
vote
0answers
24 views
Properly updating multiple MongoDB documents with Angular
In the app I'm creating, when a user upvotes a post, the post should be upvoted, as well as the user that wrote the post. But this updates two MongoDB documents. This presents a number of issues. I'll ...
3
votes
1answer
35 views
Nesting BsonDocuments in MongoDB queries
I have a MongoDB collection setup where each document's JSON looks like this:
...
2
votes
0answers
46 views
Sentiment analysis on tweets in MongoDB
What i have done here is used 2 scripts in which from my main file I am using streaming api for particular handles and that data being directly pushed to ...
4
votes
1answer
35 views
MongoDB - Find records in one collection that match string in 2nd collection
I have a MongoDB collection of product IDs/unique products attributes and a second collection of codes that relate to attributes common for products whose IDs are prefixed with those codes.
For ...
5
votes
1answer
62 views
Listening from Mongodb always and triggering
I am using classes for the first time. In this program I want the object to run infinitely so that any change in the MongoDB will trigger the function and do the necessary processing.
I am little ...
1
vote
1answer
36 views
mongodb query in waterline,sailsjs
Because it is a lot of code, I don't want to ask for details what is wrong, but want to ask about review what can be changed in approach to this.
This is controller that make query:
It grabs data ...
3
votes
1answer
61 views
Updating state with React
I am creating a blog using React, MongoDB, Express and Node. I have three components: App, List, and Item. The item is a blog post; the list is a list of the blog posts, and the app includes a place ...
5
votes
1answer
58 views
Image duplicate finder
I have a bunch of exact-duplicate pictures that I've acquired over the years. I'd like to create a list of all them so I can eventually delete some. My idea was simple: dump the hash and location of ...
13
votes
2answers
122 views
Builder pattern for users in document database
I'm attempting to make a builder pattern that makes sense and is practical for storing user data in a flexible way in a document database. The DB I chose is MongoDB, and I'm using its Java API ...
2
votes
0answers
32 views
Trade off in database efficiency versus a nested for loop on client
I built an app where a user has a recipe box with recipes in it - for the db, there is a user and recipe model, user has "recipeBox" property. The recipebox is an array of objects like so:
User ...
0
votes
0answers
460 views
A plugin that integrates Angular Smart Tables with Mongoose DB for server side pagination
I'm using Angular Smart Tables with data that might become a huge set of documents and rows. So rather than client side processing of the data for pagination, I borrowing code from two Mongoose.js ...
2
votes
2answers
82 views
6
votes
3answers
50 views
Pulling Docker Machine IP
I am working with MongoDB through Docker, and I have a terrible bash command to pull the Docker Machine IP so I can sanely connect locally.
...
7
votes
1answer
50 views
Retrieving StackExchange sites and tags
I have setup agenda tasks to periodically retrieve and possibly insert new SE sites and tags in my MongoDB database.
Some things that bother me in particular:
Lots of code duplication
No string ...
0
votes
1answer
55 views
Flattening a 2D array to use map/reduce
I have been trying to get better at functional programming, which includes understanding map/reduce. I wrote a function intended to fill an autocomplete with values. The challenge I was encountering ...
4
votes
2answers
675 views
Get all followers and friends of a Twitter user
I'm trying to find my bug or any potential bottleneck that cause my program to be really slow. The script is to get all the followers and friends and save that in MongoDB.
...
1
vote
0answers
43 views
Pulling data quickly from mongodb with node.js
I am currently struggling with a request I am making to my server that is taking more than 4 seconds! I cut out a lot of the cruft to hopefully make it easier to read. Excuse my horrible variable ...
1
vote
0answers
168 views
Game server in Java querying MongoDB for JSON
I was hoping someone would have a look at how I retrieve the questions from the db, parse the JSON and process the results - possibly advise how I could improve efficiency by streamlining my code. I ...
0
votes
1answer
137 views
Multi-player game server accessing and querying MongoDB
I have a remote hosted server that's running Java VM with custom server code for a multiplayer real-time quiz game. The server deals with matchmaking, rooms, lobbies etc. I'm also using a MongoDB on ...
0
votes
0answers
258 views
MongoDB repository, dynamic objects, Razor Templates
I am writing a repository for MongoDB and are looking for some review at its current state. I am looking for ways to improve it without adding complexity.
Should I be using a Singelton pattern for ...
2
votes
0answers
28 views
Modify records at one time
Do you think this works well? I.e, do I need to close the database connection at the end? The goal is to be able to upsert and delete many records in one shoot.
Here is is an example HTTP POST ...
7
votes
2answers
96 views
Recursive download articles and dump to MongoDB
This is simple code that recursively downloads articles from the public WordPress API:
...
8
votes
1answer
164 views
One-to-many relationship with Python objects
I have built Python objects to simulate a one-to-many relationship and then store the object in a MongoDB instance. I am using lots of composition to achieve what I want. The code works perfectly fine ...
3
votes
1answer
135 views
Realtime chat service
I am new to Node.js and Socket.io. I implemented a realtime chat service that has a chatroom feature. When the actual product is launched, there will be at least 200 concurrent users with 50 groups of ...
0
votes
1answer
87 views
Constructing MongoDB document from a dict with character code-to-integer translation
I have an class definition:
...
4
votes
1answer
75 views
Tabulating a report
I have a method for generating a report in Python. I want to organize the section about the date into a separate method so I can repeat the report for different dates.
What's the best way to ...
1
vote
3answers
64 views
Top-10 lists of occupations, ranked by various attributes
In the code below, all pairs of functions are very similar:
set function
rankListId is different
rankListName is ...
2
votes
1answer
598 views
Node.js Paging with Mongodb
I want to create variable paging on Node.js with MongoDB. I use MongoJS on client side create a request:
...
2
votes
0answers
88 views
1
vote
0answers
22 views
Nesting models within models
I am saving data into a MongoDB. The data will be saved into 3 Mongoose models that are hierarchical. A User model contains an ...
2
votes
2answers
106 views
SQL Server to MongoDB Template
Looking for feedback on a set of templates I've just created. I'm planning on converting them to Yeoman but want to make sure they're ready for prime time before doing so. They are currently in ...
3
votes
1answer
62 views
Probability ordering by seller's tariff
I have an instance method which calculates the position of an element, depending on the tariff of its seller.
If the seller is of a level3 tariff, it gets to top ...
2
votes
0answers
34 views
Iterating a list to make API calls
I'm new to JavaScript and was hoping there was a cleaner way to write this. It's a block of code that looks at a group of documents in a collection (called Messages), and makes a call to the GitHub ...
1
vote
1answer
37 views
Gathering emails, phones, URIs, and tag related to a room
I've made a strange method with multiples conditionals, creating a lot of Lists and I was wondering if I could write it in a better and more legible way.
...
1
vote
0answers
250 views
Node.js log parser for mongoDB
I have developed a log parser, the goal is to take whatever log type I can, and convert them in a mongoDB collection.
I think I've done a pretty good job at reading whatever type of log are trhown at ...
2
votes
0answers
347 views
Log my external IP address using NodeJS
I've been learning NodeJS recently, and have a small program to get the external IP address on my home network from fugal.net, compare it to the previous IP address, and if there is a change update ...
2
votes
0answers
141 views
NoSQL-based sequence generator
For my web application I have to generate a sequence of following format:
<year><sometext><month><sequence>
For example:
...
4
votes
1answer
126 views
Querying MongoDB for information on a collection of books
I have this huge chunk of code. Is there any better to write this code, or am I too paranoid that I check every MongoDB query for error?
The logic is here:
...
4
votes
2answers
1k views
Node.js script may have memory leak
I use this node.js script to migrate MongoDB collection to a schema to another. It does work if the collection is <20k documents, but slows down to a crawl and sometime throw a
FATAL ERROR: JS ...
2
votes
0answers
52 views
Parsing CSVs for bulk database insertions
I'm writing this as (eventually) part of a larger program. This will serve as the bulk data insertion from .csv files we parse.
I'm primarily looking for parts that are
breaking Go's formatting, ...
3
votes
1answer
1k views
Node js single mongodb connection
I want my entire node application to use one single mongodb connection, at least that's what I think is better. I wrote this little script and want some feedback on it. Especially if what I'm doing ...
14
votes
1answer
180 views
Making an efficient and healthy db call for a real-time browser game
I'm doing a calculation for a real-time browser game, where users can invest some of their balances to the site. I need to update their invest's based on ...
2
votes
1answer
42 views
2
votes
1answer
121 views
NoSQL schema for weather data
I am using NodeJS and MongoDB for a weather app that takes the weather info from a logger, saves it to a database, and relays the data to the browser in real-time. It is hosted here with code here ...
5
votes
1answer
314 views
E-commerce product price tracker
I building a very simple price tracker web app. I am using MongoDB with pymongo. The user will enter the URL of the product he wishes to track and the desired amount, when the price goes below this ...
2
votes
1answer
143 views
Views Counter made in Python, Gevent and MongoDB
I've created a Views Counter in Python, Gevent and MongoDB (Flask is also included in the full stack as you can see from the context issue in the code).
My gut still tells me that it can be still ...