LoginSignup
3
1

More than 5 years have passed since last update.

Apache Edgentの紹介

Last updated at Posted at 2017-07-05

Apache Edgentとは?

Apache Edgentとはエッジサイドデバイス向けのリアルタイム・ストリーム処理フレームワークです。Apache Stormなどはクラウド上で分散ストリーム処理を行うのに対し、Apache Edgentはエッジサイドの単一のデバイス上でストリーム処理を行います。

エッジサイドデバイス、特にIoTデバイスのユースケースとしては

  • センサーから定期的に取得し
  • データをフィルタリング・変換を行い
  • 機器の制御を行ったり
  • 必要な数値データのみをクラウドに蓄積する

というものが多いと思います。
Apache Edgentを使う事でエッジサイドで行われる一連のストリーム処理を簡単に実現できそうです。

以前はApache Quarksという名前だったようです。
同様のプロジェクトとしてSensorBeeがあります。

使い方

Apache EdgentはJava7/Java8/Androidを使ってストリーム処理を書くことができます。

import java.util.concurrent.TimeUnit;

import org.apache.edgent.providers.direct.DirectProvider;
import org.apache.edgent.topology.TStream;
import org.apache.edgent.topology.Topology;

public class TempSensorApplication {
    public static void main(String[] args) throws Exception {
        TempSensor sensor = new TempSensor();
        DirectProvider dp = new DirectProvider();
        Topology topology = dp.newTopology();
        TStream<Double> tempReadings = topology.poll(sensor, 1, TimeUnit.MILLISECONDS);
        TStream<Double> filteredReadings = tempReadings.filter(reading -> reading < 50 || reading > 80);

        filteredReadings.print();
        dp.submit(topology);
    }
}

Python対応なども議論に挙がっているようですが当面は対応しないようです。
Getting Startedを試してみると実装の感覚がつかめるかと思います。

将来性

Apache incubatorに参加している事ですし、今後も継続的に開発が行われていく予定だと思います。活発とは言えませんがコミット自体はされていました。
2016年2月からプロジェクトが始まったようなので、今後に期待です。
ちなみに、コミッターはほとんどIBMの人です。

リンク

現在、日本語の記事・ドキュメントは探した限り無かったので増えていくといいなーと思っています。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1