GithubHelp home page GithubHelp logo

mmich826 / sample-java-workwithawskinesis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from artikcloud/sample-java-workwithawskinesis

0.0 1.0 0.0 52.83 MB

A sample system (including multiple apps) can read ARTIK Cloud device data from AWS Kinesis Stream

Java 100.00%

sample-java-workwithawskinesis's Introduction

Build a sample system using ARTIK Cloud and Kinesis Stream integration

The sample system has the following functionalities:

  1. Subscribe AWS Kinesis Stream to ARTIK Cloud
  2. Devices send data to ARTIK Cloud
  3. Read device data from Kinesis Stream

We build two applications to achieve Item 1 and 3, and use the Device Simulator instead of real devices to achieve Item 2.

After completing this sample, you will learn the following objectives:

Requirements

Setup / Installation

Setup at ARTIK Cloud

  1. Open My ARTIK Cloud and connect a device (or use one that you already own) of the device type (for example, Demo Fire Sensor with unique name cloud.artik.sample.demofiresensor). You will use the device simulator to send data to ARTIK Cloud on behalf of this device later.
  2. Open the API Console and follow the instruction to get the access token. This access token is your user token. Then get your user ID. Note the user ID and access token. You will need them later.

Setup at Amazon AWS

  1. Sign up for an AWS account if you have not done so.
  2. Get the AWS access key and secret of your AWS user/role. You will need them later.
  3. Create a Kinesis stream with one shard on aws site. For example, you can do it using the AWS Kinesis Console. Noted the stream name (e.g. akcstream) and service region (e.g. us-west-1). You will need them later.

Setup two Java projects

  1. Clone this repository if you haven't already done so.
  2. Build the subscription app. Go to sub-kinesis-stream-to-akc directory and run the following command:
mvn clean package

The executable sub-kinesis-to-akc-x.x.jar is generated under the target directory. Run the following command to learn the usage:

java -jar sub-kinesis-to-akc-x.x.jar -h
  1. Build the Stream reader app. Go to kinesis-stream-consumer directory from the root and run the following command:
mvn clean package

The executable read-stream-x.x.jar is generated under the target directory. Run the following command to learn the usage:

java -jar read-stream-x.x.jar -h

Send data to ARTIK Cloud and read them from Kinesis stream

Read the blog post Build a system to send ARTIK Cloud data to an Amazon Kinesis Stream for the full details!

More about ARTIK Cloud

If you are not familiar with ARTIK Cloud, we have extensive documentation at https://developer.artik.cloud/documentation

The full ARTIK Cloud API specification can be found at https://developer.artik.cloud/documentation/api-spec

Check out advanced sample applications at https://developer.artik.cloud/documentation/samples/

To create and manage your services and devices on ARTIK Cloud, create an account at https://developer.artik.cloud

Also see the ARTIK Cloud blog for tutorials, updates, and more: http://artik.io/blog/cloud

License and Copyright

Licensed under the Apache License. See LICENSE.

Copyright (c) 2017 Samsung Electronics Co., Ltd.

sample-java-workwithawskinesis's People

Contributors

yujingwu avatar taroface avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.