SlideShare a Scribd company logo
genn.ai (源内)
Realtime processing for everyone
Takeshi Nakano
@tf0054

1
Who am I?
Takeshi NAKANO
 Senior Researcher / Architect.
 Co-authered Getting started with Solr in Japanese.
 Co-authered Hadoop Hacks in Japanese.
 Writing Getting started with Kafka in Japanese.

http://genn.ai/
2
Agenda
 What is genn.ai?

 Let s use genn.ai

 Realtime processing

 Download & get your key

 Usecases

 Define a schema and a filter
 Make it real!

http://genn.ai/
3
A usecase of genn.ai
Customer
A

Web Sites
じゃらん

Customer
B

Customer
C

Marketer
Analyst

Realtime Analysis
Platform

Client
(Hotels)

4
Visual editor for genn.ai
Structure of genn.ai
MongoDB
MetaStore

genn.ai UI

User account
Tuple schema

Query design
view
Query

Gungnir
Client
on finagle

Gungnir
Cosole

Query

Gungnir
Thrift Server
Gungnir
on finagle
Thrift Server

Storm
nimbus

Topology

Kafka

User account
Tuple schema

JSON Tuple

Gungnir
Rest Server
Gungnir
Gungnir
on finagle
Rest Server
Rest Server

Tuple

Kafka
Kafka
broker
Kafka
broker
broker

Tuple

Storm
Storm
supervisor
Storm
supervisor
supervisor

MongoD
B

HDFS
Tuple
Topic

http://genn.ai/
6
Preparing for starting.

http://dev.genn.ai/
Preparing for starting.

http://dev.genn.ai/
> cd gungnir-client
> bin/gungnir -u tf0054 -p 2e2232073109
Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8
2013/10/14 22:34:58 com.twitter.finagle.Init$ apply
情報: Finagle version 6.5.1 (rev=59..9cde41) built at 20130626-111057
Gungnir server connected... ec2-xxx.amazonaws.com/54.238.99.212:9290
Welcome tf0054
gungnir>
Define your schema!
CREATE TUPLE userAction (
userId STRING,
hotelId STRING
);
CREATE TUPLE commitAction (
userId STRING,
hotelId STRING,
checkin TIMESTAMP('yyyy-MM-dd'),
nights INT
);

STRING             Java type string
TINYINT            Java type byte
SMALLINT          Java type short
INT                 Java type int
BIGINT              Java type long
FLOAT              Java type float
DOUBLE            Java type double
TIMESTAMP        long value
LIST
MAP
STRUCT
Define your filter! (1/4)
FROM userAction AS ua, commitAction AS ca USING kafka_spout()
EMIT userId, hotelId, name, image USING kafka_emit('${TOPOLOGY_ID}_user')
;

From

EMIT
Define your filter! (2/4)
FROM userAction AS ua, commitAction AS ca USING kafka_spout()
JOIN userInfo ON userInfo.uid = userId TO userInfo.name AS name, userInfo.image AS image
USING mongo_fetch('getusers', 'userInfo')
JOIN hotel ON hotel.hotelId = hotelId TO hotel.name AS hotelname, hotel.photo AS photo
USING mongo_fetch('hotelscom', 'hotel')
EMIT userId, hotelId, name, image USING kafka_emit('${TOPOLOGY_ID}_user')
;

From

JOIN
(user)

JOIN
(hotel)

EMIT
Define your filter! (3/4)
FROM userAction AS ua, commitAction AS ca USING kafka_spout()
JOIN userInfo ON userInfo.uid = userId TO userInfo.name AS name, userInfo.image AS image
USING mongo_fetch('getusers', 'userInfo')
JOIN hotel ON hotel.hotelId = hotelId TO hotel.name AS hotelname, hotel.photo AS photo
USING mongo_fetch('hotelscom', 'hotel')
INTO stream_0
;
FROM stream_0
EMIT userId, hotelId, name, image USING kafka_emit('${TOPOLOGY_ID}_user')
;

From

JOIN
(user)

JOIN
(hotel)

stream_0

EMIT
(user)
Define your filter! (4/4)
FROM userAction AS ua, commitAction AS ca USING kafka_spout()
JOIN userInfo ON userInfo.uid = userId TO userInfo.name AS name, userInfo.image AS image
USING mongo_fetch('getusers', 'userInfo')
JOIN hotel ON hotel.hotelId = hotelId TO hotel.name AS hotelname, hotel.photo AS photo
USING mongo_fetch('hotelscom', 'hotel')
INTO stream_0
;
FROM stream_0
EMIT userId, hotelId, name, image USING kafka_emit('${TOPOLOGY_ID}_user')
;
FROM stream_0
BEGIN GROUP BY hotelId
EACH count() AS count, *
EMIT hotelId, hotelname, photo, count USING kafka_emit('${TOPOLOGY_ID}_hotel')
END GROUP
;

EMIT
(user)

From

JOIN

JOIN

EACH sum(nights)
EACH avg(nights)

stream_0

GROUP
BY

EMIT
(hotel)
Register your filter! and ...
SUBMIT TOPOLOGY;

DESC TOPOLOGY;

SHOW TOPOLOGIES;

STOP TOPOLOGY xxx;

gungnir> SUBMIT TOPOLOGY;
OK
gungnir> DESC TOPOLOGY;
{
"id":"52373363e4b0a525adadb4f2",
"explain":" ... ",
"status":"RUNNING",
"owner":"tf0054@gmail.com",
"createTime":"2013-09-16T16:35:47.432Z",
"summary":{
...
}
}
gungnir> STOP TOPOLOGY 52373363e4b0a525adadb4f2 ;

DROP TOPOLOGY xxx;

gungnir> DELETE TOPOLOGY 52373363e4b0a525adadb4f2 ;
Testing it!
TRACK userAction {"userId":"siniida","hotelId":"226979"};
TRACK commitAction {"userId":"siniida","hotelId":"226979","checkin":"2013-10-18","nights":1};
*** We are changing this name because “TRACK” isn’t fit to its function! (advised in GOTO berlin 2013. Thx.)
*** The function of this command is to make and post a event to gennai.

gungnir> DESC TOPOLOGY;
{
"id":"52373363e4b0a525adadb4f2",
"explain":" ... ",
"status":"RUNNING",
"owner":"tf0054@gmail.com",
...

"hotelId" : "128767"
"hotelId" : "356564"
"hotelId" : "226979"
"hotelId" : "325073"
"hotelId" : "357090"
"hotelId" : "126942"
"hotelId" : "310294"
... USING kafka_emit('${TOPOLOGY_ID}_user')
"hotelId" : "367746"
"hotelId" : "232896"
> bin/kafka-consumer.sh 52373363e4b0a525adadb4f2_user ;
"hotelId" : "220231"
or
"hotelId" : "163175"
> bin/kafka-consumer.sh 52373363e4b0a525adadb4f2_hotel;
"hotelId" : "367856"
"hotelId" : "360863"
"hotelId" : "119747"
Knowing http tuple receiver
gungnir> DESC USER;
{
"id":"525e67f8e4b0e7cfca98d040",
"name":"siniida",
"password":"CmGOdN2UU/Xtmk0wRCZKzDy/BN65LAHPCp2+1KMDOOM=",
"createTime":"2013-10-16T10:18:32.849Z"
}
gungnir>

> curl -v -H "Content-type: application/json" -X POST 
-d '{"userId":"tf0054","hotelId":"226979"}' 
http://dev.genn.ai:9191/gungnir/v1.0/track/525e67f8e4b0e7cfca98d040/userAction
Design of genn.ai
Built on Storm
 Converts
 The
 ..

properly (e.g. building AST)

Good Parts (e.g. Supporting parallelism setting)
The future of genn.ai
genn.ai wants friends!
 genn.ai

codes will be open-sourced in the future.

 We

are looking for co-challenging partners for
improving genn.ai.

 You

can use genn.ai on your web sites completely for
free (infrastructure etc..) if we can share the dream
together.

Please feel free to contact us!
 http://genn.ai/
 tf0054@gmail.com
Thanks!

http://genn.ai/
19
20

More Related Content

Similar to genn.ai v2

Enterprise AIR Development for JavaScript Developers
Enterprise AIR Development for JavaScript DevelopersEnterprise AIR Development for JavaScript Developers
Enterprise AIR Development for JavaScript Developers
AndreCharland
 
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST FrameworkEasy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Inexture Solutions
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript Vulnerabilities
Ory Segal
 
Mobile, web and cloud - the triple crown of modern applications
Mobile, web and cloud -  the triple crown of modern applicationsMobile, web and cloud -  the triple crown of modern applications
Mobile, web and cloud - the triple crown of modern applicationsIdo Green
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
gturnquist
 
Active object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architectureActive object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architecture
Somenath Mukhopadhyay
 
Robotlegs on Top of Gaia
Robotlegs on Top of GaiaRobotlegs on Top of Gaia
Robotlegs on Top of Gaia
Jesse Warden
 
d.mix: Programming by a Sample
d.mix: Programming by a Sampled.mix: Programming by a Sample
d.mix: Programming by a Sample
Leslie W
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecuritiesamiable_indian
 
Isomorphic Javascript - nodebr
Isomorphic Javascript - nodebrIsomorphic Javascript - nodebr
Isomorphic Javascript - nodebr
David Lojudice Sobrinho
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
Gregor Woiwode
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
NodeXperts
 
Silver Light By Nyros Developer
Silver Light By Nyros DeveloperSilver Light By Nyros Developer
Silver Light By Nyros Developer
Nyros Technologies
 
WELCOME TO OUR PRESENTION.pptx
WELCOME TO OUR PRESENTION.pptxWELCOME TO OUR PRESENTION.pptx
WELCOME TO OUR PRESENTION.pptx
EtzzBadsha
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
Matt Raible
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
Matt Raible
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
Sapna Upreti
 
Securing Java EE Web Apps
Securing Java EE Web AppsSecuring Java EE Web Apps
Securing Java EE Web AppsFrank Kim
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
guest9bcef2f
 

Similar to genn.ai v2 (20)

Enterprise AIR Development for JavaScript Developers
Enterprise AIR Development for JavaScript DevelopersEnterprise AIR Development for JavaScript Developers
Enterprise AIR Development for JavaScript Developers
 
MobyPicture android2
MobyPicture android2MobyPicture android2
MobyPicture android2
 
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST FrameworkEasy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
 
Client-side JavaScript Vulnerabilities
Client-side JavaScript VulnerabilitiesClient-side JavaScript Vulnerabilities
Client-side JavaScript Vulnerabilities
 
Mobile, web and cloud - the triple crown of modern applications
Mobile, web and cloud -  the triple crown of modern applicationsMobile, web and cloud -  the triple crown of modern applications
Mobile, web and cloud - the triple crown of modern applications
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
 
Active object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architectureActive object of Symbian in the lights of client server architecture
Active object of Symbian in the lights of client server architecture
 
Robotlegs on Top of Gaia
Robotlegs on Top of GaiaRobotlegs on Top of Gaia
Robotlegs on Top of Gaia
 
d.mix: Programming by a Sample
d.mix: Programming by a Sampled.mix: Programming by a Sample
d.mix: Programming by a Sample
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
Isomorphic Javascript - nodebr
Isomorphic Javascript - nodebrIsomorphic Javascript - nodebr
Isomorphic Javascript - nodebr
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
 
Reactive Application Using METEOR
Reactive Application Using METEORReactive Application Using METEOR
Reactive Application Using METEOR
 
Silver Light By Nyros Developer
Silver Light By Nyros DeveloperSilver Light By Nyros Developer
Silver Light By Nyros Developer
 
WELCOME TO OUR PRESENTION.pptx
WELCOME TO OUR PRESENTION.pptxWELCOME TO OUR PRESENTION.pptx
WELCOME TO OUR PRESENTION.pptx
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Securing Java EE Web Apps
Securing Java EE Web AppsSecuring Java EE Web Apps
Securing Java EE Web Apps
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

genn.ai v2

  • 1. genn.ai (源内) Realtime processing for everyone Takeshi Nakano @tf0054 1
  • 2. Who am I? Takeshi NAKANO  Senior Researcher / Architect.  Co-authered Getting started with Solr in Japanese.  Co-authered Hadoop Hacks in Japanese.  Writing Getting started with Kafka in Japanese. http://genn.ai/ 2
  • 3. Agenda  What is genn.ai?  Let s use genn.ai  Realtime processing  Download & get your key  Usecases  Define a schema and a filter  Make it real! http://genn.ai/ 3
  • 4. A usecase of genn.ai Customer A Web Sites じゃらん Customer B Customer C Marketer Analyst Realtime Analysis Platform Client (Hotels) 4
  • 6. Structure of genn.ai MongoDB MetaStore genn.ai UI User account Tuple schema Query design view Query Gungnir Client on finagle Gungnir Cosole Query Gungnir Thrift Server Gungnir on finagle Thrift Server Storm nimbus Topology Kafka User account Tuple schema JSON Tuple Gungnir Rest Server Gungnir Gungnir on finagle Rest Server Rest Server Tuple Kafka Kafka broker Kafka broker broker Tuple Storm Storm supervisor Storm supervisor supervisor MongoD B HDFS Tuple Topic http://genn.ai/ 6
  • 8. Preparing for starting. http://dev.genn.ai/ > cd gungnir-client > bin/gungnir -u tf0054 -p 2e2232073109 Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8 2013/10/14 22:34:58 com.twitter.finagle.Init$ apply 情報: Finagle version 6.5.1 (rev=59..9cde41) built at 20130626-111057 Gungnir server connected... ec2-xxx.amazonaws.com/54.238.99.212:9290 Welcome tf0054 gungnir>
  • 9. Define your schema! CREATE TUPLE userAction ( userId STRING, hotelId STRING ); CREATE TUPLE commitAction ( userId STRING, hotelId STRING, checkin TIMESTAMP('yyyy-MM-dd'), nights INT ); STRING             Java type string TINYINT            Java type byte SMALLINT          Java type short INT                 Java type int BIGINT              Java type long FLOAT              Java type float DOUBLE            Java type double TIMESTAMP        long value LIST MAP STRUCT
  • 10. Define your filter! (1/4) FROM userAction AS ua, commitAction AS ca USING kafka_spout() EMIT userId, hotelId, name, image USING kafka_emit('${TOPOLOGY_ID}_user') ; From EMIT
  • 11. Define your filter! (2/4) FROM userAction AS ua, commitAction AS ca USING kafka_spout() JOIN userInfo ON userInfo.uid = userId TO userInfo.name AS name, userInfo.image AS image USING mongo_fetch('getusers', 'userInfo') JOIN hotel ON hotel.hotelId = hotelId TO hotel.name AS hotelname, hotel.photo AS photo USING mongo_fetch('hotelscom', 'hotel') EMIT userId, hotelId, name, image USING kafka_emit('${TOPOLOGY_ID}_user') ; From JOIN (user) JOIN (hotel) EMIT
  • 12. Define your filter! (3/4) FROM userAction AS ua, commitAction AS ca USING kafka_spout() JOIN userInfo ON userInfo.uid = userId TO userInfo.name AS name, userInfo.image AS image USING mongo_fetch('getusers', 'userInfo') JOIN hotel ON hotel.hotelId = hotelId TO hotel.name AS hotelname, hotel.photo AS photo USING mongo_fetch('hotelscom', 'hotel') INTO stream_0 ; FROM stream_0 EMIT userId, hotelId, name, image USING kafka_emit('${TOPOLOGY_ID}_user') ; From JOIN (user) JOIN (hotel) stream_0 EMIT (user)
  • 13. Define your filter! (4/4) FROM userAction AS ua, commitAction AS ca USING kafka_spout() JOIN userInfo ON userInfo.uid = userId TO userInfo.name AS name, userInfo.image AS image USING mongo_fetch('getusers', 'userInfo') JOIN hotel ON hotel.hotelId = hotelId TO hotel.name AS hotelname, hotel.photo AS photo USING mongo_fetch('hotelscom', 'hotel') INTO stream_0 ; FROM stream_0 EMIT userId, hotelId, name, image USING kafka_emit('${TOPOLOGY_ID}_user') ; FROM stream_0 BEGIN GROUP BY hotelId EACH count() AS count, * EMIT hotelId, hotelname, photo, count USING kafka_emit('${TOPOLOGY_ID}_hotel') END GROUP ; EMIT (user) From JOIN JOIN EACH sum(nights) EACH avg(nights) stream_0 GROUP BY EMIT (hotel)
  • 14. Register your filter! and ... SUBMIT TOPOLOGY; DESC TOPOLOGY; SHOW TOPOLOGIES; STOP TOPOLOGY xxx; gungnir> SUBMIT TOPOLOGY; OK gungnir> DESC TOPOLOGY; { "id":"52373363e4b0a525adadb4f2", "explain":" ... ", "status":"RUNNING", "owner":"tf0054@gmail.com", "createTime":"2013-09-16T16:35:47.432Z", "summary":{ ... } } gungnir> STOP TOPOLOGY 52373363e4b0a525adadb4f2 ; DROP TOPOLOGY xxx; gungnir> DELETE TOPOLOGY 52373363e4b0a525adadb4f2 ;
  • 15. Testing it! TRACK userAction {"userId":"siniida","hotelId":"226979"}; TRACK commitAction {"userId":"siniida","hotelId":"226979","checkin":"2013-10-18","nights":1}; *** We are changing this name because “TRACK” isn’t fit to its function! (advised in GOTO berlin 2013. Thx.) *** The function of this command is to make and post a event to gennai. gungnir> DESC TOPOLOGY; { "id":"52373363e4b0a525adadb4f2", "explain":" ... ", "status":"RUNNING", "owner":"tf0054@gmail.com", ... "hotelId" : "128767" "hotelId" : "356564" "hotelId" : "226979" "hotelId" : "325073" "hotelId" : "357090" "hotelId" : "126942" "hotelId" : "310294" ... USING kafka_emit('${TOPOLOGY_ID}_user') "hotelId" : "367746" "hotelId" : "232896" > bin/kafka-consumer.sh 52373363e4b0a525adadb4f2_user ; "hotelId" : "220231" or "hotelId" : "163175" > bin/kafka-consumer.sh 52373363e4b0a525adadb4f2_hotel; "hotelId" : "367856" "hotelId" : "360863" "hotelId" : "119747"
  • 16. Knowing http tuple receiver gungnir> DESC USER; { "id":"525e67f8e4b0e7cfca98d040", "name":"siniida", "password":"CmGOdN2UU/Xtmk0wRCZKzDy/BN65LAHPCp2+1KMDOOM=", "createTime":"2013-10-16T10:18:32.849Z" } gungnir> > curl -v -H "Content-type: application/json" -X POST -d '{"userId":"tf0054","hotelId":"226979"}' http://dev.genn.ai:9191/gungnir/v1.0/track/525e67f8e4b0e7cfca98d040/userAction
  • 17. Design of genn.ai Built on Storm  Converts  The  .. properly (e.g. building AST) Good Parts (e.g. Supporting parallelism setting)
  • 18. The future of genn.ai genn.ai wants friends!  genn.ai codes will be open-sourced in the future.  We are looking for co-challenging partners for improving genn.ai.  You can use genn.ai on your web sites completely for free (infrastructure etc..) if we can share the dream together. Please feel free to contact us!  http://genn.ai/  tf0054@gmail.com
  • 20. 20