์ด ๋ฌธ์๋ CloudBread ํ๋ก์ ํธ์ ์ฃผ์๊ธฐ๋ฅ์ ๋ํด ์๊ฐํ๋ Repository
ํด๋ผ์ฐ๋ ๊ธฐ๋ฐ ๋ชจ๋ฐ์ผ ๊ฒ์ ์๋ฒ ํ๋ซํผ: MGBaaS
100% ๊ตญ์ฐ ๊ณต๊ฐSW ํ๋ก์ ํธ์ธ ํด๋ผ์ฐ๋๋ธ๋ ๋(CloudBread)๋ ํด๋ผ์ฐ๋ ๊ธฐ๋ฐ์ ์คํ์์ค ํ๋ก์ ํธ๋ก์ ํญ๋ฐ์ ์ธ ์ฑ์ฅ์ ํ๊ณ ์๋ ๋ชจ๋ฐ์ผ ๊ฒ์์ ์ํ ์ฌ์ธ์(all-in-one) ์๋ฒ ์์ง ํ๋ซํผ์ด๋ค.
๋ชจ๋ฐ์ผ ๊ฒ์์ ํตํด ์ถ์ ๋๋ ๋น ๋ฐ์ดํ์ธ ์ฌ์ฉ์ ํ๋(ํจํด) ๋ถ์์ ์ค์ํ ์ฒซ ๋ฒ์งธ ์ด์ ํ๋ก ๋ชฉํํ๊ณ ์์ผ๋ฉฐ, ํนํ ๋จธ์ ๋ฌ๋(Machine Learning) ์์ง์ ํ๋ก์ ํธ์ ์ค์ฅ๊ธฐ์ ์ธ ์ฐจ๋ณํ ๊ธฐ๋ฅ์ค ํ๋๋ก ๊ฐ๋ฐํ๊ณ ์๋ค.
ํด๋ผ์ฐ๋๋ธ๋ ๋ ํ๋ก์ ํธ๋ ํ์ฌ ๋ชจ๋ฐ์ผ ๊ฒ์์ ์ํด ์ต์ ํ๋ ํ ํ ์๋ฒ ์์ง๊ณผ ๋น ๋ฐ์ดํ ๋ถ์ ๊ทธ๋ฆฌ๊ณ ์ด๋ฅผ ํตํ ๋จธ์ ๋ฌ๋์ผ๋ก ์ด์ด์ง๋ ์ฑ์ฅ ๋ก๋๋งต(roadmap)์ ๊ณ ๋ คํ๊ณ ์์ผ๋ฉฐ, ์ด๋ฐ ๋ค์ํ ๊ณต๊ฐSW ๋ชจ๋๋ค์ด ๋ค์ํ ํ ๊ณต๊ฐSW ์์๋ ํ์ฉํ ์ ์๋๋ก ๊ณต๊ฐ์ฑ์ด ๋์ MIT ๋ผ์ด์ผ์ค๋ฅผ ์ฑํํ๊ณ ์๋ค.
ํ๊ตญ์ ์ํ๋ผ์์(Atlassian)์ ์งํฅํ๋ ํด๋ผ์ฐ๋๋ธ๋ ๋ ํ๋ก์ ํธ๋ ํด๋ผ์ฐ๋ ํ๊ฒฝ์์ ๋ชจ๋ฐ์ผ ๊ฒ์์ ์๋ ํตํฉ ์๋ฒ ์์ง์ผ๋ก์ MGBaaS(Mobile Game Backend as a Service) ํ๋ซํผ์ ์ถ๊ตฌํ๋ค.
CloudBread ํ๋ก์ ํธ : https://github.com/CloudBreadProject
CloudBread ๋ฉ์ธ : https://github.com/CloudBreadProject/CloudBread
CloudBread ์น์ฌ์ดํธ : http://www.cloudbread.org/
CloudBread ๊ณต์ ํ์ด์ค๋ถ ๊ทธ๋ฃน : https://www.facebook.com/groups/cloudBreadProject/
CloudBread ๊ฐ๋ฐ์ ๊ฐ์ด๋wiki(ํ๊ธ) : https://github.com/CloudBreadProject/CloudBread/wiki/Home-kor
CloudBread ์ค์น ๊ฐ์ด๋ wiki(ํ๊ธ) : https://github.com/CloudBreadProject/CloudBread/wiki/Install-guide-kor
CloudBread API ๋ ํผ๋ฐ์ค : http://cloudbreadproject.github.io/
###1. ๋ชจ๋ฐ์ผ ๊ฒ์์ ์ํ ๋ก์ง
๋ชจ๋ฐ์ผ ๊ฒ์์ ํ์ํ 100์ฌ๊ฐ์ง์ ๋ค์ํ behavior ๋ค์ ๊ตฌํํด API๋ฅผ ํธ์ถํด ์ฆ์ ์ฌ์ฉ๊ฐ๋ฅํ๋๋ก ๋ก์ง ๊ตฌํ
CloudBread ์ค์น๊ฐ์ด๋ ๋ฌธ์ ์ฐธ์กฐ
CloudBread API ๊ฐ์ด๋ ๋ฌธ์ ์ฐธ์กฐ
###2. PaaS ํด๋ผ์ฐ๋ ๊ธฐ๋ฐ ๊ฒ์ ์๋ฒ (์์ง)
CloudBread๋ PaaS/DaaS ๊ธฐ๋ฐ ๊ฒ์์๋ฒ๋ก ๋ชจ๋ฐ์ผ ๊ฒ์ ๊ฐ๋ฐ์(์ฌ)๊ฐ ํด๋ผ์ด์ธํธ ๊ฐ๋ฐ์๋ง ์ง์คํ ์ ์๋๋ก ๊ด๋ฆฌ ํฌ์ธํธ๋ฅผ ์ต์ํํ ์ ์์
CloudBread ์บ ํ ์ํคํ
์ฒ ๊ฐ์ด๋ ๋ฌธ์ ์ฐธ์กฐ
###3. ๊ฐ๋ฐ/ํ
์คํธ/๋ฐฐํฌ ํตํฉํ๊ฒฝ
ํด๋ผ์ฐ๋ ์๋น์ค๊ฐ ์ ๊ณตํ๋ ํ๊ฒฝ์ ๋ชจ๋ฐ์ผ ๊ฒ์ ๊ฐ๋ฐ์ฌ๊ฐ ๋ ์ฝ๊ฒ ํ์ฉ ๊ฐ๋ฅํ ํ๋ซํผ ์ ๊ณต
๊ฐ๋ฐ์๊ฐ ๊ฐ๋ฐ / ๊ฒ์ / ๋ฐฐํฌ ํ ๊ฒฝ์ฐ ์ต์ํ git/github์ ์ด์ฉ ๊ฐ๋ฅํ๋ฉฐ, node.js๋ก ๊ฐ๋ฐ๋ Admin-Web์ด๋ Socket ๋ฑ์ ํ๋ก์ ํธ๋ ์ฆ์ App Service๋ก ๋ฐฐํฌ ๊ฐ๋ฅํ๋๋ก ๊ธฐ๋ณธ PaaS์ ๊ธฐ๋ฅ์ผ๋ก ์ ๊ณต
CloudBread ARM ๋ฐฐํฌ Repo
App Service์ git/github ๋ฑ ํตํฉ ๋ฐฐํฌ
###4. ์๋น์ค ๊ท๋ชจ์ ๋ฐ๋ฅธ ํด๋ผ์ด์ธํธ ๊ฒ์๋ณ๊ฒฝ ์์
๋ชจ๋ฐ์ผ ๊ฒ์ ํด๋ผ์ด์ธํธ๋ ์ ๊ณต๋๋ API๋ฅผ ํธ์ถํ๋ฉด ๋๋ฉฐ, ๋ฌด์ ํ์ ๊ฐ๊น์ด ํด๋ผ์ฐ๋ ๊ธฐ๋ฐ API ์ฒ๋ฆฌ ๊ธฐ๋ฅ์ ๊ทธ๋๋ก ํ์ฉ ๊ฐ๋ฅ.
์ด๋ฏธ ์นด์นด์ค ์
์ ๊ฒ์ ๋ฑ์ stress test ๋ฑ์ ์งํํ์ผ๋ฉฐ, ํด๋ผ์ฐ๋ PaaS App Service์ scale-up๊ณผ scale-out์ ํ์ฉํด ๋ฌด์ ํ์ ๊ฐ๊น์ด ์ธ์คํด์ค๋ฅผ ํ์ฉ ๊ฐ๋ฅ.
์ง๋ Unity United ํ์ฌ์์ jmetor ๋ฐ cloud ๊ธฐ๋ฐ ์ฑ๋ฅ ํ
์คํธ ๊ด๋ จ ์์ฐ์ ์ํํ๊ณ , 6,000 RPS(Request per Second) ์ด์์ ์ฒ๋ฆฌ ์ฑ๋ฅ ๊ธฐ๋ณธ ์ ๊ณต
Unity United 2016 ๋ฐํ์๋ฃ ์ฑ๋ฅ์งํ
###5. ํ
์คํธ/๊ฐ๋ฐ ๊ฐ์ด๋
Postman / Github wiki ๋ฐ CloudBread ์บ ํ๋ฅผ ํตํด ์ ๊ณต๋ ์ฝํ
ํธ๋ฅผ ์ด์ฉํด ๊ฒ์ ๋ฐฑ์๋๋ก ๊ตฌํ ๊ฐ๋ฅ
ํนํ, 100์ฌ๊ฐ์ Behavior๋ฅผ ํ
์คํธ ํ๊ธฐ ์ํด ์ง์ Restful API๋ฅผ ์ ์ํ๊ฑฐ๋ ๋ง๋ค ํ์ ์์ด, Postman์ collection์ ์ด์ฉํ ์ ์์ด ๋ฐ๋ก Camp ๋ฑ์์๋ ์ฐธ์ฌ์์ ํ์
๊ฐ๋ฅํ ํ๊ฒฝ ์ ๊ณต
ํนํ, CloudBread-Unity-SDK ํ๋ก์ ํธ๋ Unity์์ ๋ฐ๋ก CloudBread์ API๋ฅผ ํธ์ถ ๊ฐ๋ฅํ SDK ํ๋ก์ ํธ๋ก Unity์์์ CloudBread ๊ฐ๋ฐ์ ๋ ์ฝ๊ณ ๋น ๋ฅด๊ฒ ์งํ ๊ฐ๋ฅ
CloudBread Unity SDK Repo
CloudBread wiki ๊ฐ๋ฐ ๊ฐ์ด๋
###6. ๊ฒ์ ์๋ฒ ๊ธ๋ก๋ฒ ๋ฐฐํฌ
ARM ํจํค์ง๋ฅผ ์ด์ฉํด ์ ์ธ๊ณ ์ํ๋ ์ง์ญ์ ๋ฐ์ดํฐ์ผํฐ์ ์์ฌ์ด ๋ฐฐํฌ ๊ฐ๋ฅํ๋๋ก ์๋ํ๋ ๋ฐฐํฌํ๊ฒฝ ๊ตฌํ
๋ฐ์ดํฐ ์ผํฐ๊ฐ ์ ๊ณต๋๋ ์ด๋๊ณณ์์๋ 10๋ถ ์ด๋ด์ ๋ชจ๋ CloudBread์ ์๋น์ค ํ๊ฒฝ์ ๋ฐฐํฌ ๊ฐ๋ฅํด ๋๋จ์ pre-launching์ด๋ ๋ถ๋ฏธ ์ ๋ฝ ์ง์ญ์ ์ต์ ํ๋ latency ์ ๊ณต ๊ฐ๋ฅ
CloudBread-ARM ํ๋ก์ ํธ๋ GUI ๊ธฐ๋ฐ์ด ์๋ Script ๊ธฐ๋ฐ์ผ๋ก CloudBread ์คํ์ ์ํด ํ์ํ Resource๋ค์ ๋น ๋ฅด๊ณ ์ฝ๊ฒ ๋ฐฐํฌํ ์ ์๋ ํ์ ์ค์น ํ๋ก์ ํธ
๋ฐ์ดํฐ ์ผํฐ ์์น
CloudBread ARM ํ๋ก์ ํธ Repo
###7. ๊ธ๋ก๋ฒ ๋์ ๋ฐฐํฌ/ํธ๋ํฝ ๋ถ์ฐ
๊ธ๋ก๋ฒ ๋์ ๋ก ์นญ์ ๊ฒ์ด๋จธ๊ฐ ๊ฐ๊น์ด ๋ฐ์ดํฐ์ผํฐ์ ์๋ ์ ์ํ ์ ์๋๋ก ๋๋ ํ๊ฒฝ ๊ตฌํ
Traffic manager๋ฅผ ์ด์ฉํ ๊ธ๋ก๋ฒ ๋ก ์นญ ํ๋ก์ ํธ ๊ฐ๋ฅ

Traffic manager๋ฅผ ์ด์ฉํ๋ฉด ์ฌ์ฉ์๋ก๋ถํฐ ๊ฐ์ฅ ๊ฐ๊น์ด ๋ฐ์ดํฐ์ผํฐ๋ก request๊ฐ ์์ฒญ๋จ
###8. AES ๋ฐ์ดํฐ ์ํธํ AES256์ผ๋ก ๊ธฐ๋ณธ Encryption๋ ๋ฐ์ดํฐ ์ฒ๋ฆฌ CloudBread ๊ฐ๋ฐ์ ๊ฐ์ด๋ ์ํธํ ์ฐธ์กฐ๋งํฌ
- Crypt ์ฒ๋ฆฌ๋ก web.config์ ์ค์ ์ ์ด์ฉํด AES256 ์ํธํ ์ฒ๋ฆฌ ๊ฐ๋ฅ
<!-- Encryption configuration. ์ํธํ ์ค์ -->
<add key="CloudBreadCryptSetting" value="AES256"></add>
<add key="CloudBreadCryptKey" value="1234567890123456"></add>
<add key="CloudBreadCryptIV" value="1234567890123456"></add>
- ํด๋ผ์ด์ธํธ์์ ์ํธํ ๊ตฌ์ฑ์ ์ํํด CloudBread API๋ฅผ ํธ์ถ
- ์ํธํ๋์ด ์ ๋ฌ๋ ํ ์คํธ๋ฅผ CloudBread๊ฐ ๋ณตํธํํด ์๋ฒ์ ์ ์ฅ
- ์ํธํ ์ค์ ์ ์๋ ํด๋ผ์ด์ธํธ์ ์ํธํ๋ ๋ฌธ์์ด response
- **CloudBread-Encrypt-Text-Tool**๋ก ์ํธํ ๋ณตํธํ๋ฅผ ๊ฐ๋ฐ์ ๋ฌธ์์ด ํ ์คํธ ๊ฐ๋ฅ
- Postman์ ๊ธฐ๋ณธ ์ค์ ๋ ์์ (Encrypt๋ก ์์)๋ฅผ ํ์ฉ ๊ฐ๋ฅ
- DEMO ์ฉ๋๋ก, "https://cb2-crypt-demo.azurewebsites.net" ์๋ฒ ์ด์ฉ ๊ฐ๋ฅ
###9. ๊ฒ์ ๋ก๊ทธ ์ ์ฅ
NoSQL ์ ์ฅ์๋ฅผ ํ์ฉํด JSON๊ธฐ๋ฐ ๋ฐ์ดํฐ๋ฅผ ํฅํ ๋ก๊ทธ ๋ถ์ ๋ชฉ์ ์ผ๋ก ์ ์ฌ
CloudBread์์์ ๋ก๊ทธ๋ ๊ธฐ๋ณธ์ ์ผ๋ก Behavior API๋ฅผ ํตํด ๋ฐ์ดํฐ๊ฐ ๋ณ๊ฒฝ๋๋ ๋ชจ๋ ๋ฃจํด์์ ํธ์ถ๋จ
์๋ฅผ ๋ค์ด,
CBComInsMemberItem API ์ ๊ฒฝ์ฐ ์๋์ ๊ฐ์ด ๋ก๊ทธ๋ฅผ ์ ์ฌํ๊ณ RunLog()๋ฅผ ์ํ
...
// task end log
logMessage.memberID = p.MemberID;
logMessage.Level = "INFO";
logMessage.Logger = "CBComInsMemberItemController";
logMessage.Message = jsonParam;
Logging.RunLog(logMessage);
...
RunLog()๋ CBLoggers ์ implement ๋์ด์๊ณ , config์ ๋ฐ๋ผ NoSQL Table Storage ๋ฑ์ ์ ์ฌ ๊ฐ๋ฅ
...
switch (globalVal.CloudBreadLoggerSetting)
{
case "SQL":
/// Save log on SQL
case "ATS":
/// Save log on Azure Table Storage
case "AQS":
/// Save log on Azure Queue Storage
case "redis":
/// Save log on Azure Redis Cache
/// yyyymmdd:memberid:Controller:GUID
}
...
์ด๋ ๊ฒ ์ํ๋ ํ์ ์ ๋ถ์ ์ฑํฅ๊ณผ ๋ชฉ์ ์ ๋ง๋ NoSQL์ ์ ์ฌ ๊ฐ๋ฅํ๋ฉฐ ๊ธฐ๋ณธ NoSQL - Table Storage ์ค์ ์ ๊ถ์ฅ
###10. ๊ธฐ๋ณธ ๊ด๋ฆฌ์ ํ๋ฉด
๊ฒ์ ๊ด๋ จ ๋ฐ์ดํฐ๋ฅผ ๊ด๋ฆฌํ๋ ๊ธฐ๋ณธ ๊ด๋ฆฌ์ ํ๋ฉด๊ณผ ํต๊ณ ์ ๋ณด๋ฅผ ํ์ธ ๊ฐ๋ฅํ ํ๋ฉด ์ ๊ณต
CloudBread Admin Web ๊ณต์ Repo
ํ์ฌ ๋ฐฐํฌ ์ค์ธ React๋ก ๊ฐ๋ฐ๋ 2.1 project branch๋ฅผ ์๋ ๋งํฌ์์ ๊ฒํ ๊ฐ๋ฅ
(์ฃผ์! ํ์ฌ master branch๋ ์ง์ ์
๋ฐ์ดํธ ์ค)
๊ด๋ฆฌ์ ํ์ด์ง ํ๋ก์ ํธ(2.1 stable)
Admin-Web ๋ฐ๋ชจ ๋งํฌ : https://cb2-admin-demo.azurewebsites.net/
id : demo@cb2admin.onmicrosoft.com
pwd : P@ssw0rd!
์ฐธ์กฐ : CB2 ๋ฐ๋ชจ ์ฌ์ดํธ๋ ๋ชจ๋ ๋ฐ์ดํฐ๊ฐ ์ฃผ๊ธฐ์ ์ผ๋ก ์ด๊ธฐํ๋จ(1์๊ฐ์ 1ํ)
CloudBread Admin Web 2.5 - node ํ๋ก์ ํธ๋ ์ ์ฒด CloudBread-Admin-Web์ ์๋์ ๋ถ์ ๊ธฐ๋ฅ๋ค์ ํฌํจํ๋ node.js ๋ก ์ง์ ๊ฐ๋ฐ ์ค
###11. DAU/HAU/ARPU ๋ฑ์ ํต๊ณ
์ผ์ผ ์ฌ์ฉ์ ๋ฑ์ ํต๊ณ ์ ๋ณด๋ฅผ ์์ 10๋ฒ Admin-Web ํ๋ก์ ํธ์์ ๋ก๊ทธ์ธ ํ ํ์ธ ๊ฐ๋ฅ
ํต๊ณ ๋ฐ์ดํฐ๋ฅผ generateํ๋ schduler ํ๋ก์ ํธ๋ CloudBread-Scheduler Repo์์ WebJob ์ผ๋ก ์์ฑํด ์ค์ผ์ฅด ์ฒ๋ฆฌ
ํ์ฌ Schduler๋ฅผ ์คํํ๋ฉด ์๋์ Slack ์ฑ๋์ messgae๊ฐ ๋์ฐฉํ๋๋ก ๊ตฌ์ฑ๋ ์ํ
CloudBread Slack Notification : https://cloudbread.slack.com/messages/general/
์ฆ, ํด๋น notification์ ๋ฐ์์ผ ํ๋ ํ์์๊ฒ ์๋ slack channel์์ ๊ด๋ จ batch ์์
์ด ์๋ฃ ๋๋ ๊ฒ์ PC์ ๋ชจ๋ฐ์ผ ์์ชฝ์์ ํ์ธ ๊ฐ๋ฅ
CloudBread-Scheduler ์ค์น ๋ฐ ๊ตฌ์ฑ์ ๋ํด์๋ CloudBread ์ค์น ๊ฐ์ด๋ wiki์ CloudBread-Scheduler ํญ๋ชฉ ์ฐธ์กฐ
###12. ์ด๋ฒคํธ/์ฟ ํฐ/์ ๋ฌผ๊ด๋ฆฌ
๊ฒ์์ ํ์ํ ๊ธฐ๋ฅ ๊ตฌํ ์๋ฃ ์ํ.
๊ด๋ฆฌ์ ํ์ด์ง์์ ๋ชจ๋ ์ฒ๋ฆฌ ๊ฐ๋ฅํ๋ฉฐ, ํด๋ผ์ด์ธํธ์์๋ Postman ๋ฐ Behavior ๋ฆฌ์คํธ ๋ฌธ์๋ฅผ ์ฐธ์กฐํด ํด๋น API๋ฅผ ํธ์ถ ์ฒ๋ฆฌ
###13. ๋ก๊ทธ๋ถ์ - Big data / Hadoop
์ ์ฌ๋๋ NoSQL๊ธฐ๋ฐ ๋ก๊ทธ ๋ฐ์ดํฐ๋ฅผ Big-data Hadoop์ ํ์ฉํด ๋ถ์
CloudBread๋ NoSQL์ธ Table Storage์ ๋ถ์์ ์ํด HortonWorks์ Hadoop PaaS ๋ฐฐํฌํ์ธ HDInsight๋ฅผ ์ด์ฉํด ๋ถ์ ์ํ
HDInsight ๊ณต์ ์ฌ์ดํธ ๋งํฌ
Table Storage๋ Key/Value ๊ธฐ๋ฐ NoSQL ์ ์ฅ์๋ก, CloudBread์ ๋ชจ๋ ๋ฐ์ดํฐ ์์ ์์ ์ ๋ก๊ทธ๋ก ๊ธฐ๋กํ๊ธฐ ๋๋ฌธ์ ๋ค์ํ Big data ๋ถ์ ์๋๋ฆฌ์ค์์ ์ ์ฉ ๊ฐ๋ฅํ๊ณ , ์๋ ์์ ๋ ์ง๋ CloudBread ์บ ํ์์ ์์ฒญ ์ฃผ์ จ๋ ๋ชจ๋ฐ์ผ ๊ฒ์์ ์คํ ์ด์ง ๋ ๋ฒจ(๋์ด๋) ๋์์ธ ๋ถ์ ์๋๋ฆฌ์ค
๋ชจ๋ฐ์ผ ๊ฒ์์ ์คํ ์ด์ง ๋ ๋ฒจ(๋์ด๋) ๋์์ธ ๋ถ์
-
๋ชฉํ์ ์ : 30์ฌ๊ฐ์ ์คํ ์ด์ง๊ฐ ์กด์ฌํ๋ ์บ์ฃผ์ผ ๊ฒ์. ์คํ ์ด์ง๋ณ๋ก ๋์ด๋๋ฅผ ์ ์ ํ ์ ์งํ๊ธฐ ์ํด, ํด๋น ์คํ ์ด์ง๋ณ๋ก ํด๋ฆฌ์ด์ ์์๋๋ ์๊ฐ ๋ฑ์ ๊ธฐ๋กํด ์คํ ์ด์ง ๋์ด๋๋ฅผ ์กฐ์ ํ๋๋ฐ ์ฌ์ฉํ๊ธฐ ํฌ๋ง. ์ด๋ฅผ ์ํด Closed Beta ์๋น์ค๋ฅผ CloudBread๋ก 7์ผ๊ฐ ์งํํ๊ณ , 7์ผ๊ฐ ์์ง๋ CloudBread ๋ก๊ทธ์์ ์คํ ์ด์ง๋ณ ๋์ด๋ ๋ถ์์ ํฌ๋ง
-
๊ธฐ๋ณธ์ ๋ณด : ๊ฒ์์ ์คํ ์ด์ง ์ ๋ณด๋ Member : MemberGameInfoStage ํ ์ด๋ธ์ one to many relationship์ผ๋ก ์ ์๋์ด ์์. ์ด ์ ๋ณด๋ RDBMS์ด๊ธฐ ๋๋ฌธ์ state ์ ๋ณด๋ง์ ์ ์ฅํด log์ฑ์ผ๋ก ๋จ๊ธฐ์ง๋ ์์.
-
CloudBread์ API์ธ CBComInsMemberGameInfoStagesController์์ ๋ก๊ทธ ์ ์ฌ ์ฒ๋ฆฌ๋ฅผ ๋ด๋นํ๊ฒ ๋๊ณ , ์ด ๋ฃจํด์ ์๋์ log๋ฅผ ๋จ๊ธฐ๋ ์ฒ๋ฆฌ๊ฐ ์กด์ฌ
// task end log
logMessage.memberID = p.MemberID;
logMessage.Level = "INFO";
logMessage.Logger = "CBComInsMemberGameInfoStagesController";
logMessage.Message = jsonParam;
Logging.RunLog(logMessage);
-
์ผ๋ณ ์ ์ฌ๋๋ ๋ก๊ทธ ๋ฐ์ดํฐ์์ CBComInsMemberGameInfoStagesController ์๋ณ์๋ฅผ ์ด์ฉํด Hadoop์์ Hive๋ฅผ ์ํํ๋ฉด ์ํ๋ ์คํ ์ด์ง๋ณ ํด๋ฆฌ์ด ์์ ์๊ฐ์ ๊ณ์ฐ ๊ฐ๋ฅ
-
HDInsight์ HDFS๋ Blob Storage์ ํธํ๋จ
-
Blob ์ฒ๋ฆฌ๋ฅผ ์ํ Storage Explorer ๊ฐ๋ฐ ๋๊ตฌ์์ blob ์ ๋ก๋. blob๋ค์ "wasbs:///example/data/" ํ์๋ก ๋งคํ๋จ
-
Storage Explorer ๊ฐ๋ฐ ๋๊ตฌ์์ blob ์ ๋ก๋ํ๋ ํ๋ฉด -
๋ก๋๋ csv ํ์ผ์ ๊ตฌ์กฐ
PartitionKey|RowKey|Timestamp|Date|Level|Logger|Message ---|---|---|---|---|---|---| BECA21F0-8B5E-4877-A18A-FD2A4B04322D|4DC0C4A6-893C-4246-AF80-B990EDD10C54|0.011269676|2016-09-10T04:29:50.828Z|stage5|CBComInsMemberGameInfoStages|9 6EDC9E0F-5E7E-4A04-B420-5F3091052CE7|819F7AC7-61E9-40C8-9904-B53B1008311E|0.011269676|2016-06-13T17:40:10.131Z|stage21|CBComInsMemberGameInfoStages|14 9F86454F-4E96-4CAD-A0AE-05DED005774F|766461D9-5FE6-4135-8FB3-15AACE24C4A8|0.011269676|2016-10-18T08:06:05.589Z|stage15|CBComInsMemberGameInfoStages|7 920E72B5-377C-4590-82D5-387ED86EF757|3AB215E0-AAE7-4E69-AF8B-825FADBAF756|0.011269676|2016-06-13T17:38:02.779Z|stage14|CBComInsMemberGameInfoStages|1 ์ผ๋ณ, ์ฝ 1๋ง๊ฑด ์ ๋์ ๋ฐ์ดํฐ๋ ํด๋ผ์ด์ธํธ์์ ๋ค์ด์จ ์คํ ์ด์ง ๋ฐ ํด๋ฆฌ์ด ์์ ์๊ฐ ์ ๋ณด๋ฅผ CloudBread ๋ก๊ทธ๋ก ์ ์ฌ
-
CloudBread์ Loggers๊ฐ CBComInsMemberGameInfoStages ํญ๋ชฉ๋ค์์ ๋ํด message์ ์์ ์๊ฐ(๋ถ)์ ์ฒ๋ฆฌ
-
Hive ์ฟผ๋ฆฌ๋ฅผ ์ํํ๊ธฐ ์ํด HDInsigt Cluster Manager ์ํ
-
Hive ์ฟผ๋ฆฌ ์ํ์ ์ค๋น
-
csvํ์ผ๋ค์ Hive์์ External Table๋ก load ์์ ์ํ
set hive.execution.engine=tez; DROP TABLE cloudbreadlog; CREATE EXTERNAL TABLE cloudbreadlog ( PartitionKey string, RowKey string, `Timestamp` string, `Date` string, Level string, Logger string, Message string ) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE LOCATION 'wasbs:///example/data/'; SELECT * FROM cloudbreadlog WHERE INPUT__FILE__NAME LIKE '%.csv' -- where Logger like 'CBComInsMemberGameInfoStages' -- AND INPUT__FILE__NAME LIKE '%.csv' --order by level asc;Hive ์ฟผ๋ฆฌ๋ฅผ ์ํ
-
Hive์ External Table๋ก ๋ก๋ ๋์๋์ง count ์ฒดํฌ
SELECT count(*) FROM cloudbreadlog; -
๋น ๋ฅธ ์ฒ๋ฆฌ๋ฅผ ์ํด Internal Table ORC(Optimized Row Columnar) ํ ์ด๋ธ๋ก ๋ก๋
set hive.execution.engine=tez; CREATE TABLE IF NOT EXISTS CloudBreadStageTime( PartitionKey string, RowKey string, `Timestamp` string, `Date` string, Level string, Logger string, Message string ) STORED AS ORC; INSERT OVERWRITE TABLE CloudBreadStageTime SELECT PartitionKey, RowKey, `Timestamp`, `Date`, Level, Logger, Message FROM cloudbreadlog; -
ORC ํ ์ด๋ธ์์ ์ต์ข ์กฐํ ์ฟผ๋ฆฌ ์ํ
select level, avg(cast(Message as int)) as stage_play_avg_min, sum(cast(Message as int)) as stage_play_sum_min from CloudBreadStageTime where Logger = 'CBComInsMemberGameInfoStages' group by level order by level asc; -
์ํ ๊ฒฐ๊ณผ๋ก stage๋ณ๋ก ์ํ๋ ํ๊ท ์๊ฐ๊ณผ ์ดํฉ ์๊ฐ์ ์กฐํ ๊ฐ๋ฅ ์ด๋ ๊ฒ Hive ์ฟผ๋ฆฌ ๊ฒฐ๊ณผ๋ฅผ ์ป์ ์ ์์
level stage_play_avg_min stage_play_sum_min stage0 7.032447466 22757 stage1 6.923216995 22812 stage10 6.990762125 24216 stage11 6.962710861 23527 stage12 6.99791294 23471 stage13 7.04329525 23426 stage14 7.060240964 24026 stage15 7.005102041 23341 stage16 6.991793313 23003 stage17 6.954984894 23021 stage18 7.089904421 23737 stage19 7.13037037 24065 stage2 7.110673135 23451 ... -
์ด Hadoop ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ Power BI๋ฅผ ์ด์ฉํด ์์ฌ์ด ์๊ฐํ ๋ฐ Web์ ๋ฐฐํฌ๊ฐ ๊ฐ๋ฅ(Power BI ๊ด๋ จ ๊ตฌ์ฑ์ 26๋ฒ ํญ๋ชฉ ์ฐธ์กฐ)
์ด ์ธ์๋ ๋ค์ํ CloudBread Hadoop ๋ถ์ ์๋๋ฆฌ์ค๋ฅผ ๋์ถ ๊ฐ๋ฅ
- ์ฃผ์ ์์ดํ ๋ค์ ์ฌ์ฉ๋ ๋ณํ ์ถ์ด(CBAddUseMemberItemController API์ฐธ์กฐ)
- ์ฌ์ฉ์์ ๊ฒฝํ์น ๋๋ Rank๋ฅผ ์ํ Point ์ ๋ณด ์ถ์ (CBComUdtMemberGameInfoesController API ์ฐธ์กฐ)
- ํ์ฌ ๊ฒ์ ๋ด์์ ์ค์ ๊ตฌ๋งค๋๋ ์ฃผ์ ์์ดํ ์ ์๋(CBAddMemberItemPurchaseController API ์ฐธ์กฐ)
๋ฑ์ ๋ค์ํ log๋ฅผ ํ์ฉํ ์๋๋ฆฌ์ค๋ฅผ CloudBread์ ์ ์ฅ์์ Hadoop - Big data ๋ถ์ ๊ฐ๋ฅ
###14. Elastic DB โ sharded parallel processing
๊ฒ์ ๋ฐ์ดํฐ์ ์ฆ๊ฐ์ ๋ฐ๋ผ ๋ฐ์ดํฐ๋ฅผ ์ํ์ ์ผ๋ก ๋ถ์ฐ ๊ฐ๋ฅํ๋๋ก sharding์ ๊ตฌํ
(Microsoft ๊ฐ๋ฐ ์ค์ด๋ผ ๊ฐ๋ฐ ๋ณด๋ฅ, Elastic Scale for Azure SQL Database)
CloudBread์ Admin-Web์ node.js ๊ธฐ๋ฐ์ด๊ธฐ ๋๋ฌธ์, node.js์์ Elastic DB์ ์ ๊ทผํ๊ธฐ ์ํ NPM package ๋ฑ์ด ์ถ๊ฐ๋ก ํ์ํจ

์ฐธ๊ณ ๋งํฌ : Get started with Elastic Database tools
###15. NoSQL sharded Table storage
๋ก๊ทธ๊ฐ ์ ์ฌ๋๋ NoSQL ํ
์ด๋ธ ์ ์ฅ์์ ๋ํด ๋ณ๋ ฌ, ์ํ์ ์ผ๋ก ๋ฐ์ดํฐ ์ ์ฌ/์กฐํ๊ฐ ๊ฐ๋ฅํ๋๋ก ๊ตฌํ
PaaS๋ก ์ ๊ณต๋๋ NoSQL Key/Value ์ ์ฅ์์ธ Table Storage๋ฅผ ํ์ฉํด ๋ณ๋ ฌ ๋ถ์ฐ ์ ์ฌ ์ํ
CloudBread๋ ๋ฐ์ดํฐ์ ์ํ์ ๋ถ์ฐ์ ์ํด Logicalํ ํ๋์ ํ ์ด๋ธ์ด๋ ๋ด๋ถ์ ์ผ๋ก PartitionKey๋ฅผ ์กฐ์ ํด ํด๋น Entity๋ฅผ ๋ฌผ๋ฆฌ์ ์ผ๋ก ๋ค๋ฅธ ํ๋์จ์ด์ Storage์ ์ ์ฅํ๋ ๊ตฌ์กฐ๋ก ์ฒ๋ฆฌ
###16. redis cluster service
๊ฒ์ ๋ฐ์ดํฐ์ ๋ํด In-Memory ๊ธฐ๋ฐ Key/Value NoSQL ์ ์ฅ์์ธ redis ์บ์ ์๋น์ค์ ์์ ์ฑ๊ณผ ์ฑ๋ฅ์ ์ํ ํด๋ฌ์คํฐ ๊ธฐ๋ฅ ๊ตฌํ ์ถ๊ฐ
CloudBread๋ redis cache๋ฅผ Ranking ์๋น์ค์ ๋ก๊ทธ ์ ์ฅ์๋ก ์ฌ์ฉ
CloudBread - CBRedis ์ฒ๋ฆฌ์์ redis ์ฒ๋ฆฌ๊ฐ ์ด๋ฃจ์ด์ง.
public static bool SetSortedSetRank(string sid, double point)
{
ConnectionMultiplexer connection = ConnectionMultiplexer.Connect(redisConnectionStringRank);
try
{
IDatabase cache = connection.GetDatabase(1);
cache.SortedSetAdd(globalVal.CloudBreadRankSortedSet, sid, point);
}
catch (Exception)
{
throw;
}
return true;
}
Redis ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ค์ ์ด์ฉํด API front-end์์ ์ฒ๋ฆฌ๊ฐ ์งํ๋๊ณ , CBRankController ์์ ๋ญํน(๋ฆฌ๋๋ณด๋) API์ ๋ํด ์๋ต ์ฒ๋ฆฌ ์ํ
CloudBread์์ ์ด๋ฐ redis ์ฒ๋ฆฌ์ ์์ ์ฑ์ ์ํด Clustering ๊ธฐ๋ฅ์ ๊ธฐ๋ณธ ์ ์ฉํ์ผ๋ฉฐ, ๊ธฐ๋ณธ Cluster์ redis๋ก CloudBread์ config ํ์ผ์ ๊ตฌ์ฑ ํ ์ ๊ทผํ๋ฉด ์ถ๊ฐ ์์
์์ด ์์ API๋ค์ ๋ชจ๋ ํ์ฉ ๊ฐ๋ฅํ๊ณ , ์ต๋ 10๊ฐ์ Redis shard๋ฅผ ๊ตฌ์ฑ ๊ฐ๋ฅ
###17. NoSQL Table Storageโto- Hadoop
NoSQL์ ์ ์ฌ๋ ๋ฐ์ดํฐ๋ฅผ Big data ๋ถ์์ ์ํด Hadoop์ผ๋ก ์ ์ฌํ๋ ๊ธฐ๋ฅ ๊ตฌํ
(๊ฒ์ ๋ฐ์ดํฐ์ ์ฑ๊ฒฉ์ ๋ฐ๋ผ ๋ฌ๋ผ์ง.)
13๋ฒ ๋ก๊ทธ๋ถ์ - Big data / Hadoop ์์ Table ์ ์ฅ์์ ๋ก๊ทธ ๋ถ์์ Hadoop์ผ๋ก ์ํํ๋ ๊ณผ์ ์ ์ด๋ฏธ ์งํ
###18. Stream Analytics API ์ค์๊ฐ Machine Learning ๋ถ์ ๊ธฐ๋ฒ์ ์ํด API๋ฅผ ๊ตฌํ / Machine Learning API์ ํต์ ํ๊ธฐ ์ํ ํ๊ฒฝ ๊ตฌ์ฑ (CloudBread ์์ Stream Analytics ๋ฅผ ํตํ์ง ์๊ณ ์ฆ์ ๋น๋๊ธฐ๋ก Machine Learning API๋ฅผ ํธ์ถ ๊ฐ๋ฅํ๋๋ก ๊ตฌ์ฑ)
์ต์ด Machine Learning์ ํธ์ถํ๊ธฐ ์ํด ๊ฐ์ด๋ ๋๋ ๋ฐฉ์์ผ๋ก, ๊ธฐ์กด R์์ ์ ๊ณตํ๋ ์ฌ๋ฌ Machine Learning ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ค์ ํ์ฉํด ๊ตฌ์ถํ๋ ๋ฐฉ์์ ๋ํด CloudBread ontributor ํ๋ด๋ถ์์ ํ์ ์งํ.
์ต์ ์ real-time Machine Learning ์์ธก ๋ถ์ ๋ฐฉ์์ ํ์ ์ค์ Azure Machine Learning์ผ๋ก ์์ธก ๋ถ์ ํ๋ซํผ ์ ํ
์์ธก ๋ชจ๋ธ(Predictive Model)์ ํด๋ผ์ฐ๋ PaaS ๊ธฐ๋ฐ์ผ๋ก ๋ ธ์ถ, ์์ฝ๊ฒ API ํํ๋ก ์ฌ์ฉ ๊ฐ๋ฅํ ๋ฐฉ์์ ์ ๊ณต.
CloudBread์ Front-end App Service์์ ์ฆ๊ฐ์ ์ผ๋ก Machine Learning์ผ๋ก์ Predict API ํธ์ถ์ด ๊ฐ๋ฅํ๊ณ , Stream Analytics๋ ์ค์๊ฐ ๋ผ์ด๋ธ ์คํธํ ๋ฐ์ดํฐ๋ด์ Fraud Detection ๋ถ์์์๋ง ํ์ฉ.
Stream Analytics API ๋ฐ ๋ถ์ ์ ์ฉ ๋ถ๋ถ์ ์๋ Fraud Detection ๋ถ์ ๊ธฐ๋ฅ ์๊ฐ์์ ํจ๊ป ์ํ
###19. Data Factory
Hadoop ์์ data pre-processing ๋ฐ automated data pipelining
์ ์ํ data factory ์๋น์ค ๊ตฌ์ถ(๊ฒ์ ๋ฐ์ดํฐ์ ์ฑ๊ฒฉ์ ๋ฐ๋ผ ๋ค๋ฅด๋ฉฐ, ํ์์ฑ์ด ๋ฎ์)
big data ๋ถ์์์ ETL ๋๊ตฌ๋ก ์ฌ์ฉ๋๋ฉฐ, CloudBread์ ๊ฒฝ์ฐ log ๋ถ์์ ํ์ํ Hadoop์ธ HDInsight๋ฅผ Data Factory ๋ด์์ ์๋์ผ๋ก provision/batch์ํ/๊ฒฐ๊ณผ๋ฅผ ๋ค์ ETL์ ์ฌ๋ ค ์ํ ๊ณผ์ ์ ํ์ฉ ์์ .
###20. Machine Learning algorithm Machine Learning์์ ๋ฐ์ดํฐ๋ฅผ ํ์ฉํด ์์ธก ๋ถ์ ์๋น์ค๊ฐ ๊ฐ๋ฅํ๋๋ก ํ์ต์ํค๊ธฐ ์ํ ์๊ณ ๋ฆฌ๋ฌ ๋ฐ Machine Learning workflow ๋ฅผ ๊ตฌํ
์์ ๋ชจ๋ธ์ ๋ชจ๋ CloudBread ํ์ด ๊ณต๊ฐํ CloudBread Machine Learning์ ์์ธก ๋ถ์ ๋ชจ๋ธ
**์์ธก ๋ถ์ ๋ชฉํ ์ ์ : **
์์ ๊ณต๊ฐํ ๋ถ์๋ชจ๋ธ์ ํ์ฉํด ์์ธก๋ชจ๋ธ(Predict model)์ ๊ตฌ์ถํ๊ณ CloudBread์ API๋ฅผ ํตํด ์ค์๊ฐ ์์ธก์ ์ํํ๋ ๊ฒ์ด ๋ชฉํ.
-
CloudBread Machine Learning ๋ชจ๋ธ์ ์์ฑํ๊ฑฐ๋, ์์ gallery์์ ๋ณต์
-
๋ชจ๋ธ์ ์คํํ๊ณ , ์ํ๋ ์์ธก ๊ฒฐ๊ณผ ํ์ธ
-
Predictive model๋ก ์์ฑ ํ API Web Service๋ก ๋ฐฐํฌ
-
์์ฑ๋ Web service์ API Key๋ฅผ ์ด์ฉํด CloudBread์์ real-time predict ์ํ
public class UserChurnController : ApiController { // POST api/UserChurn public HttpResponseMessage POST(CBChurn p) { // Machine Learning ๋ถ์ ์์ฒญ InvokeRequestResponseService(p).Wait(); ... } // Machine Learning Web Service ํธ์ถ static async Task InvokeRequestResponseService(CBChurn p) { ... const string apiKey = "APIํค-์์ "; // Replace this with the API key for the web service client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey); client.BaseAddress = new Uri("Machine-Learning-Web-Service-URL-์์ "); HttpResponseMessage response = await client.PostAsJsonAsync("", scoreRequest).ConfigureAwait(false); if (response.IsSuccessStatusCode) { string result = await response.Content.ReadAsStringAsync(); Debug.WriteLine("Result: {0}", result); p.ChurnYN = result; } ... } } -
Machine Learning API Controller๋ฅผ publish ํ๊ณ , Postman์์ ํ ์คํธ ์ํํด real-time prediction ์ํ
-
Batch ์์ ์ ์ํํ๊ธฐ ์ํด์ Machine Learning Batch execution์ด ์ ๊ณตํ๋ ์ฝ๋ ์ด์ฉ์ด ๊ฐ๋ฅ.
-
์ถ๊ฐ์ ์ผ๋ก, Functions๋ฅผ ์ด์ฉํด server-less๋ก batch ํธ์ถ ์ญ์ ๊ฐ๋ฅ
-
Excel์ ์ด์ฉํด Batch ๋ถ์๋ ๊ฐ๋ฅ
-
In-game์์ ๊ฒ์ด๋จธ์ ํจํด๊ณผ ํน์ฑ์ ์ทจํฉํด ํ์ต ์ํจ ํ ์ ์ ํ ์ ๋ฃ ์์ดํ ์ ์ถ์ฒํ๋ ์๋๋ฆฌ์ค ์ญ์ ๊ฒ์ ์๋น์ค์์ ๋งค์ฐ ์ค์ํ ๋งค์ถ๊ณผ ์ง๊ฒฐ๋๋ ์์ธก ๋ถ์์ด๋ฉฐ, ๊ด๋ จํด CloudBread๋ predict model๋ก in-game item suggestion์ ์ ๊ณต
Postman collection ๋ฐ CloudBread-Machine-Learning์์ค์ฝ๋ ์ฐธ์กฐ
###21. Big data - Business Intelligence ํ๋ซํผ
Hadoop์์ ๋ฐ์ดํฐ๋ฅผ visualize ์ํค๊ธฐ ์ํ Business Intelligence
์์ธํ Business Intelligence ๋ด์ฉ์ 26. Real-time Business Intelligence ํ๋ซํผ์์ ์ ๊ณต
###22. Big data - Business Intelligence ์น์ฌ์ดํธ
Hadoop ๋ฐ์ดํฐ ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ Web์ผ๋ก display ์ํค๊ธฐ ์ํ ์น์ฌ์ดํธ ๊ตฌ์ถ
์์ธํ Business Intelligence ๋ด์ฉ์ 26. Real-time Business Intelligence ํ๋ซํผ์์ ์ ๊ณต
###23. Stream analytics pre-processing API
์ค์๊ฐ ๋ถ์์ ์ํด F/E๋ก ์ ๊ทผํ๋ ๋ฐ์ดํฐ๋ฅผ stream ๋ถ์์ด ๊ฐ๋ฅํ ํ๋ซํผ์ ์ฌ๋ ค Stream Analytics๋ก ์ค์๊ฐ ๋ถ์ํ๊ธฐ ์ํด ๋ก๋ํ๋ API๋ฅผ ๊ตฌ์ฑํ๊ณ , aggregation์ ํตํด ์ค์๊ฐ ๋ถ์์ด ๊ฐ๋ฅํ ๋ฐ์ดํฐ๋ก pre-processing ์ํ
์์ธํ Stream Analytics ๊ด๋ จ ๋ด์ฉ์ ์๋ ###24. Stream analytics real-time analytics API ์ฐธ์กฐ
###24. Stream analytics real-time analytics API Stream Analytics์์ Fraud Detection์ด ๊ฐ๋ฅํ๋๋ก ๊ตฌ์ฑ
Fraud Detection ๋ถ์์ ์ํ Stream analytics ๋ชฉํ :
Stream Analytics์์ ์ค์๊ฐ์ผ๋ก purchase API์ 5์ด์ 5ํ ์ด์ ์ ์ํ๋ ์ด๋ทฐ์ง ์ฌ์ฉ์๋ฅผ ์ค์๊ฐ์ผ๋ก ๊ฒ์ถ ์ํ
- ์ผ๋ฐ์ ์ผ๋ก ์์ฒญํ๋ Normal-Device๋ฅผ simulateํ๋ ์ดํ๋ฆฌ์ผ์ด์ ์ํ
- 5์ด์ 30์ฌํ ์ด์ ์์ฒญํ๋ Fraud-Device๋ฅผ simulate ํ๋ ์ดํ๋ฆฌ์ผ์ด์ ์ํ
- Stream ๋ถ์์ SQL ์ฟผ๋ฆฌ์ ์ ์ฌํ ํจํด์ผ๋ก ์ฒ๋ฆฌ๋๋ฉฐ, CloudBread์์ ๋ค์ํ Absing์ ๊ฒ์ถ ๊ฐ๋ฅ
while (i <= 50)
{
int level = rand.Next(0, 100);
int points = rand.Next(0, 50);
int winnerYN = 0;
var telemetryDataPoint = new
{
deviceId = "cb2-fraud-device",
DateTime.Now,
level,
points,
winnerYN
//prediction
};
var messageString = JsonConvert.SerializeObject(telemetryDataPoint);
var message = new Message(Encoding.ASCII.GetBytes(messageString));
await deviceClient.SendEventAsync(message);
Console.WriteLine("{0} > Sending message: {1}", DateTime.Now, messageString);
Task.Delay(1).Wait(); // delay ์์ด ๋ฐ๋ก ๋ค์ loop ์ํํด fraud device ์๋ฎฌ๋ ์ด์
i++;
}
EventHub ์ชฝ์ผ๋ก ๋๊ฐ์ ๋๋ฐ์ด์ค๊ฐ ๋ฐ์ดํฐ๋ฅผ push ํ๋ ์๋ฎฌ๋ ์ด์ ์ํ
Stream Anlytics์์ input์ ํตํด stream data๋ฅผ ๊ฐ์ ธ์ ์ฒ๋ฆฌ
์๋์ Stream ์ฟผ๋ฆฌ๋ 5์ด ์ด๋ด์ 5ํ ์ด์ ์์ฒญ์ด ๋ค์ด์จ ๊ฒฝ์ฐ abusing์ผ๋ก ํ๋จํด, ์ด ๋ฐ์ดํฐ๋ฅผ fraudoutput blob ์ ์ฅ์๋ก ์ถ๋ ฅ ์ํ.
SELECT
*
INTO
output
FROM
input TIMESTAMP BY Now
SELECT
deviceid, System.TimeStamp AS Now,
COUNT(*) AS [Count]
INTO
fraudoutput
FROM
input TIMESTAMP BY Now
GROUP BY
deviceid,
TumblingWindow(second, 5)
HAVING
[Count] >= 5
Stream Analytics๋ฅผ ์คํํ๊ณ , fraud device๋ฅผ ์ํํ ํ, fraudoutput์ ํ์ธ
ํ์ํ ๊ฒฝ์ฐ ์ถ๊ฐ์ ์ธ event๋ฅผ ๋ฐ์ํ๊ฑฐ๋ web hook์ ๋ณด๋ด slack ๋ฑ์ผ๋ก ๋ฉ์ธ์ง๋ฅผ ๋ณด๋ด๋ ์ฒ๋ฆฌ๋ CloudBread์ ์ ์ฉ ์์
###25. Real-time Machine Learning workflow + API
Real-time ๋ถ์์ ์ํด Stream Analytics์ Machine Learning ์ ์ฐ๊ณํ๊ธฐ ์ํด API ์๋น๋ฅผ ์ํ function ๊ฐ๋ฐ
(CloudBread ์์ Stream Analytics ๋ฅผ ํตํ์ง ์๊ณ ์ฆ์ ๋น๋๊ธฐ๋ก Machine Learning API๋ฅผ ํธ์ถ ๊ฐ๋ฅํ๋๋ก ๊ตฌ์ฑ)
###26. Real-time Business Intelligence ํ๋ซํผ
๋ฐ์ดํฐ๋ฅผ visualize ์ํค๊ธฐ ์ํ Business Intelligence ํ๋ซํผ ์ ๊ณต
๊ฒ์๋ง๋ค ์๋ฒ์์ ํ์ํ property๋ entity๊ฐ ๋ค๋ฅด๊ธฐ ๋๋ฌธ์, ๋จ์ rank ์๋น์ค๊ฐ ํ์ํ ๊ฒฝ์ฐ์๋ item ๋ก์ง ๋ฑ์ ์๋ฒ์์ ๋ฐ๋ก ์ฌ์ฉํ ์ด์ ๋ ํ์๊ฐ ์์.
CloudBread๋ฅผ ์ด์ฉํ ๊ฒฝ์ฐ์๋ ๋ง์ฐฌ๊ฐ์ง๋ก, Business Intelligence๋ฅผ ์ํ ์๊ฐํ ์ญ์, ๊ฐ๋ณ property๊ฐ ์๋์ ๋ค๋ฅด๊ธฐ ๋๋ฌธ์ ๊ธฐ๋ณธ์ ์ธ ๋น๋ฉ ๋ธ๋ก์ CloudBread์์ ์ ์ํ๊ณ CloudBread๋ฅผ ์ด์ฉํ๋ ๊ฒ์์๋ฒ ๊ฐ๋ฐ์๊ฐ ์ด๋ฅผ ์ํ๋ ์๊ฐํ๋ก ๋ฐฐํฌ ํ๋ ๊ฒ์ ๋ชฉํ๋ก ์ํ
์ด๋ฅผ ์ํด Power BI๋ฅผ ์ด์ฉํด ์๊ฐํ ๋ชจ๋ธ์ ๋ง๋ค๊ณ , ์ด๋ฅผ ์น์์ ๋ถ์ํ๊ฑฐ๋ CloudBread ๊ด๋ฆฌ์ ํ์ด์ง์์ iframe ๋ฑ์ผ๋ก embedํด ๋ฐ์ดํฐ ๋ถ์์ ๋ชฉํ๋ก ๊ฐ๋ฐํจ.
-
Power BI Desktop์ ์ด์ฉํ ์๊ฐํ ๋์์ธ ์ํ
-

๊ฐ๋จํ Hadoop์์ Hive๋ก ์์ ํ ๊ฒฐ๊ณผ๋ฅผ ๋ก๋ํ๊ณ , ์๊ฐํ ๊ณผ์ ์ ํตํด Bar-chart๋ก ๊ตฌํ -
Power BI๋ฅผ Power BI ์๋น์ค๋ก ๋ฐฐํฌ
-

Power BI์ ๊ฒ์๋ ์ํ์ด๊ธฐ ๋๋ฌธ์ ํ์์ ์์ฌ์ด Report ๋ฅผ ๊ณต์ ํ๊ณ ํ์ ๊ฐ๋ฅ -
์์ฑํ Report๋ฅผ CloudBread์ Admin-Web ๋ฑ์ผ๋ก ๊ฒ์ํ๊ธฐ ์ํด embed ์ฝ๋ ์์ฑ
-

์ผ๋ฐ ์นํ์ด์ง์ ๊ฒ์ํ๋ ๊ณผ์ ์ ์ํํ๋ฉฐ, Link ๋ฐฉ์๊ณผ Embed ๋ฐฉ์ ๋ชจ๋ ์ ๊ณต -
์์ฑ๋ ๋ฆฌํฌํธ ๋ฐ์ดํฐ๋ฅผ Admin-Web ๋๋ ํ์ฌ์ดํธ ๋ฑ์ ๊ฒ์
-

CloudBread-Admin-Web ๊ด๋ฆฌ์ ํ์ด์ง ๋ฑ์ Interactive Report๋ก ์ฒจ๋ถ๊ฐ ๊ฐ๋ฅ
###27. Real-time Business Intelligence ์น์ฌ์ดํธ Real Time ๋ถ์ ๊ฒฐ๊ณผ๋ฅผ Web์ผ๋ก display ์ํค๊ธฐ ์ํ ์น์ฌ์ดํธ ๊ตฌ์ถ ๊ด๋ จ ๋ด์ฉ์ 26. Real-time Business Intelligence ํ๋ซํผ ์ฐธ์กฐ











