What is a good hosting solution for running node.js with R / Rserve? - r

I need to run R with Node.js, using Rio (https://github.com/albertosantini/node-rio) as the node binding to Rserve.
I like Heroku but this seems like it is pushing the Heroku envelope beyond what it or I am competent with:
I've looked briefly into installing a custom buildpack
https://github.com/virtualstaticvoid/heroku-buildpack-r
to run simultaneously with node.js:
https://github.com/ddollar/heroku-buildpack-multi
This all seems pretty scary. Anyone got any good advice for how best to host this? My app works just fine locally.

http://prgmr.com/xen/
I currently use this solution to run my Node.js server and it's currently great.
They have wonderful support and they're uptime is 100%. I cannot recommend this any higher, but you will need to know how to set up a simple OS and run it from the ground up.
For example, if you want to run a server without having it stop when you close the SSH connection, you would use screen node script.js and press [control] + [A] + [D] keys.
You might already know this, so simply take my advice and view the website.

After some research and recommendations from Heroku, I believe the Heroku solution would be
Use https://github.com/virtualstaticvoid/heroku-buildpack-r
in combination with
https://github.com/ddollar/heroku-buildpack-multi#readme
to build a multi build pack.

Related

How can you specify your terminal emulator in Corda

Xterm is used when running Corda locally on one computer using gradle.
Is there a way to specify your terminal editor when running as suggested by the following issue?
https://github.com/corda/corda/issues/2605
I completely share your pain on this. The way that runnodes has its tooling baked in makes it impossible for you to customize how the cordform plugin runs the nodes without digging into the internals.
Some other ideas for you
one thing you could do would be to stop using cordform altogether and run your corda network using dockerform (example here: https://github.com/corda/samples-java/blob/master/Features/dockerform-yocordapp/build.gradle#L93) so that the plugin doesn't need to actually create new terminals.
the much harder way would be to actually download the corda gradle plugins (https://github.com/corda/corda-gradle-plugins#installing-locally) and install it locally with your edits to the cordform task so that it opens the terminal of your choice. You may be able to PR them as the cordform task that's usually used to generate the runnodes script comes from here as far as I know.
As a separate note, I saw your github issue and I was disappointed by how that got handled. I'm sorry you had that experience and I'm going to dig into that issue internally to find out what's happening with that.
feel free to reach out to me (David Awad) on slack.corda.net and I can let you know what's going on there.
Thanks as always

What to use instead of Azure Web Apps to allow installation of google chrome in app environment?

I've just created a feature for our application which generates a powerpoint report from the data a given user has in our system.
In short, the server spawns an instance of google chrome using Selenium's ChromeDriver, and from there scrapes out the charts from our application running in chrome. It was done this way to ensure the charts in the report look exactly the same as they appear in the clients' browsers.
We use Azure Web Apps to host our development and production environments, and while my reporting feature works fine in local environments, it doesn't work once deployed to any other environments, because it depends on chrome being installed, and I can't get it installed in the Azure Web App sandboxed environment.
(you can see this other question of mine for a bit of a reference to where things are going wrong: PowerShell StartProcess: invalid handle )
SO
What I pretty much want to know is, if an Azure Web App environment isn't going to allow me to install google chrome, where should I look next?
It looks like using Service Fabric may allow me to install what I need appropriately (https://learn.microsoft.com/en-us/azure/app-service/choose-web-site-cloud-service-vm), but it seems like a big change to make just to be able to facilitate this small part of the feature.
Another option is to just re-architect the feature so it doesn't depend on the server spawning an instance of google chrome.. but I'd just prefer to avoid that if there's a straightforward way for me to get what I have working.
Ideally, there'd just be a way to get google chrome installed in the given environment, but I've spent a good 10 hours trying to get that to happen now, and it's not looking promising.
There's a couple of solutions which would work - depending on your code and framework dependencies.
IMO - the simplest way would be to build your code in a docker container (that runs the Selenium ChromeDriver) and deploy it either through the container features on Web Apps or run it on demand through ACI (Azure container instances) and have it create the report and drop it in Azure Storage. In a container you have a lot more options - and you have a great amount of options on how to run it. Spinning up an ACI on-demand to do the job can be done in multiple ways (e.g. from Code or through logic-apps or Powershell/Azure automation).
Here are some links on running containers in your App Service:
https://learn.microsoft.com/en-us/azure/app-service/containers/
https://learn.microsoft.com/en-us/azure/app-service/containers/tutorial-custom-docker-image
You could start off by building and adding your code from this image: https://github.com/SeleniumHQ/docker-selenium
Other alternatives of course - you could have a VM that you can install and do what you want with on-demand - however - it'd add more management overhead and other implications to think about.
Many options - but in the regual Web App Sandbox - you're limited.
I have found myself this problem with chromedriver.exe needing a real Chrome. As I cannot install Chrome in Azure App Service I am trying a portable version of Chrome. When using the chrome webdriver I tell it where to find the chrome binary.
var options = new ChromeOptions();
options.AddArguments("headless"); // any options you need
options.BinaryLocation = "YOUR CHROME BINARY PATH HERE";
var driver = new ChromeDriver("YOUR CHROME DRIVER PATH HERE", options);
You should be able to copy the chrome portable files as no installation is required. Although it is heavy, 250 MB, because it includes the non portable version inside.
Be sure to use a Chrome version compatible with your ChromeDriver as pointed in the documentation

How to deploy a Realm Object Server

I'm looking into using the new Realm Mobile Platform for a project of mine. I've gone through the guides and was able to get it up and running locally no problem. My question is, what's the best way to deploy the Realm Object Server so it can be run remotely? I read through the guide found here but didn't really understand it. I only have minimal experience deploying a rails app to heroku. How can I get it deployed to Heroku or a similar service? Any help is appreciated. Thanks!
It's hard to tell you what the "best" way is. There are always drawbacks and benefits to any setup, and everyone has different goals and objectives, so I don't think there is an objective "best way to run it," as you say.
The Realm Object Server doesn't support Heroku for the time being (or at least, no easy one-click-install integration). We know that this is something that people want, so it's on our radar, but I can't give you a definite answer as to when or even if we will do this one day.
The way most people run the Object Server is by running a virtual machine, and running the service inside of that. There are multiple ways to achieve this: start a virtual machine with your favourite cloud provider, and then install the Realm Object Server on top of that. Alternatively, Realm also provides an AMI image, which is Amazon lingo for "a pre-configured virtual machine image," that contains the Object Server pre-installed, and allows you to run your Object Server at the click of a button.
Please bear in mind that Realm Object Server is currently packaged for RHEL/CentOS 6 & 7, and Ubuntu 16.04.
Here are some links that should help you get started:
A basic tutorial on how to setup Ubuntu 16.04 on Digital Ocean
AWS' documentation on launching an EC2 instance from an AMI
Try this image to run realm-objserct server on openshift online.
https://hub.docker.com/r/viksgyl/realm-object-server/

Meteor: what are the best settings in a production environment?

I am developing a meteor application. I noticed that the meteor server sometimes suddently crashes, this makes me think that it might not be optimized for production.
In a production environment, should I consider to add/remove some packages? Which one? And what are the best settings? I just want to make sure to have a reliable server that stay up all the time.
Have you taken a look at meteor up yet? It will set up a production quality server for you. I've used it for several production applications and it works great.
As far as adding/removing packages goes, I've never ran into any problems with installed packages running on production. A couple of my apps have about a dozen or so packages installed. But if you suspect that a package might be causing the problem, I would go to atmosphere and search for your packages and make sure that they haven't been flagged. You'll see a bright red flag next to the package name if it's been flagged by the community as "not working".
Maybe also check for issues on GitHub.
If you do decide to use meteor up, after your app has been uploaded to the server, you can check the log s for any problems.
mup logs -f

What Mongo GUI tools can I use to connect to my deployed Meteor app?

Tools like MongoLab remote connection and RockMongo require a permanent URL, so the URLs generated by "meteor mongo --url" that are only valid for 1 minute don't work for long.
If you're on a mac I would recommend that fononauts build of MongoHub you put up, the ordinary Mongohub is quite buggy & on Windows use MongoVue which is perhaps the best one i've used of all.

Resources