R Shiny - Access an App on my Local Machine - r

I can not avoid windows at work. As such, I have a second machine that I use to do all of my heavy lifting and data analysis. In an ideal world, I could create a Shiny app and access it from another computer on my work's local network.
The solution that my IT folks proposed was using Remote Desktop, which COULD work, but I don't really want other users locking the machine.
Does anyone have insight as to how I can allow computers on my network to view my Shiny apps? I should have admin rights on my 2nd machine in case I need to tweak a few settings.
EDIT: While my ideal use case is Shiny, I would also want to access other R-based reports like Slidify presentations, compiled R Markdown reports, and perhaps, Gitbooks compiled to stand-alone websites.
Thanks in advance.

It should be sufficient to set the host argument to 0.0.0.0 to allow it to broadcast beyond localhost, e.g.
runApp("app_name",host="0.0.0.0",port=3168)
Then you can visit http://machine2DNSname:3168 to see it.

Related

Poor download speed after publishing shiny app

I have created an R shiny app to create some output. When I run it in local the app generates and downloads output instantaneously.
But when I publish it on a free R shiny server, it takes almost 20-30 mins to download the same file. The file size is 10MB.
Can you tell me the reasons for this?
Is there a work around ? Do I need to purchase a premium Rserver or something?
There is no common measures between a desktop computer and a web server especially mutualized servers such as free offering from cloud servers. Your desktop computer is often far more powerfull (memory/cpu/network).
Beside this the download is handled by the internal web server of shiny (httpuv to name it). It is quite good but not as good as full blown web servers that are built for this (apache, nginx, ...)
Moreover R is mostly single threaded (that means it does one thing at a time). Handling a download and responding to the user through UI are separate tasks.

What's the easiest way to run Drupal site with PostgreSQL on Windows 10?

I tried a lot of different tools like Acquia, but most of them support only MysQL/Mariadb. What's the easiest way to run Drupal with postgres? Do I have to create Virtualbox VM from scratch?
You don't have to create VM box from scratch - just find one that fulfill drupal requirements. Even more you have some suggested by Drupal community:
https://www.drupal.org/docs/develop/local-server-setup/virtual-machine-development-environments
I'm personally using box "geerlingguy/ubuntu1804" with vagrant, additionally configured with ansible (by somebody else).
And IMHO it's better to us VM for at least 2 strong reasons:
If someone else is working on project with you with VM he will also have identical working environment.
When you decide to launch your site it will most likely run on linux box.
And it's better to avoid "unpredictable" problems when you decide to move project to other server.

Set up Shiny app on internal server

For security reasons, I need to run a Shiny app on an internal server. I am able to talk to IT about getting it there, but I am one of two people at my company who use R, so IT has never come across this situation before.
I have been looking online for ways to support a shiny app internally, but I have not been able to really find anything useful that has been posted recently. I know R changes frequently and is constantly improving, so articles from 2010 or 2014 aren't as helpful as I'd like.
I am looking for information I can bring to my IT department to help them get my app onto the internal server without them having to do a lot of research into R.
The answer very much depends on your needs, depending on the complexity of the app and the number of simultaneous users. Since this is only internal, you may not need to go through the lengths described in Pork Chop's comment.
In the most basic instance, you can load RStudio on an existing server and use runApp (the normal way of initializing a shiny app). In the top left corner you will see an internal http address, as well as an "Open in Browser" button. Any user connected to the server can navigate to the internal address and use the app. If you are unlikely to have concurrent users, and don't mind dedicating an RStudio instance to the app, then this is the easiest way for IT to deal with it. Note that this implementation is very limited.
The next level up would be an open source Shiny Server Community Edition, which is free to use. The process to set it up is more complex, but is covered here: http://docs.rstudio.com/shiny-server/ Please note that this is the documentation for the pro version, however I believe that it is the same documentation for the open source version. All of the open source guides link to it on shinyapps.io. To download Shiny Server Community Edition visit here: https://www.rstudio.com/products/shiny/download-server/ or you can look at the differences in products here: https://www.rstudio.com/products/shiny/shiny-server/

How to set up a simple web server(Windowws XP Pro)

As a heads up, I have some experience programming on Windows and other devices, but I have almost zero experience doing web anything, so I'm sure this is simple/easy to find online and I just don't know what I'm doing.
I have a computer on my home network that is connected to the internet(I can VNC into it from online if that helps) and I want to set it up so that I can connect to this PC online and access a web page stored on the PC.
This will be used by two people tops, so I'm not concerned about the number of connections or that kind of thing, I just want to be able to look at this page from online. I'm not sure what to call this, but I guess I want to have own webpage on my home PC that I can access to do stuff remotely.
Basically, I want to be able to go to http://{my-pc-ip}/webpage.html and see it online. If it helps, this is largely a learning exercise for me, I want to experiment and play around with what I can do through a webpage on my home network, through an online web page interface. Like maybe start a program on my home machine using a button the page, but do this from a computer connected over the Internet(this stuff I'll figure out myself, I just don't know how to set up the online stuff).
this is quite simple. You can use either IIS which is shipped with your XP Pro or use free and open source solutions:
XAMPP - http://www.apachefriends.org/en/xampp-windows.html. I've been using this for years. Very simple. The last step of installation is just to secure MySQL and FTP (if needed at all). PHP is shipped so you can start doing web development without extra hassle.
Lighttpd - http://www.lighttpd.net/. Another FOSS webserver, which is very light-weight.
There are a few more but Apache is the most popular so you can just go ahead with XAMPP which is very mature and has large community of users.
Lastly, remember to relax your firewall allow access to your IP address from LAN & VNC (whatever you needed). Some materials to get things done:
http://www.microsoft.com/windowsxp/using/networking/security/winfirewall.mspx
http://support.microsoft.com/kb/875357
http://technet.microsoft.com/en-us/library/bb877979.aspx
http://members.shaw.ca/nicholas.fong/vnc/
Enjoy doing web!
Not really programming related, but none-the-less, WAMP is by far the easiest solution out there.
http://www.wampserver.com/en/
To expose your PC as a web server you need to do couple of steps:
Have external ip (static).
Configure the firewall to allow incomming connection to your PC to port 80 (if you need SSL then port 443 too).
Set up a web server: you can use IIS (if WinXP is not Home edition), Apache server or smallest possible HTTP server like ihttpd.
Put the pages into your root directory.
That is the basic explanation of the steps to do.
For basic house-holding tasks like temporarily sharing static files on a lan i have used HFS which is only 600K, has a gui, adds itself to the explorer context menu, and yes, it is free with source code available.

ASP.NET Local Development Setup

I would like to start learning ASP.NET on a for-fun project. I'm hoping to setup a local server to do my development on, but I don't want to pollute my user account with a webserver, database, and developer tools.
I'm using Vista Home Premium as my desktop OS. Is it possible to setup a separate user in vista and contain all the developer stuff inside it? (Keep sql server, IIS, and Visual Studio separate so they don't run when I'm not doing development work)
If this isn't possible can someone suggest a good alternative?
Use a virtual machine such as VMWare.
I personally don't see any benefits of creating a separate user for this. There's a webdevserver bundled with VS for development use. This only runs when you start it. And VS itself doesn't do anything unless you are using it...
SQL Server can be set to be started manually.
If you're just getting started, check out the express editions of visual web developer and sql server.
I agree with ocdecio: a virtual machine is the way to go. The nice thing, as well, is that you can take a few hours to configure your development environment and then save it intact. That way, if you ever hose it, you do not have to spend another day configuring it. Think of it as "Environment Management" to go along with your Source Code Management. The only caveat is to make sure you have plenty of RAM (2+ GB). RAM is much cheaper than time these days!
I have to agree with the above.
I have all the dev stuff on my one user account (I'm using Vista Home Premium too), but nothing runs unless I ask it too.
When installing Sql Server, you should be prompted if you want the service to start automatically or manually. Choose manual and run off one user account.
#mdbritt
This case is a development learning env for asp.net. I can hardly believe that a virtual environment is preferred for this. Nor for any other normal development environment.
Why not just create an image of the hard drive if you want to avoid time spent on reinstall and reconfigure?
I agree with ocdecio: a virtual machine is the way to go. For some things, you can even download fully functional VM's direct from MS (ie Sharepoint Development). The VM's can be a real timesaver and they're easy to backup in entirety.

Resources