I am using node-vertica node.js library to connect to and run my SQL queries on HP Vertica database. The problem is that my app is hosted on a different network than the Vertica database. I need to connect to via VPN to network1 so that my node.js app could work properly, but since Vertica is on network2, I am unable to reach the Vertica database from my app. I am not sure about how to go around the networking aspect of this.
I was wondering if there is a way to connect to VPN via node.js (to acces network2) while I am on VPN1
I hope i explained my question well as i am not sure about the networking aspect of this
I don't have any code since it is a high level design question as such.
Related
For this moment I have working Vue application with firebase realtime database (communication via HTTP requests), but I need to run this application on device w/o internet access. My idea is to create node/flask server on localhost and implement request handling from Vue app and now the question is:
Is it possible to install some no-sql databases that will work similar to firebase, so I will able to export JSON files from my existing realtime database and put it on localhost node server? Most important to me is getting access via http requests to specific branchces of json files.
For now i only created node server and looking for best solution. Best thing for me would be just replacing firebase url with some database localhost url and all logic will work the same.
firebaser here
There is currently no option to run a self-hosted production-ready version of the Firebase Realtime Database.
The closest equivalent (as user 9072997 commented) is the Firebase Emulator Suite, which you can run locally and supports the Realtime Database, but is explicitly intended for:
Local development with Local Emulator Suite can be a good fit for your prototyping, development and continuous integration workflows.
In order to use MongoDB on my node.js AWS EC2 instance do I simply install MongoDB and create a database within the instance via the command line after logging in via SSH?
In other words do I simply create a DB in the EC2 instance for my web app just as I would locally on my machine?
just from long (and at the beginning painful) experience with EC2 & MongoDB..here are some gotcha's.
I am assuming you are just starting off from your question - so I am going to assume a minimal setup:
If you install MongoDB on a server with access to the Internet, then make sure you also apply MongoDB roles to your DB. Do not, I repeat, do not leave it open to the world. Admin and read/write roles are critical here, and MongoDB docs will help you. BTW, even if it is totally secure behind a firewall and other such things, always use roles. They are your last line of defense.
Study and understand exactly how security groups work, in order to limit Inbound and Outbound.
If you can, use the Elastic IP. It will save you many headaches if you move servers, not the least of which is that your IP will not change.
When you gear up to a front facing Internet server, and Mongo behind it, be it with Sharding, Clusters etc. read up on the NAT gateway. It is confusing at first, but the NAT Gateway (not the NAT instance), is a decent setup in one configuration or another.
Take snapshots or complete images of your environment when you change it. This is great for backup, and also when you move to a more robust server, it will save you a great deal of work.
If you have not already, try using MongoBooster or RoboMongo. They will help you immensely with your Mongo work.
Good luck and enjoy!
The actual AWS implementation of MongoDB is DocumentDB, which from what i can tell is built on the opensource version of MongoDB version 3.6, so newer MongoDb features are/might/will not be supported.
An interesting article comparing DocumentDb with MongoDb Atlas(mongoDm cloud solution):
https://medium.com/#michaelrbock/nosql-showdown-mongodb-atlas-vs-aws-documentdb-5dfb00317ca2
In the end if you really want MongoDB on AWS my opinion is you should just install it on a EC2 machine, I've done it via DocumentDB and some mongodb commands don't work, or chose AWS own NOSQL solution DynamicDB instead, DocumentDB just seems to be up there for competition with MongoDB Atlas cloud solution or just for having some dedicated MongoDB for companies that use it and want to move to AWS.
You have different alternatives. To answer your question: yes, you can do it that way. But, there is also an official guide by Amazon to set up a MongoDB cluster on AWS.
Also, if you only need a NoSQL database, you should also check DynamoDB, developed by Amazon. That would eliminate the need of an EC2 instance for the database. For more info, check the official docs.
I am creating a nodejs app and as per clients suggestion trying to implement it in AmpersandJs. I have installed framework and created application by following documentation &js installation.
The app is running with some sample data
I found that the sample data is coming from ampersand-app module from an index.js file.
But I want to do database connectivity with it -- How should I achieve this? I have Googled but not found any good link for it.
Did &js is good choice to develop application or it is for an specific type of projects?
But I want to do database connectivity with it -- How should I achieve this?
Ampersand.js is running in the browser. If you want to access data stored in a database you have two options:
Request data from a database running on a server somewhere accessible over the network. In this case you want to use the url property of models/collections
Use an in-browser database (maybe you want to have look at pouchdb as API)
Did &js is good choice to develop applications?
Definitely yes!
What is the killer reason to use remote db hostring services for MongoDB (like compose.io) for nodejs application VS hosting MongoDB on the same network (in the same datacenter, etc), for example when using PAAS providers (like modulus.io) which offer "integrated" MongoDB hosting .
What percentage of speed/perfomance may degrade when using internet remote DBs, how do DB providers you solve this? How to make right decision on this?
The reason you use something like compose.io is that you don't want to deal with that on your own and have experts taking care of it that know what they are doing. In the best case with support so you can take further advantage of those experts. And that's the only reason.
If you use Modulus that has this anyway and you run your application there as well - even better. There is no real reason to run your node application on Modulus and your mongodb on a different cloud hosting service.
In practice that probably doesn't matter as much because they all use AWS anyway ;)
Important: If they DON'T run in the same network make sure your mongoDB is protected properly(!!). If you do run in the same network just make sure the mongoDB is not accessible from the outside at all which is def the better solution!
Hope that helps
Am I correct in the assumption that without access to the MongoDB server, there is not much point developing with Meteor?
Meteor is a great framework for building, packaging and deploy apps and sites. From a development POV, the templating and responsive DB work make prototyping so much easier than most MVC's.
I understand that underneath the hood, websockets and DDP provide the realtime sync'ing magic which means that you need access to the MongoDB server, something you don't have with PaaS solutions like GoogleAppEngine, Parse or Kinvey.
So, for the backend developer, they don't derive much benefit from Meteor since they need to maintain the server stack and scalability issues.
Is there a path to create and deploy products with Meteor without having to build and maintain the backend infrastructure? Heroku is still pretty close to the bone when it comes to managing infrastructure.
Wondering if there's a way to have CRUD operations through a REST driver that maps out to whatever PaaS you want and have the PaaS post log changes to a server that strictly handles websocket connections. Basically, pass the CRUD operation to a PaaS and maintain your own websocket server/s.
MeteorPedia has a page on deploying to PaaS: http://www.meteorpedia.com/read/Category:PaaS_providers
Recently, Google AppEngine has added support for custom VMs.
You can also use MongoHQ or similar for the database.