GithubHelp home page GithubHelp logo

mayuran1096 / streaming-training Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erhwenkuo/streaming-training

0.0 1.0 0.0 12.62 MB

串流計算概念與實作的training

License: Apache License 2.0

JavaScript 99.81% HTML 0.19%

streaming-training's Introduction

streaming-training

串流計算概念與實作的training

UI

01_BaseUI 建立前端UI與Http後台的雙向訊息傳輸

BaseUI主要想用Socket.io的web-socket的溝通手法來讓後台可以在事件發生的當下,即時以推送(Push)的手法通知前台UI來展現。這個案例想要帶領大家用簡單的手法來體會推(Push)與拉(Pull)兩種手法的融合不僅可以提升使用者的體驗,同時也讓工程師有360度的溝通手法來串連前台與後台。

01_architecture

02_ScaledUI 建立可Scale-out的後台服務

ScaledUI設計的目的就是展示如何擴展Socket.io的後台服務的專案。為了能夠讓多個Socket.io的nodes可以能夠透明暢通, 我們引進了Redis並透過Redis的PUB/SUB作為所有Socket.io的nodes的訊息管道。

02_architecture

03_ScaledUI 對後台的服務進行連線與負載的壓力測試

scaledUI透過Redis的擴展讓我們擁有可以根據負載來scale-out後台的Socket.io的服務。隨之而來問題就是每一個App的instance可以支撐多少的連線與負載量呢? 對於很多進入IT產業的工程師來說,能夠把使用者提出的功能需求順利完成就己經是氣喘噓噓了,壓力測試就上線後再慢慢調教吧! 03_ScaledUI就想要對ScaledUI的後台服務進行連線與負載的壓力測試,讓我們在簡單快速開發之時,也能夠對上線後接踵而來的Scale-out與Throughtput進行思考與調教。

03_architecture

04_ScaledUI 透過Reverse-Proxy來對後台的服務進行負載分散

了解每種服務的上限(天花板)對於提供穩定服務品質給使用者是重要的,及早了解自己服務的物理限制才能夠對症下藥進行改善。 我們透過了Redis的幫助,讓我們有機會平行擴展web服務的instances來服務更多使用者連線。然而每一個新加入的web服務都可能是不同ip或port,對於使用者而言要求連線到不同的ip與port來存取服務是很不方便也不親民。本專案將在03_ScaledUI為基礎下進行專業結構的調整以及使用Nginx來配置reverse-proxy來解決問題。

04_architecture

05_ChartedUI 即時的視覺化圖表的產出與推送

有一個快速處理資料計算後台與即時將有效資訊送達前後的資料頻道對於讓資料展現價值很重要,但是如果發揮資料的方式是要透過人來解讀與應用的話。資料/資訊的展示力就至關重要。 資料的可視化或視覺化一向是展示一家公司對於資訊應用的最佳進入點,因此選擇一個能夠充份表現資料的圖表元件並整合到資料處理的流程中就是05_ChartedUI

05_architecture

06_KafkaLinkeddUI

Apache Kafka 是開放原始碼的分散式訊息發佈與訂閱(Pub/Sub)系統, 它是現在許多串流資料的即時應用程式的核心骨幹。您可以將網站點擊流、金融交易和應用程式日誌之類的串流資料傳送到 Kafka 叢集,它會緩衝資料並將資料提供給建置在 Apache Spark Streaming、Apache Storm、Apache Samza 或 Kafka Streaming/KSQL等框架上的串流處理應用程式。

這個專案的建置主要是想透過Socket.io來串連Kafka來展示一個非同步的RPC呼叫以及即時的RPC結果回傳至前端UI的基本概念與架構。

architecture

streaming-training's People

Contributors

erhwenkuo 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.