1. 程式人生 > >IBM Bluemix with Spark Service (Scala) and Watson IoT Platform

IBM Bluemix with Spark Service (Scala) and Watson IoT Platform

  • Getting Started!

    IBM Bluemix is a great place to begin with if you are planning on implementing the internet of things. You can make your application on this platform and bind it to some services. The services can not only be used by the run-time applications on Bluemix but also can be accessed by programs running on remote machines.

    I will be using a Spark service that will run the Scala Notebook file that will publish sample message data to a sample Watson IoT Platform service that has already been created.

    Below is the link to the Spark Scala Watson IoT Platoform Publisher.ipynb file you will use for this tutorial.

    Download the file using the link below and place it on your desktop where you can use it later in the tutorial.

    Here is what should already be completed before starting this tutorial:

    1. Should already have a Bluemix Account

    Assuming that you have registered and are logged into IBM Bluemix, you will see a page similar to this:

    Screen-Shot-2016-12-07-at-4.22.28-PM

    First I will add the Spark Service. To do so, click on the CATALOG option on the top right side. A catalog of services will appear.

    Filter the services to only show Spark related services, and then click on the Apache Spark service. (shown below)

    Screen-Shot-2016-12-07-at-4.25.14-PM

    You will be taken to an overview of the Spark Service. The service will default to the free version. On the right bottom hand side, you will be able to create the service. For this recipe we will use the default configuration settings.

    Click on create to create your Spark Service.

    Screen-Shot-2016-12-07-at-4.27.54-PM

    After the Spark service is created, you will be taken to the following page where you can open the service to enter your Spark environment. Click on Notebooks

    Screen-Shot-2016-12-07-at-4.29.38-PM

    You will be taken to a page where you can create Notebooks which are environments where you can create and interact with your code as you build your application. We will create a notebook and copy the Scala code that is located at the bottom of this tutorial page.

    To create a notebook, click on New Notebook at the bottom of the page.

    Screen-Shot-2016-12-07-at-4.32.13-PM

    You will be taken to a page where you have the option to create a blank Notebook, load from a File, From URL, or use a Sample.

    Choose 'From File' and Specify a name for your Notebook such as MyScalaNotebook.

    Load the Scala Notebook that you downloaded at the end of this tutorial page.

    Click on Create Notebook to continue.

    Screen-Shot-2016-12-07-at-4.34.33-PM

    You will be taken to a page that has the Scala code that Spark will run. It has everything you need to immediately publish data to a sample Watson IoT Platform Service. You can run the code all at once by going to Cell->Run All as shown below.

    This sample publishes messages as a simulated device and as a regular application so you can extend in anyway that you like.

    This sample also has built-in comments so you can find where you need to replace the configuration information to work with your own IoT Service Credentials

    Complete!

  • 相關推薦

    IBM Bluemix with Spark Service (Scala) and Watson IoT Platform

    Getting Started! IBM Bluemix is a great place to begin with if you are planning on implementing the internet of things. You can make your application on t

    Service Discovery And Health Checks In ASP.NET Core With Consul

    在這篇文章中,我們將快速瞭解一下服務發現是什麼,使用Consul在ASP.NET Core MVC框架中,並結合DnsClient.NET實現基於Dns的客戶端服務發現 這篇文章的所有原始碼都可以在GitHub上Demo專案獲得. Service Discovery 在現代微服務架構中,服務可

    How to Break a Monolith Application into Microservices with Amazon Elastic Container Service, Docker, and Amazon EC2

    Traditional monolithic architectures are hard to scale. As an application's code base grows, it becomes complex to update and maintain.

    Develop an IoT app with Node-RED and Watson

    Summary Build an IoT project. Expand it into a fully functional business application. Use PaaS services and leverage the Watson IoT p

    Node-RED and IBM Bluemix Overview for the NASA Space App Challenge

    Description This video shows a demonstration of how to use Node-RED, IBM Bluemix and Watson Conversation service to

    Cloud resources to try PowerAI and PowerAI vision deep learning frameworks on IBM POWER with GPUs

    IBM PowerAI Vision as a Service IBM PowerAI Vision provides tools and interfaces for business analysts, subject matter experts,

    Building our data science platform with Spark and Jupyter

    Testing while documentingAll critical paths of the code are covered with Integration Tests using Python Doctest framework, enabling up-to-date and accurate

    Eclipse上開發IBM Bluemix應用程序

    col 1.5 技術 buildpack 準備 uem 沒有 online warp 林炳文Evankaka原創作品。轉載請註明出處http://blog.csdn.net/evankaka 摘要:本文主要解說了怎樣使用安裝Eclipse

    Mastering the game of Go with deep neural networks and tree search

    深度 策略 參數初始化 技術 以及 -1 簡單 cpu 網絡 Silver, David, et al. "Mastering the game of Go with deep neural networks and tree search." Nature 529.758

    ASP.NET Multiple File Upload With Drag & Drop and Progress Bar Using HTML5

    asp ogre net res upload gre .aspx project tar https://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=460142&av=669590ASP

    [Nuxt] Setup a "Hello World" Server-Rendered Vue.js Application with the Vue-CLI and Nuxt

    clas red eat side pre obj sta ted blog Install: npm install -g vue-cli Init project: vue init nuxt/starter . Run: n

    API brief(spark for scala )

    keys ati enc ted cati with link odi access org.apache.hadoop.mapred.SequenceFileInputFormat<K,V> 獲得FileStatus{block size+group+l

    Spark記錄-Scala數據類型

    long table unicode nta 顯示 true any div ren Scala與Java具有相同的數據類型,具有相同的內存占用和精度。以下是提供Scala中可用的所有數據類型的詳細信息的表格: 序號數據類型說明 1 Byte 8位有符號值,範圍從

    Spark記錄-Scala字符串

    則表達式 實現 and sub getch ast ade fix %d Scala字符串 在Scala中的字符串和Java中的一樣,字符串是一個不可變的對象,也就是一個不能修改的對象。可以修改的對象,如數組,稱為可變對象。字符串是非常有用的對象,在本節的最後部分,我們將

    Spark記錄-Scala模式匹配

    pri 存在 cas man 定義 nbsp 不同類 方式 出現 Scala模式匹配 模式匹配是Scala函數值和閉包後第二大應用功能。Scala為模式匹配提供了極大的支持,處理消息。 模式匹配包括一系列備選項,每個替代項以關鍵字大小寫為單位。每個替代方案包括一個模式和一個

    Roomblock: a Platform for Learning ROS Navigation With Roomba, Raspberry Pi and RPLIDAR(轉)

    include lan ini sea more ike res base package What is this? "Roomblock" is a robot platform consists of a Roo

    Styling a ListView with a Horizontal ItemsPanel and a Header

    orm In ecif 技術 yellow SQ CI details this 原文 http://eblog.cloudplush.com/2012/05/23/styling-a-listview-with-a-horizontal-itemspanel-and-a-

    nginx啟動報錯:Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' fo

    class lasso clas blog 80端口 led emc tar 強制 一、背景 這個錯誤在重啟nginx或者啟動nginx的時候,經常會出現。我之前也一直認為出現這個錯誤是因為有程序占用了nginx的進程。但是知其然不知其所以然。每次報錯都有點懵逼

    論文閱讀筆記 DeepLabv1:SEMANTIC IMAGE SEGMENTATION WITH DEEP CONVOLUTIONAL NETS AND FULLY CONNECTED CRFS

    bar pro 依賴性 後處理 主題 處理 分配 位置 平滑 論文鏈接:https://arxiv.org/abs/1412.7062 摘要 該文將DCNN與概率模型結合進行語義分割,並指出DCNN的最後一層feature map不足以進行準確的語義分割

    eclipse建立maven管理Sparkscala以及eclipse的Maven配置

    說明,由於spark是用scala寫的。因此,不管是在看原始碼還是在寫spark有關的程式碼的時候,都最好是用scala。由於我個人以前是純粹的Pythoner,一直使用的都是PyCharm,然而最近換了新工作後,由於各種原因,要麼使用付費軟體,要麼使用免費軟體,所以,我被迫選擇了eclip