SlideShare uma empresa Scribd logo
1 de 109
Baixar para ler offline
.NET Conf
Learn. Imagine. Build.
.NET Conf
響應式程式開發之 .NET Core 應用
(Reactive Programming with .NET Core)
Blackie Tsai
.NET Conf
這場不會深入的討論如何把
Code 寫好寫滿
.NET Conf
主要是介紹
Reactive Programming
.NET Conf
並透過實際展示,認識
Reactive Programming
.NET Conf
Reactive Programming
是一種編碼風格
.NET Conf
讓我們用一種更合適的方式
撰寫某些情境的程式
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
介紹
Reactive Programming
展示
更多 Reactive
上手
Rx.NET
介紹
Reactive Extensions
.NET Conf
(https://blackie1019.github.io/)
.NET JAVASCRIPT
.NET Conf
什麼是
Reactive Programming?
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
int a = 2;
int b = 3;
int c = a + b;
Console. WriteLine("before: the value of c is {0}",c);
a=2;
b=7;
Console. WriteLine("after: the value of c is {0}",c);
以下程式結果為何?
.NET Conf
before: the value of c is 5
after: the value of c is 5
正常來說…
.NET Conf
before: the value of c is 5
after: the value of c is 9
但有時候我們期望能出現以下結果
.NET Conf
.NET Conf
.NET Conf
.NET Conf
Reactive Programming 是
學習如何與周遭事件進行非
同步開發
.NET Conf
Reactive Programming 是
學習將事件當作資料流
(Stream)進行操作
.NET Conf
.NET Conf
.NET Conf
當到此資料流結束
發生一個錯誤
某一個click event
時間
.NET Conf
Again, 什麼是
Reactive Programming?
.NET Conf
Console.Write("Press input A:");
var a = Convert.ToInt32(Console.ReadLine());
Console.Write("Press input B:");
var b = Convert.ToInt32(Console.ReadLine());
var c = a+b;
Console.WriteLine("before: the value of c is {0}",c);
Console.Write("Press input B again:");
b = Convert.ToInt32(Console.ReadLine());
c = a+b;
Console.WriteLine("after: the value of c is {0}",c);
Imperative programming
.NET Conf
while (true)
{
Console.Write("Press input A:");
var a = Convert.ToInt32(Console.ReadLine());
Console.Write("Press input B:");
var subscription = Observable
.FromAsync(() => Console.In.ReadLineAsync())
.Subscribe(b => Console.WriteLine("the value of c is
{0}",a+Convert.ToInt32(b)));
Console.Write("enter symbol (or x to exit): ");
…
}
Reactive programming
.NET Conf
為什麼要考慮使用Reactive
Programming?
.NET Conf
.NET Conf
https://www.reactivemanifesto.org/
Message Driven
透過非同步訊息溝通達到模組隔離
與委託處理
Responsive
系統在任何情況下,都能及時響應
Resilient
系統在異常時,具有容錯性
Elastic
系統能依據需求彈性拓展
.NET Conf
再繼續講主題前,讓我們離
題一下認識 Functional
Programming
.NET Conf
.NET Conf
.NET Conf
C# 範例
Building building = SomeQueryThatShouldReturnBuilding();
var phoneNumber = null;
// Object-Oriented Programming
if(building != null){
if(building.Manager.ContactInfo != null){
if(building.Manager.ContactInfo.PhoneNumber != null){
phoneNumber = building.Manager.ContactInfo.PhoneNumber;
}
}
}
// Functional Programming
phoneNumber = SomeQueryThatShouldReturnBuilding()
.With(b=>b.Manager)
.With(m=>m.ContactInfo)
.With(c=>c.PhoneNumber);
.NET Conf
[1, 4, 9].map(Math.sqrt).map(
function(x){
return x + 1
}
);
=> [2, 3, 4]
JavaScript 範例
.NET Conf
Object-Oriented Programming Functional Programming
程式開發抽象的核心 資料結構 函式
資料與操作的關係 緊耦合 鬆耦合
溝通方式 物件(Objects) 透過介面 函式(Functions)透過協定
是否有狀態 有狀態(Stateful) 無狀態(Stateless)
回應值是否透明、可預測 回應值由輸入與狀態確定 回應值總是由輸入確定
核心活動 通過向其添加新方法來組合新的物件對象和
擴展現有物件對象
撰寫更多新函式
.NET Conf
.NET Conf
• 我已經在使用aync與await做開發了,沒有必要採
用其他框架來達到異部處理的需求了
• 因為牽涉到開發架構與框架,一旦採用了就沒有回
頭路了
• 因為牽涉到開發架構與框架,一旦採用了就沒有回
頭路了
.NET Conf
介紹 Reactive Extensions
.NET Conf
http://reactivex.io/
.NET Conf
Rx 是結合
觀察器模式, 迭代器模式與函
數編程的函式庫、框架與開
發方式。
觀察器模式, 迭代器模式與函
數編程
.NET Conf
.NET Conf
.NET Conf
.NET Conf
RxJava
RxJS
Rx.NET
UniRx
RxScala
RxClojure
RxCpp
RxLua
Rx.rb
RxPY
RxGo
RxGroovy
RxJRuby
RxKotlin
RxSwift
RxPHP
reaxive
RxDart
RX for Xamarin(Rx.NET)
RxAndroid
RxCocoa
RxNetty
.NET Conf
.NET Conf
https://github.com/Reactive-Extensions/Rx.NET
PM> Install-Package System.Reactive
或
> dotnet add package System.Reactive --version 4.0.0-preview00001
.NET Conf
Lab_00 - Reactive Programming Example
Talk is cheap. Show me the code !
.NET Conf
Rx 是結合
觀察器模式, 迭代器模式與函
數編程的函式庫、框架與開
發方式。
Rx = Observables + LINQ + Schedulers
.NET Conf
大话设计模式之观察者模式
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
大话设计模式 - 迭代器模式之看芒果台還是央视nie?
.NET Conf
L IN Q
.NET Conf
.NET Conf
.NET Conf
Lab_01 – HelloWorld on Rx.NET
Talk is cheap. Show me the code!
.NET Conf
Rx.NET 核心觀念
.NET Conf
拉取(PULL)
.NET Conf
推播(PUSH)
.NET Conf
.NET Conf
.NET Conf
Rx.NET 主要資料結構
.NET Conf
.NET Conf
IObservable<string> subject = new [] { "Jordan", "Kobe", "James"}.ToObservable();
IObservable<string> subject = Observable.FromAsync (() =>
Console.In.ReadLineAsync ());
IObservable<int> subject = Observable.Range(5, 8);
IObservable<int> subject =
from i in Observable.Range(1, 100)
from j in Observable.Range(1, 100)
from k in Observable.Range(1, 100)
where k * k == i * i + j * j
select new { a = i, b = j, c = k };
IObservable<long> subject = Observable.Timer(TimeSpan.FromSeconds(3));
Subject
.NET Conf
// System.Runtime.dll
public interface IObservable<T>
{
IDisposable Subscribe(IObserver<T> observer);
}
IObservable
.NET Conf
// System.Runtime.dll
public interface IObserver<T>
{
void OnNext(T value);
void OnCompleted();
void OnError(Exception exception);
}
IObserver
.NET Conf
// System.Runtime.dll
public interface IDisposable
{
void Dispose();
}
IDisposable
.NET Conf
// System.Reactive.Interfaces.dll
public interface IScheduler
{
DateTimeOffset Now { get; }
IDisposable Schedule<TState>(TState state, Func<IScheduler, TState,
IDisposable> action);
IDisposable Schedule<TState>(TState state, TimeSpan dueTime,
Func<IScheduler, TState, IDisposable> action);
IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime,
Func<IScheduler, TState, IDisposable> action);
}
ISchedule
.NET Conf
Lab_02 - IObservable and IObserver with Rx.NET
Talk is cheap. Show me the code !
.NET Conf
Rx
Asynchronous
programming
model
Events
Delegates
Tasks
IEnumerable<T>
.NET Conf
Rx.NET 方法
.NET Conf
.NET Conf
.NET Conf
.NET Conf
Rx.NET 常見操作子
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
.NET Conf
http://rxmarbles.com/
.NET Conf
http://rxwiki.wikidot.com/101samples
.NET Conf
• Lab_03 - Advance with Rx
Talk is cheap. Show me the code !
.NET Conf
.NET Conf
.NET Conf
.NET Conf
Lab_04 - Stock Monitoring with Rx.NET
Lab_05 - MQTT with Rx.NET
Lab_06 - Xamarin with Rx.NET
Showcases
.NET Conf
https://reactiveui.net/
.NET Conf
https://github.com/Reactive-Extensions/RxJS
Draggable UI
Auto Completed
出處 :2017 iT 邦幫忙鐵人賽 : 30 天精通 RxJS
.NET Conf
“Do not forget nor dwell on the past, but do forgive it. Be aware
of the future but do no fear or worry about it. Focus on the
present moment, and that moment alone.”
.NET Conf
常見疑問
.NET Conf
或是
必定
函数式反应型编程(FRP) —— 实
时互动应用开发的新思路
.NET Conf
.NET Conf
.NET Conf
ReactiveX Official Site
Intro to Rx
Interactive diagrams of Rx Observables
Cloud-Scale Event Processing with the Reactive Extensions
(Rx) - Bart De Smet
The introduction to Reactive Programming you've been
missing
A Playful Introduction to Rx by Erik Meijer
.NET Conf
Rx.NET in Action: With examples in C#
.NET Design Patterns
Introduction to Rx: A step by step guide to the Reactive
Extensions to .NET
.NET Conf
fb.com/Study4.twfb.com/groups/216312591822635 Study4.TW
.NET Conf
.NET Conf

Mais conteúdo relacionado

Mais procurados

Ovs dpdk hwoffload way to full offload
Ovs dpdk hwoffload way to full offloadOvs dpdk hwoffload way to full offload
Ovs dpdk hwoffload way to full offloadKevin Traynor
 
YOW2021 Computing Performance
YOW2021 Computing PerformanceYOW2021 Computing Performance
YOW2021 Computing PerformanceBrendan Gregg
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)Brendan Gregg
 
Vivado hls勉強会1(基礎編)
Vivado hls勉強会1(基礎編)Vivado hls勉強会1(基礎編)
Vivado hls勉強会1(基礎編)marsee101
 
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...HostedbyConfluent
 
FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料一路 川染
 
Using eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster HealthUsing eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster HealthScyllaDB
 
關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事Chen-Tien Tsai
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 
YOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceYOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceBrendan Gregg
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel CrashdumpMarian Marinov
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in RustInfluxData
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedBrendan Gregg
 
Ops Meta-Metrics: The Currency You Pay For Change
Ops Meta-Metrics: The Currency You Pay For ChangeOps Meta-Metrics: The Currency You Pay For Change
Ops Meta-Metrics: The Currency You Pay For ChangeJohn Allspaw
 
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料Tetsuya Hasegawa
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux NetworkingPLUMgrid
 
scryptos onsite(plaid CTF)
scryptos onsite(plaid CTF)scryptos onsite(plaid CTF)
scryptos onsite(plaid CTF)RKX1209
 

Mais procurados (20)

Ovs dpdk hwoffload way to full offload
Ovs dpdk hwoffload way to full offloadOvs dpdk hwoffload way to full offload
Ovs dpdk hwoffload way to full offload
 
YOW2021 Computing Performance
YOW2021 Computing PerformanceYOW2021 Computing Performance
YOW2021 Computing Performance
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
 
Vivado hls勉強会1(基礎編)
Vivado hls勉強会1(基礎編)Vivado hls勉強会1(基礎編)
Vivado hls勉強会1(基礎編)
 
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...
Monitoring Kafka without instrumentation using eBPF with Antón Rodríguez | Ka...
 
FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料FPGA+SoC+Linux実践勉強会資料
FPGA+SoC+Linux実践勉強会資料
 
Using eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster HealthUsing eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster Health
 
關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事關於軟體工程師職涯的那些事
關於軟體工程師職涯的那些事
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
YOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceYOW2020 Linux Systems Performance
YOW2020 Linux Systems Performance
 
Pybind11 - SciPy 2021
Pybind11 - SciPy 2021Pybind11 - SciPy 2021
Pybind11 - SciPy 2021
 
Dpdk pmd
Dpdk pmdDpdk pmd
Dpdk pmd
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting Started
 
Ops Meta-Metrics: The Currency You Pay For Change
Ops Meta-Metrics: The Currency You Pay For ChangeOps Meta-Metrics: The Currency You Pay For Change
Ops Meta-Metrics: The Currency You Pay For Change
 
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
RFC6241(Network Configuration Protocol (NETCONF))の勉強資料
 
Gpu vs fpga
Gpu vs fpgaGpu vs fpga
Gpu vs fpga
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
scryptos onsite(plaid CTF)
scryptos onsite(plaid CTF)scryptos onsite(plaid CTF)
scryptos onsite(plaid CTF)
 

Semelhante a 響應式程式開發之 .NET Core 應用 

Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .netMarco Parenzan
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyAlexandre Morgaut
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav DukhinFwdays
 
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNextMicrosoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNextRodolfo Finochietti
 
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...Stefan Marr
 
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-FunctionsIntegration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-FunctionsBizTalk360
 
Ft10 de smet
Ft10 de smetFt10 de smet
Ft10 de smetnkaluva
 
Java session17
Java session17Java session17
Java session17Niit Care
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Bruce Johnson
 
Dynamic languages for .NET CLR
Dynamic languages for .NET CLRDynamic languages for .NET CLR
Dynamic languages for .NET CLRpy_sunil
 
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)Will Huang
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009nkaluva
 
Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsRobert MacLean
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Raffi Khatchadourian
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
 

Semelhante a 響應式程式開發之 .NET Core 應用  (20)

Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .net
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav Dukhin
 
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNextMicrosoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
 
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-FunctionsIntegration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
 
Ft10 de smet
Ft10 de smetFt10 de smet
Ft10 de smet
 
Java session17
Java session17Java session17
Java session17
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0
 
Dynamic languages for .NET CLR
Dynamic languages for .NET CLRDynamic languages for .NET CLR
Dynamic languages for .NET CLR
 
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
你不可不知的 ASP.NET Core 3 全新功能探索 (.NET Conf 2019)
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009
 
Async/Await Best Practices
Async/Await Best PracticesAsync/Await Best Practices
Async/Await Best Practices
 
Core .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 EnhancementsCore .NET Framework 4.0 Enhancements
Core .NET Framework 4.0 Enhancements
 
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
Towards Safe Automated Refactoring of Imperative Deep Learning Programs to Gr...
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 

Mais de Chen-Tien Tsai

Artifacts management with CI and CD
Artifacts management with CI and CDArtifacts management with CI and CD
Artifacts management with CI and CDChen-Tien Tsai
 
.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IVChen-Tien Tsai
 
.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part IIIChen-Tien Tsai
 
.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part IIChen-Tien Tsai
 
.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part IChen-Tien Tsai
 
.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - OverviewChen-Tien Tsai
 
Designing distributedsystems cht6
Designing distributedsystems cht6Designing distributedsystems cht6
Designing distributedsystems cht6Chen-Tien Tsai
 
Reactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET CoreReactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET CoreChen-Tien Tsai
 
The Cloud - What's different
The Cloud - What's differentThe Cloud - What's different
The Cloud - What's differentChen-Tien Tsai
 
How to be a professional speaker
How to be a professional speakerHow to be a professional speaker
How to be a professional speakerChen-Tien Tsai
 
Artifacts management with DevOps
Artifacts management with DevOpsArtifacts management with DevOps
Artifacts management with DevOpsChen-Tien Tsai
 
Web optimization with service woker
Web optimization with service wokerWeb optimization with service woker
Web optimization with service wokerChen-Tien Tsai
 
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCPGCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCPChen-Tien Tsai
 
.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCPChen-Tien Tsai
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance OptimizationChen-Tien Tsai
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactChen-Tien Tsai
 
Website Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequestWebsite Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequestChen-Tien Tsai
 
C# 2 to 5 short Introduction
C# 2 to 5 short IntroductionC# 2 to 5 short Introduction
C# 2 to 5 short IntroductionChen-Tien Tsai
 

Mais de Chen-Tien Tsai (20)

Artifacts management with CI and CD
Artifacts management with CI and CDArtifacts management with CI and CD
Artifacts management with CI and CD
 
.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV.NET Security Application/Web Development - Part IV
.NET Security Application/Web Development - Part IV
 
.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III.NET Security Application/Web Development - Part III
.NET Security Application/Web Development - Part III
 
.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II.NET Security Application/Web Development - Part II
.NET Security Application/Web Development - Part II
 
.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I.NET Security Application/Web Development - Part I
.NET Security Application/Web Development - Part I
 
.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview.NET Security Application/Web Development - Overview
.NET Security Application/Web Development - Overview
 
Designing distributedsystems cht6
Designing distributedsystems cht6Designing distributedsystems cht6
Designing distributedsystems cht6
 
Reactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET CoreReactive application with akka.NET & .NET Core
Reactive application with akka.NET & .NET Core
 
The Cloud - What's different
The Cloud - What's differentThe Cloud - What's different
The Cloud - What's different
 
How to be a professional speaker
How to be a professional speakerHow to be a professional speaker
How to be a professional speaker
 
Agile tutorial
Agile tutorialAgile tutorial
Agile tutorial
 
Artifacts management with DevOps
Artifacts management with DevOpsArtifacts management with DevOps
Artifacts management with DevOps
 
Web optimization with service woker
Web optimization with service wokerWeb optimization with service woker
Web optimization with service woker
 
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCPGCPUG.TW Meetup #25 - ASP.NET Core with GCP
GCPUG.TW Meetup #25 - ASP.NET Core with GCP
 
.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP.NET Study Group - ASP.NET Core with GCP
.NET Study Group - ASP.NET Core with GCP
 
Webpack and Web Performance Optimization
Webpack and Web Performance OptimizationWebpack and Web Performance Optimization
Webpack and Web Performance Optimization
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + react
 
Website Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequestWebsite Auto scraping with Autoit and .Net HttpRequest
Website Auto scraping with Autoit and .Net HttpRequest
 
C# 2 to 5 short Introduction
C# 2 to 5 short IntroductionC# 2 to 5 short Introduction
C# 2 to 5 short Introduction
 
Docker - fundamental
Docker  - fundamentalDocker  - fundamental
Docker - fundamental
 

Último

JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIIvo Andreev
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfTobias Schneck
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLAlluxio, Inc.
 
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze IncEnterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Incrobinwilliams8624
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxJoão Esperancinha
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmonyelliciumsolutionspun
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntelliSource Technologies
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Jaydeep Chhasatia
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfBrain Inventory
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeNeo4j
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptkinjal48
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageDista
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsJaydeep Chhasatia
 

Último (20)

JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AI
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
 
Enterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze IncEnterprise Document Management System - Qualityze Inc
Enterprise Document Management System - Qualityze Inc
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
Fields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptxFields in Java and Kotlin and what to expect.pptx
Fields in Java and Kotlin and what to expect.pptx
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine HarmonyLeveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
Leveraging DxSherpa's Generative AI Services to Unlock Human-Machine Harmony
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptx
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdf
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Webinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.pptWebinar_050417_LeClair12345666777889.ppt
Webinar_050417_LeClair12345666777889.ppt
 
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales CoverageSales Territory Management: A Definitive Guide to Expand Sales Coverage
Sales Territory Management: A Definitive Guide to Expand Sales Coverage
 
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software TeamsYour Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
Your Vision, Our Expertise: TECUNIQUE's Tailored Software Teams
 

響應式程式開發之 .NET Core 應用 

Notas do Editor

  1. Opening & Personal Introduction - 3 mins Reactive Programming Introduction - 8 mins Reactive Extensions Introduction – 9 mins .NET Core with Rx.NET - 10 mins Adv .NET Core with Rx.NET – 15 mins More Reactive - 2 mins Summary - 3 mins Others - 1 mins
  2. Gérard Philippe Berry 是法籍的電腦開學家,由他所提出的 Reactive Programming 是一種開發的編碼風格與架構,可以讓我們抱持與環境的互動,並將結果交由與其互動的環境來決定,而非程序本身。 這邊他也同時將所有程序按照其互動,分為了三種類型 Transformational program Interactive program Reactive program
  3. 給定的一組輸入並直接得到結果
  4. 以自己的速度與環境或其他程序互動
  5. 保持與環境的持續互動,但速度取決於環境而不是程序本身。
  6. 有獎徵答1
  7. http://blog.kitchenet.tn/what-is-reactive-programming/
  8. 響應式系統具備靈活性,鬆耦合和可擴展性。這使得它們更容易去開發、修改。而對 Error 與 Exception 有更大的容忍,並且當狀況發生時它們會更優雅地應對而不是讓直接系統崩潰。反應式系統有著高度的響應性,並會給用戶有效的交互反饋。 響應式系统是: Responsive 響應式(reacts to events at the speed of environment) 系統在任何情況下,都能及時響應,在可靠的時間內提供訊息且有穩定品質的服務。 Resilient 韌性、堅固, 具有容錯性(Fault-tolerant) 系統在失敗時,仍然保有 Responsive 特性。這是由 replication (複製), containment (容忍), isolation (隔離)以及 delegation (委託)的方式達成的。系統的任何組件發生問題時,可以隔離此部份,並獨立恢復,過程中不會影響整個系統。 Elastic 彈性(Easy Scale up/down and out) 即時量測效能,可透過演算法增加或減少服務的資源分配,滿足不同工作負載量的系統要求。 Message Driven 訊息驅動(modular, pipelined, asynchronous) 組件之間透過非同步訊息傳遞方式互相溝通,用以確保 loose coupling (鬆耦合), isolation (隔離), location transparency (與區域無關)的特性。還能提供錯誤訊息的委託處理機制。
  9. Anders Hejlsberg(安德斯·海爾斯伯格) 丹麥籍的開發教父,Pascal編譯器的主要開發人員,也是Delph與C#之父進入微軟公後,先後設計出了了Visual J ++,Net,C#和TypeScript。 可以說他開發出的軟體和發明的程式語言影響全世界程序員。目前,他是C#語言的首席架構師和TypeScript的核心開發者與TypeScript開源項目的重要領導人 functional Programming 允許開發者描述什麼是他們想要程序去做的,而不是強迫他們描述程序該如何去做
  10. 資料(data) 與操作(operations)
  11. The .NET Foundation is an independent organization, incorporated on March 31, 2014,[1] by Microsoft, to improve open-source software development and collaboration around the .NET Framework.[4] It was launched at the annual Build 2014 conference held by Microsoft.[5] 
  12. 結合觀察者模式(Observer Pattern), 迭代器模式(Iterator Pattern)與函數編程(Functional Programming)的函式庫、框架與開發方式。
  13. 依賴異步訊息傳遞去建立不同組件間的邊界,並以此確保鬆耦合、可隔離、位置透明和提供一種方式可將錯誤用訊息的方式委託至外部通知。 通過塑造和監視系統中的訊息佇列在必要時使用 Backpressure,顯式消息傳遞的使用可以實現負載管理、可擴展性和流程控制。 在通訊中使用位置透明的訊息傳遞使得管理集群和單個主機擁有相同的結構和語義 non-blocking 的通信允許接收者只在活動時消耗資源,可以減少系統的開銷。 Backpressure 指的是在 Buffer 有上限的系统中,Buffer 溢出的现象;它的应对措施只有一个:丢弃新事件。
  14. Package Manager Install-Package System.Reactive -Version 4.0.0-preview00001 .NET CLI dotnet add package System.Reactive --version 4.0.0-preview00001 System.Reactive.Core:  Is the heart of Rx and had extension methods for subscribing to subject. It has static class Observer to create observers. It also provides synchronization and scheduling services. System.Reactive.Interfaces: This provides the interfaces for for event pattern which subject can implement to raise events when data is available. It also has the scheduler interfaces and queriable interfaces for Rx schedulers and LINQ support. System.Reactive.Linq: This provides the famous static class Observable to create in-memory observable sequence. This extends the basic LINQ feature to Rx. System.Reactive.PlatformServices: This extends the basic scheduling services provided in System.Reactive.Core and will replace all the scheduling service in future. Dotnet Core Version: dotnet new console --framework netcoreapp2.0 dotnet add package System.Reactive --version 4.0.0-preview00001
  15. 展示A+B的範例
  16. 結合觀察者模式(Observer Pattern), 迭代器模式(Iterator Pattern)與函數編程(Functional Programming)的函式庫、框架與開發方式。
  17. 想知道一周發生什麼無腦新聞,看狂新聞就好了
  18. 有獎徵答2 有人發現這幅圖真正的意思嗎?=>少雞8
  19. 展示 - Array - Linq With Subscribling
  20. MyObserver MyObserver with Lambda MyObserver with Lambda and NewThread MyObservable EvenNumbers EvenNumbers by Rx.NET Example Odd and Even Numbers by Rx.NET Example
  21. Asynchronous programming model Events Delegates Tasks IEnumerable<T>
  22. Rx.NET in Action Demo Basic Delay Throttle Buffer Query Combine latest https://www.youtube.com/watch?v=DYEbUF4xs1Q
  23. Dalai Lama’s 18 Rules for Living” Expanded 不要忘記過去也不要留在過去,而是要放下。留意未來,但不要害怕也不要擔心。專注於現在的時刻,那一刻
  24. Others: