Development

The processing of flavor

LDAP, or Lightweight Directory Access Protocol, has a long history of use. LDAP is usually used in large enterprise corporations where they store employee data and use it for single sign-on (SSO) and more. Single sign-on is where the company's LDAP directory integrates with other applications such as the company intranet using the protocol.

For companies using R as the programming language of choice, Shiny Server is incredibly useful as a server. Unfortunately, when authentication needs put in place, there are only a few options:

  1. Flat file—good if you don't add new users often and you don't want to have to reset the password.
  2. PAM—you need to know Linux well to set up, and it is restricting for a large user base like flat-file.
  3. Google—good if you know all your clients have an account.
  4. LDAP—until Shiny accepts using a database connection, LDAP seems like the best choice.

Getting a LDAP server running can be very tedious; in order to set up it up, you need to learn a lot about how the convoluted ldif files work with adding new entries. And, most of the information on the web can be limited on what server package to actually use. Here is how we set up our LDAP server to authenticate our clients.

Read more

As Shiny Server gets more and more production ready, developers are adding new features that typically aren't easy to build in—examples include automated phone notifications through Twilio. Twilio allows your application to send phone calls and text messages to users of your application when a triggering event occurs. For example, we use it to call our clients of potential flaws, taints, and contamination's in their products in real time.

This tutorial will teach you to integrate Twilio with a basic Shiny application which places a sample call to your users. This tutorial will leave you with a working application which you can build into your own needs. This tutorial will require the following:

  • R
  • Shiny
  • some knowledge of servers including FTP and APIs

This tutorial focuses on Shiny Server, but most of the code could easily be converted to other R based web frameworks or batch scripts. The code for the Shiny Version is located on GitHub.

Our current situation provides is we have a button and field in shiny through which our users can enter their phone number and hit the button to test. Here's how we did it in R. The first thing we needed was a simple input and button in our Ui.R file which was the following code:

 1 div(class="message_test",
 2     div(class="center",
 3         textInput("phone_number", label="", value="")),
 4     div(class="center",
 5         HTML("<div class='center'>
 6             <button id='send_test_call' class='action-button btn btn-default '>
 7             Send test Call</button>
 8             </div>")
 9         )
10     )
Read more

Looking for a specific post?