Is there any solution for make my own Meteor cloud server? - meteor

meteor deploy myapp.meteor.com
When I run this command line, my meteor app upload to meteor cloud server.
Is there any solution or repository for make my own meteor cloud server?
meteor deploy mycloud.server.com myapp.mydomain.com
I know I can use my own domain use this command.
meteor deploy myapp.mydomain.com
But I want to make my own cloud service like meteor do.
I know https://github.com/arunoda/meteor-up. But this is single service solution.
This is not for one or more server (clustered server) with many services.
If there are no solution for this, I'll make this solutions.

For now galaxy is still not released, this one should do exactly what you are looking for i.e. using deploy on your own server.
An alternative might be modulus.io but it is still not the easy deployment we would like.
The simplest I found yet is still using meteor-up. You can use it for deploying on several server too. The point is meteor-up expect to have a running ubuntu (or debian), and you deploy to those machines. You still need to setup an oplog for mongodb and a high availability proxy (with sticky session) to forward on the right virtual machines….
If only the performances matter, you can build micro services and integrated them through a service discovery as provided through meteorhacks:cluster, as this will help load balance your app it does not (yet?) provide a way to route the client according to the domain name (meaning you still need a reverse proxy for accessing the right service discovery from a domain) Also this packages does not provide any way to deploy you app, this is just a convenient way to help manage and scale your service.
If you need a reliable solution right now, docking meteor, deploying it on clusters and managing them, I would strongly advise looking at: https://bulletproofmeteor.com It is a very good source for building reliable meteor app with high availability. Note that all the chapters are not free, but there is a whole chapter covering "Deploying Meteor Apps into a Kubernetes Cluster" which goes step by step on the process of setting up your server(s) for running your meteor app in a PaaS way.

Related

Understanding the scalability of RShiny apps hosted on ShinyServer

I am building a series of interactive shiny web apps for a project that I am considering turning into a Company. My background is in data science and I don't have a lot of experience on the web app / server side of things, but these are important aspects for me to consider with my project. I currently have an Amazon Linux AMI EC2 instance with ShinyServer (free, open-source) installed, and I am currently hosting early versions of my web apps there. So far everything works fine, but I haven't made the links public yet.
My first question is whether anyone knows if there are certain limitations (scalability limitations, integration with database limitations, security / authentication limitations, etc.) that I will inevitably run into using RShiny apps and ShinyServer? I haven't heard of many successful, super-popular web apps being shiny apps hosted on ShinyServer, but rather my feeling is that ShinyServer is mainly used for hosting RShiny apps that are shared amongst only a small number of people (i.e. shared amongst team members at a company.). Per this thread - Does R-Server or Shiny Server create a new R process/instance for each user? - I am particularly concerned that my app won't be able to handle thousands of users simultaneously since only 1 R process is created for the app regardless of the # of concurrent users of the app. Having 10-20 processes through ShinyServer pro probably doesn't solve the issue either if I ever intend to scale greater than the hundreds or thousands of users. I also noticed that ShinyServer Pro would run me a not-so-negligible $10K per year.
My second question is whether RShiny apps can be deployed using other server technologies, such as Heroku. I came across this github page (https://github.com/virtualstaticvoid/heroku-buildpack-r/tree/heroku-16) but haven't dug too deep into it yet. I've been told that heroku makes it easy to update releases to apps whose code is on github (git push heroku:master), amongst other things.
My third question involves certain specific considerations of mine. In particular, I am currently working on a script that queries data from an API and writes that data to a (not-yet-setup) database of mine. This is the data my apps use, and I'd be interested in having the apps update in real time as the database updates, without requiring the user to refresh the webpage. A buddy of mine suggested AJAX for this type of asynchronous behavior, and it looks like this may be possible in R with something like this (https://github.com/daattali/advanced-shiny/tree/master/api-ajax).
Sorry that this is such a loaded question, but I hope it doesn't get closed down as I think it is fairly educational. Any suggestions / sources / pointing me in the right direction would be greatly appreciated on this.
Canovice,
I'd recommend you take a look at the following RStudio / AWS support articles. To scale a shiny server you'll need to look at using a load balancer:
RStudio
https://shiny.rstudio.com/articles/scaling-and-tuning.html
https://support.rstudio.com/hc/en-us/articles/220546267-Scaling-and-Performance-Tuning-Applications-in-Shiny-Server-Pro
https://support.rstudio.com/hc/en-us/articles/217801438-Can-I-load-balance-across-multiple-nodes-running-Shiny-Server-Pro-
AWS
https://aws.amazon.com/blogs/big-data/running-r-on-aws/
Blog Article:
http://mgritts.github.io/2016/07/08/shiny-aws/
Shiny is a great platform, their support is fabulous. I'd recommend you ring them up - they'll be sure to help answer your questions.
That said if your plan is to create a scalable website that will support thousands or hundreds of thousands of people then my sense would be to recommend you also review and consider using D3.js in conjunction with react.js or Angular.js, not forgetting to mention node.js.
My sense is that you are looking at a backend database connected to a logic engine and visualisation front end. If you are looking for a good overview of usage take a look at the following web page and git repo [A little dated but useful]:
https://anmolkoul.wordpress.com/2015/06/05/interactive-data-visualization-using-d3-js-dc-js-nodejs-and-mongodb/
https://github.com/anmolkoul/node-dc-mongo
I hope the above points you in the right direction.
I'd like to provide some notes related to your second question: Yes, you can use the mentioned buildback to deploy shiny applications on heroku.
I was in a similar situation with you (asking myself about possible ways of serving Shiny applications in a scalable manner) and decided to go the "heroku way".
You may find these hints helpful when deploying your app to heroku using the buildpack mentioned above:
Heroku tries to "guess" how to execute your application. But you can also add a special file, named Procfile, to your application to control the process commands you want to execute for your application. In my case I used web: R -f ~/run.R --gui-none --no-save, where this means that a file named run.R is being passed to the R executable for the web server process
The stack on heroku is based on Ubuntu. If you need additional deb-packages, you can create another special file named Aptfile and add the package names therein, heroku will then automatically install these for you (I needed it for RPostgreSQL)
You can add another special file named init.R and install all R packages as necessary just as you are used to, i.e. with install.packages etc. You can also add initial configuration material within this file.
As a running example, here is an example toy application that I wrote for myself to remember how a "full-stack" shiny app may look like, including compability with heroku.
For a large number of concurrent users, use a load balancer like nginx and enable the autoscaling of your app, e.g. through Kubernetes.
You can deploy your app on Heroku. On the paid tiers it includes NoOps autoscaling of your app. See this tutorial on how to deploy a Shiny app in a Docker container on Heroku: https://medium.com/analytics-vidhya/deploying-an-r-shiny-app-on-heroku-free-tier-b31003858b68
You can query the table last update timestamp in the Shiny server logic with reactivePoll() and rerun your db query if it changed. It is not "real-time" but depending on your application close enough if you set the time interval small.

Can I get multiple different Meteor apps running reactively off the same MongoDB instance?

I'd like to deploy the same app at a couple different locations, and perhaps also in different versions, and I'd like all my deployments to run off the same Mongo database. Are there any pitfalls to taking this approach?
Just have them use the same MONGO_URL and it will work fine. Also see this question. We do exactly that and have not encountered any problems.
If you are running in multiple physical locations, keep in mind that mongodb traffic isn't sent over https. For this reason, the current best practice is to host your database and your app in the same in the same data center (e.g. use compose.io and host in EC2 east).

Migrate site to Amazon cloud

I have a web site running on ASP.net which is hosted on windows server R2.
Is it possible to migrate it to Amazon clound with out doing any programmming/code level changes?
Yes, if you buy and configure an AWS EC2 instance it is just a virtualized version of windows server 2008r2 and it should behave identically. No code changes necessary.
AWS does provide a powerful IAAS cloud to move all your infrastructure to cloud and use as it is. Based on my a few years of AWS and cloud experience I observed that AWS may have all the tools and documentation to suffice this and you AWS provides best in class eco system to achieve your goals.
I will also recommend that instead of going direct to AWS you can try try Ravello systems.
Ravello runs on top of AWS and Google provides easy option to move existing infra to Ravello cloud without making any changes.
e.g. If you have your own data center VMS, you can export your in-premise environment and import to Ravello seamlessly without making any changes to network or other configuration.
This means you just need to export vmdk from your DC and import to Ravello so it will be running on top of EC2 as-is keeping your VMware tools, OS patch levels etc intact.
If you are interested you can refer more about this case at http://www.ravellosystems.com/blog/esxi-vm-to-ec2-vmware-tools/

Juggernaut/Faye vs. Pusher for a Heroku hosted web service?

If I understand correctly, Juggernaut is built on top of socket.io, and Faye competes with Juggernaut layer and socket.io layer combined. Recently Ryan Bates came up with a Faye wrapper called PrivatePub which makes it very easy to run Faye.
But I already have a rails app that runs on Heroku, and all I want to do is build a simple chat feature on top of it.
While researching I found lots of people use Pusher. It seems like pusher is well supported on Heroku so I'm thinking about using Pusher.
Before I jump on, I just wanted to make sure I understand things correctly. Is Pusher like a Heroku for push requests? My option is to either host everything on Heroku (including Juggernaut or Faye module), or just host the static part of the site on Heroku and delegate push notification handling to pusher.
From what I know, this feels like a more efficient approach since:
1. If I use pusher, I don't have to jump through all the hoops in order to run juggernaut/faye modules on Heroku.
2. The realtime traffic will be delegated to Pusher, which means I won't waste my Heroku server's resource.
Now I'm just a beginner and may be wrong about lots of things, but please enlighten me. Are the two factors above correct? And is my understanding of Juggernaut/Faye/Pusher correct?
Thank you for asking about Faye/Socket.IO/Juggernaut/Pusher on Heroku. I will do my best to answer your questions. So you already have an App on Rails running on Heroku. And you need to learn more about which path to take for adding real-time updates via an always-on connection. All options you listed will work for this. Faye/Juggernaut will take a bit time to setup, yet provide same end-results. And Pusher is like it's own Heroku, separate from Heroku, and is readily simple to add to your app.
Your questions & answers:
Is Pusher like a Heroku for push requests?: Yes. Pusher is a separate service which has a separate pricing model, decoupled from your main Heroku bill. (though Heroku + Pusher are combined into a single monthly statement)
The real-time traffic will delegate to Pusher and not waste your Heroku Resources: Yes.
Are the two factors above correct?: Yes.
And is my understanding of Juggernaut/Faye/Pusher correct?: Yes.
If you want to learn more about Faye, Ryan Bates and Real-time here are some links:
Run Faye directly on Heroku: https://github.com/ntenisOT/Faye-Heroku-Cedar-RedisToGo
VIDEO: Faye Private Pub by Ryan Bates: http://railscasts.com/episodes/316-private-pub
GITHUB: https://github.com/ryanb/private_pub
You can run juggernaut node.js server on heroku.
You might need to share a redis database between your original heroku application, and the juggernaut application, if you are using the juggernaut gem.

Some basic Azure Questions

I'm currently in the process of building our ASP.NET C# 3.5 Web site and I have been looking at Azure as our possible hosting environment and I had a couple of questions that I couldn't really find answers for on their website. I would appreciate if someone could help me get these figured out.
1) If I setup a single cloud server with my ASP.NET application & SQL server database, and the server went down, Would my application automatically get brought over to a new cloud server and continue to run? Or, am I required to manually move the data over to a new cloud server?
2) In the future, when I need to maintain more instances to handle the load, How hard is it to configure the database and sessions to work across all of the instances?
3) Do I still get remote desktop access on the cloud servers?
4) Are there any other cloud hosting provider that you would recommend over Azure for Windows hosting?
Yes, there is automatic failover and backup
You change a number in a config file, and click save
Not currently
I haven't done a ton of research, but Azure is pretty impressive. It all depends on what your needs are.
If you're a powershell guy, you can write a powershell to swap out the config files for you, there's a pretty good walk through to do that here: http://channel9.msdn.com/learn/courses/Azure/Deployment/DeployingApplicationsinWindowsAzure/Exercise-2-Using-PowerShell-to-Manage-Windows-Azure-Applications/
If you're a cmd file guy, you can use the csmanage.exe to swap config files, downloadable here: http://code.msdn.microsoft.com/windowsazuresamples.

Resources