Tag Info

Hot answers tagged

6

You've run into a problem that many have before you...a database optimized for reading is seldom good for write efficiency and vice versa. One approach that has evolved from this read-write impediment is CQRS (Command Query Responsibility Segregation). Despite Wikipedia linking the two together CQRS and CQS are technically different. CQS just demands that a ...


4

My first instinct would be to reuse an existing user authorization mechanism, rather than writing one. Then I would skip the rest until I had firm requirements. Premature generalization is just as bad as premature optimization.


4

You'll want to do some serious research. Overall It doesn't sounds like you have a clear idea of the performance profile of your application/tech stack. Where are the pain points? Why does it need replacing? Take measurements first so that you've got something to measure improvements against going forward. This will help you avoid adding in unecessary ...


4

Obviously I don't want to cycle through the entire collection It's not obvious to me. How big is this collection? Anyway, why would you have to cycle through the entire collection? Put them in a list ordered by expiration time. Since time moves forward, you can discard everything that has expired. So you only have to check if the first element is ...


4

scalable REST CRUD web 2.0 nodejs mongodb A lot of hot keywords that don't really mean much. You could have simply said "I'm planning on building a webservice." I personally don't have a problem with using JS - it's a good language, but I don't think 'finding developers' is a good reason to choose the language - good programmers can code in any ...


3

Easy to find javascript developers It's plenty easy to find mediocre JS developers. The good ones are rare. Especially a full stack front-end/node combo. Shared logic/language or possible reuse of code between database query language, back-end and web-client. Certainly possible but don't overvalue this too much. You need some rock solid ...


2

It sounds like you can solve this problem with caching. In other words, go ahead and cycle through the whole collection, but only do it when the cache is invalid. Obviously it would depend on the details of your requirements, but something to look at if you can get away with it.


2

There is nothing wrong with either approach from what I can tell, it is more a requirements/learning question. If you want to learn MongoDB then you can make it work. If you need it to work and there are no other advantages then your MySQL schema will work fine. If you are interested in doing your work in MongoDB then I would suggest looking at ...


2

33 & 1/3rding that you should not worry about scale until you need to worry about scale. Personally I would not bet my farm on node at this point unless I had some capable C hackers available to fix it -- it is just too young to ride and not be able to rebuild the engine if you needed to IMHO. I'd also be leery of mongodb -- it is fast, but at a pretty ...


1

Have you looked at http://www.mongodb.org/display/DOCS/Trees+in+MongoDB ? It looks like you're between "Child Links" and "Materialized Paths". Based on the commentary it seems that your second idea is a much better fit for Mongo. Storing each subdirectory _id is a little too relational and implies linking and joins which are not things that Mongo excels at.


1

I'd advise for a separate database, we use STS and SQL Server for our 'User Store' schema. It roughly contains: User Table - This contains UserID, Password hash etc. It also has a ID field which is an indentifier for the user other than the User ID. User Audit - This contains audit information everytime the user authenticates, URL, IP Address, etc. ...


1

It depends largely on what operations you want to be able to efficiently support. Your current approach will make it easy to list all files within a directory and all descendants of a directory. On the other hand moving files from one directory to another is more painful because there is no atomic modifier that allows you to modify a substring of a field. ...


1

Yes. On my current project, we're getting data and storing it in SQL Server, and then building search indices using Lucene/Solr and storing those in MongoDB. Populating MongoDB is done with a custom loader, though -- no SQL Server replication or automatic refresh.


1

100,000's of rows (of reasonable size) is a small enough that it can probably fit in main memory of one or possibly a few compute nodes. It's probably going to be in your best interest to design your application to operate on large chunks of the dataset at a time (shard your dataset by primary key), and use a database to persist the information ...



Only top voted, non community-wiki answers of a minimum length are eligible