I know Postgres and Mongo are like apples and oranges when it comes to many things but I do have some more faith in Mongo since version 3.4 passed the Jepsen test. This is a scrupulous test ensuring that the distributed nature of the database being tested handles various scenarios. More information about Jepsen can be found on that link.
With that being said, Postgres is wonderful and would be what I reach for 99% of the time.
See this tweet from MongoDB saying that it won't be killed, and can read more about it on MongoDB's site.
MongoDB is ACID-compliant and has Left Outer Joins. I'm not going to bother correcting the rest of the article.
We released so many features, it’s hard to choose. Personally, I love mirrored reads and hedged reads are great. They give you better, more consistent performance without you having to re-architect anything in your app. On the cloud side, I’m really excited about Multi-Cloud clusters, a feature that allows you to deploy a single cluster across multiple public clouds simultaneously, or move workloads seamlessly between them. Going a bit beyond that - Realm Sync which allows you to sync data on a mobile device with your Atlas database.
I think that's going to change mobile apps a lot.
You can't really do that without some kind of back end for your website. Be really careful with the password bit as well. You could do it with PHP but tbh for a small website stick with a off the shelf solution. For your your usage you will be able to use the free tier as well! ᕕ( ᐛ )ᕗ
Take a look at, prismic.io
or https://firebase.google.com
or https://www.mongodb.com/cloud/stitch
That way you will ensure it is reliable and you can focus on making the website great.
>
>
> There's a lot of text after but nothing explaining SSPL. The reasoning is alright I guess, I remember some projects making noise about AWS.
https://www.mongodb.com/licensing/server-side-public-license
IIRC it was created by mongodb out of the AGPL to be more restrictive (with AWS and friends in mind)
Sven recently posted a nice article on how to deal with Imposter Syndrome and Public Speaking, some of the tips are transferable across all jobs :)
https://www.mongodb.com/blog/post/imposter-syndrome-public-speaking-5-tips-successful-tech-talk
>But apparently it's not considered an open-source license :(
The free software foundation doesn't consider any license FLOSS if it puts restrictions on what the user is allowed to do with it. By prohibiting AWS et al from providing your software as part of a commercial service, you're restricting a user (AWS et al). The general FLOSS agreement is "do whatever you want with it, but if you give it to anyone else, you have to give them the source code, too".
AGPL plugs a hole where users were able to modify software and distribute it to other users in a way that wasn't technically distribution under the GPL and other licenses.
If Elastic License V2 provides the protections that you as the copyright holder want, then that's the license you should use. If you want a FLOSS license, AGPL is a good option. If you don't care more about restricting commercial use than FLOSS, then you might also want to look at Mongo's Server Side Public License which requires anyone that uses your software to provide a service provides the source code for their entire stack, including operating system, web server, backup management, etc.
Generally I think GPLv3 is the way to go for the idea of sharing something while preventing use by large corporations. It allows commercial use but only if they share-alike. Large corporations generally won't touch these projects, and if any competitors came along they would be on equal ground with you - anything they made on top of it would need to be shared back.
You could go a bit further with the server side public license which is used by e.g. elastic search and mongo db, which is similar to GPLv3 but essentially extends the requirement of sharing-alike to any infrastructure-related code if someone sells your project or a derivative project as a service, regardless of if the code actually touches the project.
However, if you're not willing for anyone to use your code for commercial use, even if literally every piece of code they have is completely open source, then I'd argue it's better for you to keep the code private and all rights reserved -- this is the most bulletproof technique and will make legal battles immeasurably simpler
Let me clear this up.
To use the Mongodb driver you do not have to have mongodb installed.
However you'll have to have a database running somewhere which the driver will connect to and use for storing data. You can either have a database server running on your local computer or you can run it somewhere on the cloud like https://www.mongodb.com/cloud/atlas
If you want to run the database server locally you'll have to install Mongodb.
I don't think docker has anything to do with running mongodb.
Doesn't look like they use it for eCommerce.
https://www.mongodb.com/presentations/storing-ebays-media-metadata-mongodb-0
I have nothing against MongdoDB. I have used it before for storing logs. It is important to use the right tool for the right job.
You should consider either avoiding ODM as suggested by Mongodb here: https://www.mongodb.com/developer/article/mongoose-versus-nodejs-driver/ or may like to consider a lightweight one that plays nicely with mongodb native scheme validation such as Papr https://github.com/plexinc/papr. In a performant mongo db scheme design, relation between collections should not be norm and can be handled directly without using mongoose. For relations, mongoose may generate inefficient queries (more like n+1. That being said, if you must use one then mongoose is indeed more widely used and mature.
It simply won't work... there's no persistent storage.
I've used a free Mongodb atlas cloud instance with Cloud run: https://www.mongodb.com/cloud/atlas and that has worked fine (for a hobbyist thing).
We love fair and open competition and indeed, having a competing document database (without the inadequate and confusing fake compatibility) is good for everybody.
It's not a secret that we aren't a fan of DocumentDB as the website has many falsehoods about compatibility which are confusing users every day.
But why listen to me? Why not listen to a customer using MongoDB for a cool and innovative financial system, from my friend Ran Landau, CTO of Splitit:
https://www.mongodb.com/blog/post/splitit-mongodb-atlas-racing-to-capture-global-opportunity
"You wouldn't buy a fake shirt. You wouldn't buy fake shoes. Why buy a fake database? MongoDB Atlas is the real thing."
MongoDB Enterprise Server is the distribution associated with paid subscription plans (for example, MongoDB Enterprise Advanced).
You can freely download this for evaluation and development purposes, but when doing so you also should be asked to accept the Customer Agreement.
You should read the linked agreement for full terms. The free usage clause is part of section 2 (Subscriptions):
> (b) Free Evaluation and Development. MongoDB grants you a royalty-free, nontransferable (except to your Affiliates), and nonexclusive license to use and reproduce the Software in your internal environment for evaluation and development purposes. You will not use the Software for any other purpose, including testing, quality assurance or production purposes without purchasing an Enterprise Advanced Subscription. We provide the free evaluation and development license of our Software on an “AS-IS” basis without any warranty.
There is no currently no license key or technical restrictions for the features of the Enterprise Server download, but the expectation is that you would follow the terms of the customer agreement.
> how awful is MongoDB
Don't believe the hype? I like Mongo, especially for small projects. I've never deployed anything large scale that uses Mongo though. Craigslist switched over to Mongo years ago though (did they switch to something else?) so how bad can it really be?
Works fine for small projects. Works fine for large projects. I don't see the downside. Of course it isn't perfect and not right for all projects. Choice of database is way more nuanced than "this one bad, this one good". CAP Theorem is an important part of it.
edit: cute, I'm getting downvoted for not hating mongo; this sub has a weird hivemind bias in favor of SQL databases
How about the case of eBay using it? They've got a lot of data and I haven't heard about them having any issues with it.
MongoDB has had an internship program for more than 10 years working with teams in the US, and in recent years this has grown to include working with teams based in the Dublin & Sydney offices during their local summer study breaks.
More info: https://www.mongodb.com/careers/departments/college-students.
Serious question, I tried Ubuntu 64 bit for Raspberry PI and I haven't gone back to Raspbian since, because, for example I could install MongoDB without the 2GB max limitations that come if you are on 32-bit, which Raspbian is.
Any reason to give Raspbian (In this case Raspberry PI OS) another shot?
> \2. Copyright Assignment, License and Waiver
> (a) Assignment. By submitting a Contribution, you assign to MongoDB all title, right and interest you have in the Contribution, and you waive any right, including moral rights, database rights, etc., that may affect our Ownership of the copyright of the Contribution.
lol no copyright over your own contribution
as someone else already said, use MongoDB Atlas.
Its not expansive (there is a true free tier), very reliable (even the shared cluster), you click in your browser to manage the whole thing, and you got the support if you are in big trouble. Basically I'd recommend this solution to everyone using MongoDB, but even more for people with your tech background.
Have you considered scheduled scaling? You may not know the exact time of the peak load but you may be able to ballpark it using historical usage data. For example it may be that users are hitting you the hardest around commute times and such.
This article shows how to set up a scheduled trigger. From there you could scale up instance size say 30 minutes before your predicted peak usage time and down after. Atlas autoscaling may actually take care of the scale down.
MongoDB Stitch was first available as a public beta in June, 2017 and become GA in June, 2018. Stitch was always integrated with MongoDB Atlas for backend storage. What changed is that in April 2019 MongoDB acquired Realm, a mobile database company. Aspects of Stitch + Realm were integrated (and enhanced) to create the MongoDB Realm product launched in June, 2020: Announcing MongoDB Realm & The Realm Sync Beta.
You can continue to use features like serverless functions, triggers, rules, and static hosting via MongoDB Realm. There are Migration Guides from the legacy Stitch SDKs to the new MongoDB Realm equivalents. More specifically, it sounds like your frontend code was using what is now the MongoDB Realm Web SDK.
Hello. I am part of the MongoDB DevRel team. You can find some performance and feature comparison between DocumentDB and MongoDB Atlas here. I would also encourage you to sign up for Atlas and try out the free tier but keep in mind that free tier and plans under M10 are hosted in a shared environment unlike the larger plans so the performance differences will not be linear between shared and dedicated cluster plans. You can also reach out directly to the Atlas support team with any questions by clicking the chat icon on any page of the Atlas site (If you don't see it be sure to disable your ad-blocker as some of them will block required resources).
https://en.wikipedia.org/wiki/Copyright_transfer_agreement i.e. signing away your copyright to an umbrella organisation to look after it for you. It supposedly can help enforcement but can also lead to non Open Source licensing.
having written this I tried a few new google queries and ... duh ... found this: https://www.mongodb.com/blog/post/thinking-documents-part-1
My first port of call would be Heroku for hosting the main app, then because I use Mongoose/MongoDB for my databases I would probably use Atlas to host that. Domain name I'd probably go to GoDaddy for, but there might be places that are easier to work with.
I read the article a while back and he says:
>"The changes to MongoDB that enable multi-document transactions will not impact performance for workloads that do not require them. "
And since the dB storage engine is still wire tiger I assume no performance difference. We recently upgraded our very immature cluster to 4.0 and haven't noticed any difference in performance
He's teaching using NodeJS (JavaScript) with ExpressJS, which is a server-side JS framework, and a No-SQL database called MongoDB as tools. I have no experience with them so i can´t tell you more.
However, he seems to be explaining general backend concepts aswell, which you will have to apply in your projects no matter the technologies your using.
I don't agree. Use it when you don't need relational data or your data can be stored in a non-relational way.
For example, none of these are "small projects":
> Baidu started out with MongoDB in 2012, initially migrating its user address book service from MySQL after hitting performance and scalability limits. Now over 100 different products and services are powered by MongoDB running on a 650 node cluster, deployed across multiple data centers, storing over 1PB of data. The scalability of MongoDB’s distributed design and developer productivity from the flexible document data model is unmatched by MySQL.
> Experian Health selected MongoDB over MySQL and other relational databases to power its Universal Identification Manager, a new application the company uses to uniquely identify healthcare customers. MongoDB was chosen because of its flexible data model, scalability, strong performance, and overall cost. Developing the Universal Identity Manager on a relational database would have meant that Experian Health developers would need to execute up to 10 SQL joins to positively match a patient's identity. Using MongoDB allowed the company to simplify its schema to remove that complexity; drastically reduce the number of queries; improve performance; and simplify growth as the data volume increases.
An API, rather by definition, is a server side function that takes user input and returns data, right? So why avoid a server side database call? Or, more to the point, why avoid a server side database call but instead do potentially tens of thousands of server side disk access calls, which are far slower?
The response above is correct, you are describing a database problem, specifically -- if your use case is exactly as you describe -- a document store, like MongoDB.
:/ I just kinda rolled my eyes...
I feel like /r/webdev is often closer to /r/oldlampdev
IMO learning PHP and MySQL is handy but IRL, for the most part the industry just has you doing custom WordPress stuff.
Learn JS, learn Node, learn React, and for databases, Mongo, Firebase, GraphQL
https://www.mongodb.com/ https://firebase.google.com/ http://graphql.org/
I'm just getting started with Meteor and it seems pretty legit. Ports apps to iOS or Android. A quick article about it --> https://www.mongodb.com/blog/post/meteor-build-ios-and-android-apps-are-delight-use
For something close to DynamoDB with MongoDB ecosystem is MongoDB Serverless: https://www.mongodb.com/pricing
Currently, it's in preview mode. Not sure, we should use for production.
I'm not an expert about MongoDB, Atlas is only full-managed service and need to pay per instance even if there is no traffic to your service. DynamoDB is full-managed and only pay per request. You pay nothing even if there is no traffic.
More and more alternative will come in the coming years, which can compete with DynamoDB.
Hi I suggest to look there: MongoDB best practice there is article about db scheme design in mongo or clasic SQL Db it can help you learn difference.
The Omada user guide mentions that the software controller requires MongoDB version 3.0.15–3.6.18.
What distro are you running? I'm using Ubuntu 20.04 and it has 3.6.8 in its repos. You can also download older versions from https://www.mongodb.com/try/download/
You don't have to put it in a relational database. MongoDB is a noSQL database that stores data as JSON objects. You can set up a cluster in the cloud. MongoDB offers a free tier if you want to try it out https://www.mongodb.com/cloud/atlas/register
Hi, you can try mongo official tutorial from here: https://www.mongodb.com/languages/mern-stack-tutorial But i think there are some grey points in this tutorial and also recently they fix some errors cause some funtionalities dont work. Also they used old class component rather than function component which is most popular right now. So my offer is :) you can try my repo: https://github.com/brkkartaloglu/mernexample
Heroku has a free trial, but if the app is not used for some time it will be put to sleep.
Vercel (next.js + API) can be used in some cases, but the app is bundled with webpack, and it can be sometimes problematic for node.js code.
https://www.mongodb.com/cloud/atlas as a free tier that is sufficient for small projects.
I have a meeting with some guys over at Mongo and I will raise these concerns and see if they can sell me on its viability.
A lot of companies use it, although to what extent is it not clear: https://www.mongodb.com/who-uses-mongodb
Thanks a lot for the attention.
If you are using MongoDB Atlas, you can create an Atlas Search Index that uses Lucene under the covers, which is the same search engine as elastic. there is a free tier you can experiment with.
I wrote a blog post about this a while back: https://www.mongodb.com/developer/article/mongoose-versus-nodejs-driver/
It's still pretty relevant.
At the end of the day, it really depends. I prefer the NodeJS driver personally, but using Mongoose is totally fine.
If you want data persistence, there's an endless number of ways to accomplish that based on what you're trying to do.
For this, it sounds like you may just want to write a file onto the disk. Flask also has easy ways of passing files back and forth you can consider accordingly.
If you're looking for more robust ways to store lots of things, you will probably want to look into databases such as MongoDB.
The filter I used was wrong, since the pipeline filters the event stream rather that the actual document. I had the change the filter to
matchID := bson.D{
{"$match", bson.M{"fullDocument._id": tid}},
}
instead of
matchID := bson.D{
{"$match", bson.M{"_id": tid}},
}
the additional keyword "fullDocument" is necessary because the event stream holds the updated document under the field "fullDocument"
More details can be found in this article. https://www.mongodb.com/basics/change-streams
Hey y'all, here is a personal project I did earlier this year for fun as a way to practice building databases/apis, as well as trying out some new d3 techniques.
For those not familiar with the show: "Critical Role is an American web series in which a group of professional voice actors play Dungeons & Dragons." – Wikipedia
The project takes episode transcripts and does some simple text analyses.
The data was scraped from the Critical Role wiki using R. I put the data on a MongoDB Atlas database and made each episode available through an api app deployed to Heroku.
The essay itself is built using my own graphics rig and a lot of d3.js.
Hope y'all enjoy. Holler if you see any bugs!
What are you looking at? An M30 cluster in Europe with 350GB of storage is $1.44/h.
Also, do you have 350GB of raw data or compressed? Keep in mind that if it's raw data you can expect at least a 2:1 compression ratio, so you could get away with M20 + 175GB which is $0.58/h.
On top of that you can pause the cluster (keeping your data "frozen") for an 80% discount for the time you don't use it.
Further modelling of the data could bring that even lower. Check out the manual, this blog post or even the free course.
I know Atlas very well, feel free to ask any questions if you want :)
MongoDB Atlas provides single billing for your managed database clusters plus the underlying cloud provider costs. You can't apply your own AWS (or other cloud provider) credits to a MongoDB Atlas account.
If you have a generous supply of cloud provider startup credits to use, one option to consider would be managing your deployment on AWS with MongoDB Cloud Manager. Cloud Manager is a SaaS agent-based approach for monitoring, automation, and backup of a self-hosted deployment. There's a free tier for monitoring; automation & backup are paid features with a 30-day free trial.
While this approach will allow you to use your startup credits, unfortunately you'll also have to do some of the admin work to provision, secure, and scale your AWS instances.
If your application is currently able to run within the limits of the Atlas free tier (aside from data size), it also sounds like you may have modest requirements for the near term. You can find some past discussions in r/mongodb
with Atlas promo codes that will help you save on costs for a paid cluster (which will go farther if you scale up conservatively). If your application needs the performance of a dedicated cluster (M10+) but doesn't need to be online 100% of the time during development, you could also consider pausing your cluster to save on costs (a paused cluster only incurs storage costs).
We can't publicly talk about many of the bigger deployments as companies often want to keep the competitive advantage of their technology stack details to themselves. One of the very big ones is Baidu. Some other ones are listed here.
That said, while MongoDB is great at large deployments, I often think about MongoDB as being great at being flexible at the lower end too. It’s great for being able to scale either out or up (your choice) when you exceed the power of a single node.
Another way of thinking about size is distribution - you can spin up a MongoDB cluster that crosses cloud provider regions with single clicks in the Atlas console. You can spin up one that crosses cloud providers just as easy, if that’s your use case.
MongoDB supports ACID transactions when operating on either a single document or multiple documents. Anytime you're writing to one document, you can be sure of ACID guarantees. For multiple documents use the transaction syntax introduced in MongoDB 4.0.
https://www.mongodb.com/blog/post/mongodb-multi-document-acid-transactions-general-availability
This will allow you to use the multi-document approach without worrying about a scenario where one document is updated but not the other!
If you have a proper server, available on the internet (like a Web server) then you could make it available to Heroku by configuring your firewall to only accept tcp connections from Heroku IP addresses and ensuring your authentication in MongoDB is configured correctly.
But you shouldn't.
If you're looking for free database hosting for a small-ish database, then Atlas will allow you to set one up and make it available to Heroku. If you're still learning, this is what you should do.
If you don't know how to configure a server with MongoDB securely, then don't - there are many scare stories on the Internet from people who have tried that and got it wrong.
You will have to figure out where you're hosting your MongoDB. You can use something like Atlas and use their connection URI. You don't want your Flutter app to communicate directly with MongoDB, so you will have to use Firebase Cloud Functions exclusively to communicate to your Mongo. You don't need to be concerned about authentication, you can keep that all within your Firebase functions.
How do you learn? Reading, trying, reading, trying, reading, trying, reading, trying. Re-reading, retrying, re-reading, retrying…
Until you learn, it'll still be a lot of line by line instructions. You only get away from that by taking the instructions, learning and accurately exercising the concepts, instead of just following directions.
MongoDB Atlas still has a free tier https://www.mongodb.com/pricing
Looks like it's SpiderMonkey right now.
> We’ve decided to switch from v8 and java to Spider Monkey for JavaScript.
> Change default JavaScript engine from SpiderMonkey to V8.
> the javascript engine used for both the mongo shell and for server-side javascript in mongod changed from V8 to SpiderMonkey
Not nicely. You could use the relatively-new SRV lookup feature so your application only had to use one domain name: https://www.mongodb.com/blog/post/mongodb-3-6-here-to-SRV-you-with-easier-replica-set-connections
But still - each Mongodb node must be able to reach every other node in the replica set by its domain name. So if you have a 100 nodes in your architecture, all of those must be able to reach each other by domain name.
(Sidenote, mongodb replica sets can only have 50 members max, so to have 100 nodes, you'd need to shard. If you are just getting started, put that idea on the backburner for now, and let me reassure you that 3 mongodb nodes is enough to take you a long, long way.)
Going back to your original question, keep in mind that mongodb is different from other databases in that the idea of a "primary" and elections are baked in to mongodb. So long as all your servers are addressable individually by DNS, your driver will magically know which one to talk to and route your queries to it. Including for very complicated things ranging from:
- read from the primary: {readPreference: "primary"}
- read from any secondary ideally, but the primary if needed {readPreference: "secondaryPreferred"}
- read from the node which I tagged "datacenter: nyc": {readPreferenceTags: {datacenter: "nyc"}}
MongoDB recently announced the integration of the Lucene search engine for it’s hosted solution (Atlas).
https://www.mongodb.com/blog/post/full-text-search-and-auto-scaling-coming-to-mongodb-atlas
If you are self-hosting, then you’re probably going to be relying on elastic search or the like.
Hi there, I'm Rebecca from MongoDB. Selling these credits violates the MongoDB Startup Accelerator Terms and Conditions ("Startup package is non-transferable.") and MongoDB Cloud Terms of Service. We ask that you please immediately remove this post and any other offers to re-sell your MongoDB credits. Thank you!
I have never used App Engine before, but I would say it is a bit overkill. Might I suggest you a different approach? All of my friends who use MongoDB host it on Mongo Atlas. It makes hosting your DB very simple and it auto-scales. Firebase authentication can not be used as far as I know, it is deeply interconnected with other Firebase services. Also yes, the middleman I was talking about is an HTTP REST API.
I'm not sure about Mongoose specifically but in your case I think the attribute pattern would be a good place to start:
https://www.mongodb.com/blog/post/building-with-patterns-the-attribute-pattern
​
There's also the Polymorphism pattern which might help as well it's linked in the above article.
I have just done a bucket based on a unit of time like 1 hr and which sensor. Pushing each reading on to an array of values witch each having a date stamp and values. Wiretiger is copy on write anyways. Before wiretiger mongo had this blog post. https://www.mongodb.com/blog/post/schema-design-for-time-series-data-in-mongodb
Also not a bad idea to create the running stats the same time. To allow accessing stats without fetching all data points from server,
Count, sum, sum of (values)^2, min, max
For sure, you can download a local copy of Mongo and run it on your computer or server. https://www.mongodb.com/download-center
An easier alternative would be to use an online hosted version of Mongo, such as mLab
This way you don’t have to download/install anything and it’s easier to visually interface with your data.
The tradeoff is that Mlab costs money, whereas running a local instance is free
> Problems with Reliability
Back in like, maybe 2.6, this was a small problem. Since 3.0 (or 2.8?) it's been a non-issue. If you're having this issue it's almost certainly because you're using Mongo incorrectly. All of that aside, it's worth noting that Mongo was not ACID compliant until recently. Mongo 4.0 introduced transactions, so this problem is now eliminated. What's more, Mongo 3.6 added a lot of improvements to how data consistency between replicas and shards works to make reading from secondaries also more reliable.
> Problems with Schema-less Design
Yes, there are issues with schema-less designs, but having a schema doesn't mean you won't have issues with it. Like all databases, you really need to plan out your structures. Mongo shifts that burden from a DB admin directly to the developers. In the case of user.email
not being set, a simple null check is all you need. I can think of few modern languages that can't easily account for this case. That said, Mongo 3.6 introduced schema validation which solves this by enforcing schemas on all documents added to a collection.
What's not talked about in this article is the large number of upsides Mongo has over traditional databases, but I won't get into that too much. That is also not to say that Mongo is what everyone should pick... it's definitely not. I'd even go so far to say that unless Mongo actually fits your use case, you're probably better off with a traditional relational database.
Dipende! Se il professore richiede un database relazionale allora puoi andare su PostgreSQL o MariaDB. Altrimenti potresti andare di NoSql con qualcosa come MongoDB.
Try to create text index and use $text query operator in MongoDB: https://docs.mongodb.com/manual/text-search/
If you need more than simple mongo search, try to use ElasticSearch for queries in the dictionary, with sync MongoDB. For example, one of dozens way to implement connection MongoDB and ElasticSearch: https://www.mongodb.com/blog/post/how-to-perform-fuzzy-matching-with-mongo-connector
Also maybe interesting: http://ilearnasigoalong.blogspot.fi/2013/10/efficient-techniques-for-fuzzy-and.html
We ended up going with [MongoDB Connector for BI
](https://www.mongodb.com/products/bi-connector). It was the easiest solution once you get the connection configured. We are able to connect to MongoDB through a MySQL ODBC. Our goal was to get in in the warehouse but I was able to connect Tableau directly to it.
Me and a friend want to build some kind of CMS to quickly make basic sites but on the mongo site, they say its perfect for that but they give the example of the social media feed wich for me was the perfect example of relational data. Im just starting to figure out what we will use but that confuses me a little already.
There are 3 or 4 basic things you should do if you use MongoDB in production and you're golden. They aren't covered in this course, however. I've known plenty of successful companies using MongoDB. For example:
As far as coding goes:
The front end stuff is hosted on a Amazon Web Services S3 bucket. The backend/database is a cluster that get automatically managed by stitch.
Not the clearest explanation, let me know if you have any questions.
Just got the same error while trying to install. I believe their current version is bugged or something. I just downloaded the previous stable version for a quick fix.
I don't see how a document database would be considered a key-value store. That would be Redis or Raik or something. MongoDB is totally capable for running most applications.
Under armor runs $2B through it's online store running on MongoDB. Lots of that kind of stuff here: https://www.mongodb.com/who-uses-mongodb
You could always go straight to the source.
You could also try joining a MongoDB User Group and see if there's anyone who is open to doing some consulting work.
There's the MongoDB University Certified Professional Finder as well!
In general, you shouldn't bind to a public IP with your database, especially if auth isn't enabled. There is a blog post from MongoDB that talks about good security practices. There is also a ServerFault post with the simplified bullet points on this.
I suspect whether or not your MongoDB deployment is accessible outside of DigitalOcean would depend on the security settings in DigitalOcean. I did some searching, and it seems you have to configure MongoDB to explicitly bind to the droplet's public IP address.
I would strongly suggest you do not do this until you have SSL and Authentication setup on the MongoDB deployment. If at all possible, I would make use of ssh tunneling since it provides both transport layer security as well as protection from anybody connecting to the MongoDB. I found another ServerFault post that talks about that.
Got it. I've hunted around and concluded there are 2 attractive options:
mongolab; youre probably already aware they have a free 500mb sandbox tier that is just fine for most test/staging deployments or toy projects, or
self-hosted on something like aws/digitalocean, maybe using https://www.mongodb.com/cloud or one of their other commercial management tools
there are other options, but if you are looking for managed hosting my impression is that most are more expensive than mongolab for less value.
I don't have experience with either company but I'll give you my choice.
MongoDB. This is still an emerging technology that is slowly gaining market share. LinkedIn is a big company that probably has more of a corporate feel.
If it were my choice I would go with MongoDB. You are young and can take the risk and stress of working on something new and exciting. I think the experience gained will be greater.
> consulting
MongoDB inc, the company behind the NoSQL DB does consulting for their product. https://www.mongodb.com/products/consulting
> SaaS
Seafile, an open source alternative to dropbox, provides hosting (but you can choose to setup seafile on your own server)
http://www.seafile.com/en/home/
If you can find a way to provide value/convenience to your users, then you could potentially profit from it. But first you need to find your target audience and convince them to use it.
Based on what you've said, and what some other users have recommended, doing an MCSA in SQL Server 20XX might be helpful if your company is running a Microsoft SQL Server.
Oracle MySQL Developer certification
Those are the ones I can think of off the top of my googlesearch/head. I'd start with the SQL that your company is using, and maybe delve in deeper from there if you find that Databases are your 'thing'.
If you want to keep pushing towards domain management consider seeing if the company would cover you for an MCSA training/certification for 20XX server (whichever version your company would cover you for). That should be a solid starting point.
There’s a series of posts covering just this using MongoDB Realm - this is the 1st one (they are linked) https://www.mongodb.com/developer/how-to/realm-swiftui-ios-chat-app/ and there’s some meet-up recordings too.
There's a MongoDB for Startups program (https://www.mongodb.com/startups) that might be a good fit. The program includes Atlas credits, technical advice, and some other great resources.
If your startup doesn't meet the current criteria or you'd like to discuss further, feel free to drop me a DM here (or via https://community.mongodb.com/stennie, where I check in daily) and we can discuss your situation.
https://docs.mongodb.com/manual/reference/write-concern/
> For multi-document transactions, you set the write concern at the transaction level, not at the individual operation level. Do not explicitly set the write concern for individual write operations in a transaction.
My guess is this part: .delete.one(
sets the write concern on the individual operation for some reason. Is there an additional argument in the real code?
Maybe it's a problem with the Java/Scala MongoDB driver itself, that sets the write concern on the individual operations when it should not. Or maybe there is more code in the real world example. I really don't do Java.
Also, instead of the dbWithSession
, dbWithTransaction
methods maybe you can try the more traditional approach? (just to see if it solves the problem)
ClientSession session = client.startSession();
try {
session.startTransaction(TransactionOptions.builder().writeConcern(WriteConcern.MAJORITY).build());
const collection = db.collection[BSONCollection];
db.deleteOne(session, ...);
db.deleteOne(session, ...);
db.deleteOne(session, ...);
db.deleteOne(session, ...);
session.commitTransaction();
} catch (...)
Anyway that's really as far as I can go, for me the problem is either with the Java/Scala driver or your code.
You really should not do that. First, your MongoDB is not accessible from the outside of your local network, it will be terribly slow and your ISP most likely don't allow you to do that. They don't like residential customers taking unusual amount of traffic or let you open a huge security breach.
However, you can use a free tier Mongo Atlas with Heroku. Here is how to do it. It's not complicated and you might learn a thing or two about hosting 🙃.
Good luck!
I think you could do it by having the website look at the IP address or IP range that's accessing it. Then based on that it can allow access to the database or not. Or you could set up a login where once you're logged in you can access the database.
What you would need to do would be to either publicly host the server from your public IP or you could host MongoDB in the cloud (it's free and pretty easy to set up https://www.mongodb.com/cloud ).
This is so the website you're hosting on Heroku would have access to the database. It wouldn't be able to see if you were just hosting it on localhost and without a public IP address to access it through.
> why don't you create a "dev" MongoDB where you do modifications which can't be seen by the user?
As in use a Free Cloud Database for dev mode?
Yes I just wanted to know if it's doable
You just need to get access to the api somehow. This explains how to do that with an example: https://www.mongodb.com/developer/how-to/nextjs-with-mongodb/
User profiles are just entries in a table in a database. You read/write them like any other data, using an api, with your authentication in env, etc.
it is been a long time since the last time i used mongodb in c#, however what u r looking for is an upsert into a nested list
https://www.mongodb.com/community/forums/t/mongo-csharp-driver-upsert-in-nested-array/133374
not sure if that helps,hope it does.
The code samples come from several different apps – there are links to the repos in the main article... https://www.mongodb.com/developer/how-to/realm-swift-query-api/
The Realm-Swift SDK repo is https://github.com/realm/realm-swift
You'll need to create an IQueryable for MongoDB and then just do a myQueryable.Count() on it. You can add Where(...) LINQ methods to it to narrow down your count query. Do not do a myCollection.ToList(), do a myCollection.AsQueryable() otherwise you'll load the entire database into memory.
https://www.mongodb.com/community/forums/t/how-to-query-collections-using-linq-methods/15946
So the data I’m storing can’t be put in S3, it’s very relational, which is why it’s in a database. (Users, etc…)
Maybe. I think what people need is a simpler postgres hosting solution or even Postgres as a service, which I’m not sure can be done. MongoDB has a server less option, https://www.mongodb.com/pricing, which looks pretty compelling.
But right now, the best managed DB providers are AWS, GCP, or Azure, based on the research I’ve done. There’s also this company, https://aiven.io/postgresql.
Honestly, you could probably make a decent product if you offer cheaper DB services in the form of Heroku addons.
Like someone pointed out, you can't store data on the dyno. You may be able to use mongoDB atlas found here: https://www.mongodb.com/atlas/database
It has a free limit that should be good enough :)
>prohibits those other people from offering it as a service without significant and active contribution to the community
Not a fan of this SSPL license, but exactly where does it require a user to also be a contributor? That would be strange indeed
You may be reading a little too much into the Mongo hate. Even large, modern tech companies like Coinbase have large production MongoDB deployments. And like the rest of the comments said, you're inconsequential to the product as a whole. The product area is still very challenging and very technical.
to q 1 - Yes
to q 2 - it depends how you model it, but if it's something akin to Amazon where there are lots of product categories but they're all searched in the same UI, it's common to just put them in the same model.
Full disclosure though, I personally don't use ODMs, I just use the standard mongodb driver. Here is how I would do it:
You can take advantage of the document model to have a general map of product tags in the same schema, for example
{ name: "best book of mongodb", tags: [ {tagName: "productType", tagValue: "book"}, {tagName: "pages", tagValue: 1000}.... ] }
{ name: "spicy chicken curry", tags: [ {tagName: "productType", tagValue: "food"}, {tagName: "protein", tagValue: "chicken"}.... ] }
and use faceted search to make use of specific tags when needed https://www.mongodb.com/blog/post/faceted-search-with-mongodb
If you are having trouble with mongoose, I would just not use mongoose for a while. Having used just the mongodb node driver if you then see the features of an ODM working for you, experiment with adding new collections in mongoose afterward.
My pitch is: I can use MongoDB to solve my relational issues, that’s it and I’m comparing it to the popular methods. While this can be done in SQL then it most likely boils down to: indexing performance at db level, information decoding speeds. Most likely the result will be within 10% difference of each other.
I suggest reading the scalability section from here: https://www.mongodb.com/compare/mongodb-mysql to see why I prefer MongoDB.
https://www.mongodb.com/use-cases
From personal experience, Mongo is good for "unstructured data" applications. If a client is unable to give you a relationship structure between his models or models definition itself - MongoDB. If you have complex data with a lot of optional fields or need to save JSON objects - MongoDB.
In general, treat SQL databases as a "DB optimized for storage" (normalization, etc...) and No-SQL as "DB for CPU". Queries in No-SQL usually like a "Select X when Y" without any joins (you could use $lookup ofc) and a lot of information for these queries will be prepared in an async way, behind the curtain (by watcher or change streams)
Are you saying MongoDB Atlas on GCP is an April fools joke?
Through the Marketplace is an additional featured service. That’s why you see the $2000 cost. https://console.cloud.google.com/marketplace/details/mongodb/atlas-pro
Create it through Atlas not the marketplace. And then peer the projects. https://www.mongodb.com/pricing
There is also a free tier. The free tier utilizes MongoDB’s M0 instances. An M0 cluster is a sandbox MongoDB environment for prototyping and early development with 512MB of storage space. https://cloud.google.com/blog/products/gcp/announcing-mongodb-atlas-free-tier-on-gcp
Service providers are starting to offer cross cloud replication, for example MongoDB
Probably not needed for most, but certainly a good way to derisk further for very critical stuff (gov, healthcare, military)
It's mostly on the size of storage, but there are other information exchange costs somtimes, I think.
reach out to support I'm sure they can help you get to an estimate
also checkout https://www.mongodb.com/startups/partners?utm_campaign=startup_partner&utm_source=gan&utm_medium=referral
Is the database on you computer (or a computer/ server you have access too)? If so I would suggest you start with something like Mongo Compass
"MongoDB Compass | MongoDB" https://www.mongodb.com/products/compass
If the database is on a different website to something you gave access to you'll need to know if l what APIs they have so you can query their database
Consider the following straight forward sql. It increases the price of all products by 10%.
begin transaction; update products set price * price *1,1; commit transaction;
You write the same sql regardless if it's 10 products in the table or 10 million. On a RDBMS, if the transaction fails, you can be sure no rows was updated. If the transaction succeeds, all rows are guaranteed to be updated. I.e. the RDBMS always leaves the data in a clear and known state.
Now let's read up on MongoDB transaction best practices (https://www.mongodb.com/basics/acid-transactions): * Limit each transaction to 1,000 document modifications.
What the actual fuck! 1000 documents are nothing for a database. So if we have 10 thousand products we will need to loop through a transaction 10 times. What if one of them fails and 9 succeeds. How will you identify the documents that was not updated? You can't just run it all again cause then you'd updated the price too much on some products. So now you'll have to write a bunch of silly logging code to keep track of what you have updated and what you have not.
That's just one limitation when it comes to transactions.