I am new in web development with python and flask and mongodb database. What I see is that everybody advises to use Apache to serve files because it's more efficient. But what if I store all my files in MongoDB using GridFS? In this case I do not serve my files by Apache anymore but directly by flask, is it the wrong thing to do? Thanks
If you are in a spot where you need to use GridFS to store files, then you will have to use Flask to serve them.
However, if you don't have to use GridFS I would recommend against it, especially as a newbie to web development. There will be a lot more guides to help you along when you get stuck. After you have Flask figured out, you can add on GridFS.
Related
After messing around with React Redux I am ready to begin the backend processing with PHP and MySQL on my website at x10hosting. How would I deploy my app?
Im a little confused. I believe I can also deploy it to android and ios if I am not mistaken? So I would compile the files in the terminal using some command and then upload to my server?
From what I hear you would need to have java supported on the server but correct my on anything if I am wrong. Im still new to this. I have heard of services such as Heroku but I havent looked into it too much. Is this better than trying to host the app files on my own website?
I have the below configuration
Firebase - for hosting (serving static files) and storing data
(Database).
Nodejs - for making API calls to Firebase, Twilio and Sendgrid.
Angularjs - for frontend
Do I need Nginx for the above configuration ? looking at answers like these makes me consider Nginx.
My app is intended to serve several hundred users.
No, you do not NEED nginx. There are zillions of node.js apps at the scale you describe that do not need to use something like nginx.
You would use Nginx if you had a specific problem in your deployment and Nginx was the easiest/best way to solve that problem. You have not described any specific problem (other than scaling to a few hundred users which node.js can do just fine by itself) so you have not described any reason that you need Nginx.
Nginx has a bunch of things it is great at, but until you identify a specific need for more than node.js offers, I would not recommend that you complicate your deployment just because Nginx helps some people. Instead, deploy your app, measure its performance, understand where your weaknesses are and then evaluate if Nginx is the best tool to help you fix any weaknesses that need fixing.
I´m building application SPA using angular.js with yeoman which connect with a API RESTful made in Java using spring-MVC . i´m begginer for deploy web applications in angular and so i want to know some differents alternatives or best practice , for example deploy in http-server as apache, inside war using application-server as tomcat , or another option or suggestions .
Thanks a lot for help .
Then your frontend code is production-ready, just run $ grunt build
and serve static resources produced by Yeoman (Grunt in fact) by the very same server that is responsible for providing the backend of your app.
take a look at my answer to similar question, showing project structure and some necessary configuration for Yeoman & Spring-MVC.
In some more advanced deployments scenarios, there might be a need for introducing load-balancing and you might need separate servers for the frontend and backend, but we are talking about basic config here.
I'm trying to deploy one of my java apps in GAE and I have used MongoDB. Unfortunately GAE doesn't allow me to create databases, however it suggests using Google Datastore. Are there any plugins or add-ons to use MongoDB.
You can't run MongoDB on GAE. You need to use the Google datastore.
Matt is right. If you want to deploy to Google's servers you can't use Mongo. If you are interesting in running your own server(s), check out AppScale.
If you really want to use MongoDB anyway, you'll have to find a third-party host that provides a REST interface through which you can make your transactions. I've personally tried and recommend MongoLab on App Engine. Then, in your code, use an HttpUrlConnection object to send/receive requests if you're doing it with Java.
I think you could deploy your app on app engine and create a separate vm instance in google compute engine that would have mongo installed, then you plug your GAE app on that vm for the db connection. This would allow you to keep all your app in the google cloud. See https://cloud.google.com/solutions/mongodb/ and http://docs.mongodb.org/ecosystem/platforms/google-compute-engine/
A lot of things have changed since this question has been asked, as of June 2021, you can use MongoDB Atlas with Google App Engine Standard running on Java 8 environment. I built my App with the Ktor framework that runs on App Engine and interacts with databases on MongoDB Atlas.
if you're still looking for an answer to this you might want to check this project that did exactly the same but in reverse, it will surely help you out with what you want to do.
http://code.google.com/appengine/articles/django-nonrel.html
you can use mongo, only if have something like on mongolab then use pymongo to connect and most important thing you need to enable socket api from gae dashboard.
it worked for me thanks
I've got some data up on Google App Engine's live datastore, but would like to have a local copy as well for local development. What's the best way to do an occasional sync?
There's no trivial way to do this, but there are some possibilities:
Use the official bulk uploader (from the GAE-Python SDK) if your application is in Python (but not Django)
Use Gaebar if your application is in Django
Use the Datanucleus REST API if your app is in Java
You can also try some other open source projects meant to solve this problem. AppRocket was a promising one, but there's only one commiter to the project and there is no activity in the past months...
Also, star issues 59 and 776 to get this included officially by google.