SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Control	
  your	
  data	
  right	
  way	
  
TPL	
  Dataflow	
  
crash	
  course	
  
Mikhail	
  Veselov	
  
Moscow	
  
20	
  Апрель	
  2015	
  
2
History	
  overview	
  
§  TPL	
  Dataflow	
  is	
  another	
  abstracGon	
  level	
  
§  ReacGve	
  Extensions	
  &	
  Flow	
  sync	
  
§  TTB	
  Flow	
  Graph	
  analog	
  
§  AAL	
  à	
  CCR	
  à	
  TDF	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   IntroducGon	
  
20 Апрель 2015
Data	
  
AcGon	
  
Recycle	
  
Cache	
  
Thread	
  Pool	
  
Threads	
  
3
Main	
  idea	
  -­‐	
  why	
  Dataflow?	
  
§  Define	
  your	
  applicaGon	
  dataflow	
  
§  Async	
  I/O	
  and	
  CPU-­‐oriented	
  code,	
  high-­‐throughput	
  &	
  low-­‐latency	
  
§  Random,	
  unstructured	
  data	
  (compare	
  with	
  Parallel	
  and	
  PLINQ)	
  
§  Rx	
  IObservable<T>	
  support	
  
§  Easy	
  start:	
  ActionBlock<T>	
  &	
  BufferBlock<T>	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   IntroducGon	
  
20 Апрель 2015
FIFO queue Action
Example:	
  	
  
GZIP	
  compressing	
  simple	
  schema	
  
4
Interfaces	
  -­‐	
  IDataflowBlock	
  
public	
  interface	
  IDataflowBlock	
  
{	
  
	
  	
  	
  	
  void	
  Complete();	
  
	
  	
  	
  	
  void	
  Fault(Exception	
  error);	
  
	
  	
  	
  	
  Task	
  Completion	
  {	
  get;	
  }	
  
}	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
block.Completion.ContinueWith(t	
  =>	
  	
  
{	
  
	
  	
  	
  	
  if	
  (t.IsFaulted)	
  
	
  	
  	
  	
  	
  	
  	
  	
  ((IDataflowBlock)nextBlock).Fault(t.Exception);	
  
	
  	
  	
  	
  else	
  
	
  	
  	
  	
  	
  	
  	
  	
  nextBlock.Complete();	
  
});	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Fundamental	
  Interfaces	
  
20 Апрель 2015
§  IDataflowBlock	
  –	
  base	
  interface,	
  no	
  abstract	
  
implementaGon	
  
§  Task	
  CompleGon	
  staGc	
  methods:	
  
§  WhenAll	
  
§  ContinueWith	
  
§  AggregateException	
  with	
  previous	
  block’s	
  fault	
  
§  CancellationToken	
  
5
Interfaces	
  -­‐	
  ITargetBlock	
  
public	
  interface	
  ITargetBlock<in	
  TInput>	
  :	
  IDataflowBlock	
  
{	
  
	
  	
  	
  	
  DataflowMessageStatus	
  OfferMessage(	
  
	
  	
  	
  	
  	
  	
  	
  	
  DataflowMessageHeader	
  messageHeader,	
  TInput	
  messageValue,	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  ISourceBlock<TInput>	
  source,	
  bool	
  consumeToAccept);	
  
}	
  
	
  
§  DataflowMessageStatus:	
  
–  Accepted	
  –	
  OK,	
  I’ll	
  handle	
  it	
  
–  Declined	
  –	
  NO,	
  take	
  it	
  back	
  
–  Postponed	
  –	
  May	
  Be,	
  please,	
  call	
  back	
  later	
  J	
  
–  NotAvailable	
  –	
  Tried	
  to	
  consume	
  with	
  no	
  luck	
  
–  DecliningPermanently	
  –	
  No,	
  and	
  don’t	
  call	
  me	
  anymore	
  L	
  
§  bool	
  consumeToAccept:	
  
–  Call	
  ConsumeMessage	
  synchroniously	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Fundamental	
  Interfaces
20 Апрель 2015
6
Interfaces	
  -­‐	
  ISourceBlock	
  
public	
  interface	
  ISourceBlock<out	
  TOutput>	
  :	
  IDataflowBlock	
  
{	
  
	
  	
  	
  	
  IDisposable	
  LinkTo(ITargetBlock<TOutput>	
  target,	
  bool	
  unlinkAfterOne);	
  
	
  	
  
	
  	
  	
  	
  bool	
  ReserveMessage(	
  //	
  prepare	
  
	
  	
  	
  	
  	
  	
  	
  	
  DataflowMessageHeader	
  messageHeader,	
  ITargetBlock<TOutput>	
  target);	
  
	
  	
  	
  	
  TOutput	
  ConsumeMessage(	
  //	
  commit	
  
	
  	
  	
  	
  	
  	
  	
  	
  DataflowMessageHeader	
  messageHeader,	
  ITargetBlock<TOutput>	
  target,	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  out	
  bool	
  messageConsumed);	
  
	
  	
  	
  	
  void	
  ReleaseReservation(	
  //rollback	
  
	
  	
  	
  	
  	
  	
  	
  	
  DataflowMessageHeader	
  messageHeader,	
  ITargetBlock<TOutput>	
  target);	
  
}	
  
	
  
§  2-­‐phase	
  commit	
  protocol	
  (a.k.a.	
  transacGon)	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Fundamental	
  Interfaces
20 Апрель 2015
7
Advanced	
  Interfaces	
  
§  IPropagatorBlock<TInput,	
  TOutput>	
  
public	
  interface	
  IPropagatorBlock<in	
  TInput,	
  out	
  TOutput>	
  :	
  	
  
	
  	
  	
  	
  ITargetBlock<TInput>,	
  ISourceBlock<TOutput>	
  {	
  }	
  
§  1-­‐by-­‐1	
  linking	
  vs	
  1-­‐by-­‐n	
  linking	
  
§  IReceivableSourceBlock<TOutput>	
  
public	
  interface	
  IReceivableSourceBlock<TOutput>	
  :	
  
	
  ISourceBlock<TOutput>	
  
{	
  
	
  	
  	
  	
  bool	
  TryReceive(out	
  TOutput	
  item,	
  Predicate<TOutput>	
  filter);	
  
	
  	
  	
  	
  bool	
  TryReceiveAll(out	
  IList<TOutput>	
  items);	
  
}	
  
§  Easier	
  data	
  process	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Fundamental	
  Interfaces
20 Апрель 2015
8
Pure	
  Buffering	
  Blocks	
  
§  BufferBlock<T>	
  
–  FIFO	
  queue	
  
–  Producer/Consumer	
  
	
  
BufferBlock<FacebookDTO>	
  dataToProcess	
  =	
  new	
  BufferBlock<FacebookDTO>();	
  
	
  
dataToProcess.PostAsync(newVideo);	
  
dataToProcess.Post(newRepost);	
  
dataToProcess.SendAsync(newLike);	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
9
Pure	
  Buffering	
  Blocks	
  
§  BroadcastBlock<T>	
  
–  Current	
  overwrite	
  
–  No	
  receivers	
  –	
  drop	
  it	
  
	
  
var	
  bb	
  =	
  new	
  BroadcastBlock<ImageDTO>(i	
  =>	
  i);	
  
var	
  saveToDisk	
  =	
  new	
  ActionBlock<ImageDTO>(item	
  =>	
  
	
  	
  	
  	
  item.Image.Save(item.Path));	
  
	
  	
  
var	
  showInUi	
  =	
  new	
  ActionBlock<ImageDTO>(item	
  =>	
  
	
  	
  	
  	
  imagePanel.AddImage(item.Image),	
  	
  
	
  	
  	
  	
  new	
  DataflowBlockOptions	
  {	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  TaskScheduler	
  =	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  TaskScheduler.FromCurrentSynchronizationContext()	
  
	
  	
  	
  	
  });	
  
	
  	
  
bb.LinkTo(saveToDisk);	
  
bb.LinkTo(showInUi);	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
10
Pure	
  Buffering	
  Blocks	
  
§  WriteOnceBlock<T>	
  
–  Singleton	
  
writeOnce	
  =	
  new	
  WriteOnceBlock<Lazy<Task<T>>>(i	
  =>	
  i);	
  
writeOnce.Post(new	
  Lazy<Task<T>>(()	
  =>	
  Task.Run(amadeusConnectionFactory)));	
  
	
  
var	
  lazyValue	
  =	
  await	
  writeOnce.RecieveAsync();	
  
var	
  taskConnection	
  =	
  await	
  lazyValue.Value;	
  
var	
  connection	
  =	
  taskConnection.Result;	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
11
Executor	
  Blocks	
  
§  ActionBlock<TInput>	
  
var	
  chooser	
  =	
  new	
  ActionBlock<PostDTO>(post	
  =>	
  
{	
  
	
  	
  	
  	
  Process(post);	
  
});	
  
	
  
var	
  threeMessageAtOnce	
  =	
  new	
  DataflowBlockOptions	
  {	
  BoundedCapacity	
  =	
  3,	
  
	
  	
  	
  	
  TaskScheduler	
  =	
  TaskScheduler.Current	
  };	
  
var	
  threePerTask	
  =	
  new	
  DataflowBlockOptions	
  {	
  MaxMessagesPerTask	
  =	
  3	
  };	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
12
Executor	
  Blocks	
  
§  TransformBlock<TInput,	
  TOutput>	
  
–  Output	
  ordering-­‐safe	
  queue	
  
	
  
var	
  gzipper	
  =	
  new	
  TransformBlock<byte[],	
  Task<byte[]>>	
  
	
  	
  	
  	
  (b	
  =>	
  Task.Run(()	
  =>	
  Compress(b));	
  
var	
  RSAEncryptor	
  =	
  new	
  TransformBlock<byte[],	
  byte[]>(z	
  =>	
  RSA(z));	
  
	
  
gzipper.LinkTo(RSAEncryptor);	
  	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
13
Executor	
  Blocks	
  
§  TransformManyBlock<TInput,	
  TOutput>	
  
–  Produce	
  zero	
  or	
  more	
  items	
  per	
  1	
  input	
  message	
  
–  Output	
  can	
  be	
  a	
  Task	
  
	
  
//	
  .SelectMany()	
  analog	
  
var	
  tagCloudAggregator	
  =	
  new	
  TransformManyBlock<TagFromPost[],	
  TagFromPost>	
  
	
  	
  	
  	
  (arrayOfTags	
  =>	
  arrayOfTags);	
  
var	
  filteringTags	
  =	
  return	
  new	
  TransformManyBlock<T,	
  T>(async	
  tag	
  =>	
  
	
  	
  	
  	
  await	
  filter(tag)	
  ?	
  new	
  []	
  {	
  tag	
  }	
  :	
  Enumerable.Empty<T>());	
  
tagCloudAggregator.LinkTo(filteringTags);	
  
	
  
//	
  provide	
  info	
  to	
  UI	
  
filteringTags.TryRecieveAll(out	
  tagDataSource);	
  
tagCloudControl.Show(tagDataSource);	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
14
Executor	
  Blocks	
  
§  NullTarget<TInput>	
  
Recycle	
  bin	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
15
Joining	
  Blocks	
  
§  BatchBlock<T>	
  
–  accumulate	
  and	
  run	
  
	
  
var	
  batch	
  =	
  new	
  BatchBlock<T>(batchSize:	
  Int32.MaxValue);	
  
new	
  Timer(delegate	
  {	
  batch.TriggerBatch();	
  }).Change(1000,	
  1000);	
  
	
  
var	
  batch	
  =	
  new	
  BatchBlock<T>(batchSize:	
  100);	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
16
Joining	
  Blocks	
  
§  JoinBlock<T1,	
  T2,	
  …>	
  
–  make	
  a	
  Tuple	
  
–  StarvaGon	
  problem	
  
var	
  throttle	
  =	
  new	
  JoinBlock<SyntaxTree,	
  Request>();	
  
for	
  (int	
  i	
  =	
  0;	
  i	
  <	
  10;	
  ++i)	
  	
  
	
  	
  	
  	
  throttle.Target1.Post(new	
  SyntaxTree());	
  	
  
var	
  processor	
  =	
  	
  
	
  	
  	
  	
  new	
  TransformBlock<Tuple<SyntaxTree,	
  Request>,	
  SyntaxTree>	
  
	
  	
  	
  	
  (pair	
  =>	
  
	
  	
  	
  	
  	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  var	
  request	
  =	
  pair.Item2;	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  var	
  resource	
  =	
  pair.Item1;	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  request.ProcessWith(resource);	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  return	
  resource;	
  
	
  	
  	
  	
  	
  	
  	
  	
  });	
  
throttle.LinkTo(processor);	
  
processor.LinkTo(throttle.Target1);	
  	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
17
Joining	
  Blocks	
  
§  BatchedJoinBlock<T1,	
  T2,…>	
  
–  accumulate	
  a	
  Tuples	
  and	
  run	
  
	
  
	
  
try	
  {	
  
	
  	
  	
  	
  batchedJoin.Target1.Post(DoWork());	
  
	
  	
  	
  	
  batchedJoin.Target2.Post(default(T2));	
  
}	
  
Catch	
  (Exception	
  e)	
  {	
  
	
  	
  	
  	
  batchJoin.Target2.Post(e);	
  
	
  	
  	
  	
  batchJoin.Target1.Post(default(T1));	
  
}	
  
	
  
//	
  Item1	
  –	
  results	
  from	
  Target1	
  
//	
  Item2	
  –	
  results	
  from	
  Target12	
  
await	
  batchedJoin.RecieveAsync();	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Built-­‐in	
  Dataflow	
  Blocks
20 Апрель 2015
18
ConfiguraKon	
  OpKons	
  –	
  TPL	
  support	
  
§  TaskScheduler	
  	
  &	
  SynchronizationContext	
  
–  TaskScheduler.Default	
  is	
  default	
  
–  TaskScheduler.Current	
  is	
  not	
  a	
  default	
  
–  ConcurrentExclusiveSchedulerPair	
  
§  MaxDegreeOfParallelism	
  
–  ExecuGonDataflowBlockOpGons	
  
–  All	
  operaGons	
  are	
  not	
  concurrent	
  by	
  default	
  
§  CancellationToken	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Advanced topics
20 Апрель 2015
19
ConfiguraKon	
  OpKons	
  –	
  load	
  balancing	
  
§  MaxMessagesPerTask	
  
–  Blocks	
  try	
  to	
  minimize	
  number	
  of	
  Tasks	
  
§  MaxNumberOfGroups	
  
–  Grouping	
  blocks	
  autocomplete	
  
§  Greedy	
  
–  How	
  to	
  create	
  batches	
  and	
  join	
  
§  BoundedCapacity	
  
–  load	
  balancing	
  –	
  queue	
  size	
  	
  
	
  
var	
  taskSchedulerPair	
  =	
  new	
  ConcurrentExclusiveSchedulerPair();	
  
var	
  readerActions	
  =	
  from	
  checkBox	
  in	
  new[]	
  {	
  checkBox1,	
  checkBox2,	
  checkBox3	
  }	
  
	
  	
  	
  	
  select	
  new	
  ActionBlock<int>(milliseconds	
  =>	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  toggleCheckBox.Post(checkBox);	
  
	
  	
  	
  	
  	
  	
  	
  	
  Thread.Sleep(milliseconds);	
  
	
  	
  	
  	
  	
  	
  	
  	
  toggleCheckBox.Post(checkBox);	
  
	
  	
  	
  	
  );},	
  new	
  ExecutionDataflowBlockOptions	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  TaskScheduler	
  =	
  taskSchedulerPair.ConcurrentScheduler	
  });	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Advanced topics
20 Апрель 2015
20
StaKc	
  extension	
  methods	
  –	
  data	
  process	
  
§  Choose	
  
–  MulGple	
  sources	
  for	
  an	
  acGon	
  
–  There	
  will	
  be	
  only	
  one	
  message	
  processed	
  
§  OutputAvailableAsync	
  
–  Analog	
  of	
  Stack.Peek	
  operaGon	
  
§  Post/SendAsync	
  
–  Always	
  async	
  data	
  propagaGon	
  
–  You	
  can	
  postpone	
  the	
  message	
  with	
  	
  SendAsync	
  ,	
  not	
  with	
  Post	
  
§  Receive(Async)	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Advanced topics
20 Апрель 2015
21
StaKc	
  extension	
  methods	
  –	
  outer	
  API	
  
§  Encapsulate	
  (propagator	
  block	
  factory	
  method)	
  
§  LinkTo	
  
–  Filter	
  the	
  message	
  propagaGon	
  
–  Link	
  opGons	
  	
  
–  Do	
  not	
  confuse	
  with	
  ISourceBlock<T>	
  method	
  
§  AsObsevable(er)	
  
–  Rx	
  extension	
  support,	
  no	
  holy	
  war	
  here	
  	
  
	
  
new	
  DataflowLinkOptions	
  
{	
  
	
  	
  	
  	
  MaxMessages	
  =	
  1,	
  
	
  	
  	
  	
  Append	
  =	
  false,	
  
	
  	
  	
  	
  PropagateCompletion	
  =	
  true	
  
}	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Advanced topics
20 Апрель 2015
22
Deep	
  inside	
  
§  Implement	
  your	
  own	
  block	
  
§  Advanced	
  debug	
  info	
  with	
  DebuggerDisplayAttribute	
  	
  
§  Chapter	
  #4	
  in	
  Concurrency	
  in	
  C#	
  Cookbook	
  
by	
  Stephen	
  Cleary	
  
TPL	
  Dataflow	
  –	
  crash	
  course	
   Advanced topics
20 Апрель 2015
23
Gains When to useLosses
TPL	
  Dataflow	
  –	
  crash	
  course	
   Ending
20 Апрель 2015
Gathering	
  it	
  up	
  
§  Thread	
  Safety	
  
§  Structured	
  dataflow	
  
§  Async	
  TPL-­‐oriented	
  
§  Rx-­‐Extension	
  support	
  
§  CCR-­‐oriented	
  code	
  
easy	
  migraGon	
  
§  Another	
  abstracGon	
  
layer	
  
§  Hard	
  debug	
  when	
  
dataflow	
  is	
  complicated	
  
§  Too	
  many	
  generics	
  
§  You	
  have	
  a	
  random	
  data	
  
which	
  must	
  be	
  ordered	
  
§  CPU	
  and	
  I/O	
  operaGons	
  
§  You	
  can	
  parallelize	
  work	
  
Your
QR Code
I am at your disposal in case
of any questions or doubts
20 Апрель 2015
Mikhail Veselov
Moscow
MVeselov@luxoft.com
+7 911 951 42 98

Contenu connexe

Tendances

K. Tzoumas & S. Ewen – Flink Forward Keynote
K. Tzoumas & S. Ewen – Flink Forward KeynoteK. Tzoumas & S. Ewen – Flink Forward Keynote
K. Tzoumas & S. Ewen – Flink Forward KeynoteFlink Forward
 
Apache Flink Deep Dive
Apache Flink Deep DiveApache Flink Deep Dive
Apache Flink Deep DiveVasia Kalavri
 
Flink 0.10 @ Bay Area Meetup (October 2015)
Flink 0.10 @ Bay Area Meetup (October 2015)Flink 0.10 @ Bay Area Meetup (October 2015)
Flink 0.10 @ Bay Area Meetup (October 2015)Stephan Ewen
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupStephan Ewen
 
Debunking Common Myths in Stream Processing
Debunking Common Myths in Stream ProcessingDebunking Common Myths in Stream Processing
Debunking Common Myths in Stream ProcessingKostas Tzoumas
 
Anwar Rizal – Streaming & Parallel Decision Tree in Flink
Anwar Rizal – Streaming & Parallel Decision Tree in FlinkAnwar Rizal – Streaming & Parallel Decision Tree in Flink
Anwar Rizal – Streaming & Parallel Decision Tree in FlinkFlink Forward
 
Flink Streaming Hadoop Summit San Jose
Flink Streaming Hadoop Summit San JoseFlink Streaming Hadoop Summit San Jose
Flink Streaming Hadoop Summit San JoseKostas Tzoumas
 
Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2Rajeev Rastogi (KRR)
 
Flink Batch Processing and Iterations
Flink Batch Processing and IterationsFlink Batch Processing and Iterations
Flink Batch Processing and IterationsSameer Wadkar
 
Vasia Kalavri – Training: Gelly School
Vasia Kalavri – Training: Gelly School Vasia Kalavri – Training: Gelly School
Vasia Kalavri – Training: Gelly School Flink Forward
 
Storm: The Real-Time Layer - GlueCon 2012
Storm: The Real-Time Layer  - GlueCon 2012Storm: The Real-Time Layer  - GlueCon 2012
Storm: The Real-Time Layer - GlueCon 2012Dan Lynn
 
A Deep Dive into Structured Streaming in Apache Spark
A Deep Dive into Structured Streaming in Apache Spark A Deep Dive into Structured Streaming in Apache Spark
A Deep Dive into Structured Streaming in Apache Spark Anyscale
 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016Frank Lyaruu
 
Continuous Processing with Apache Flink - Strata London 2016
Continuous Processing with Apache Flink - Strata London 2016Continuous Processing with Apache Flink - Strata London 2016
Continuous Processing with Apache Flink - Strata London 2016Stephan Ewen
 
Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)Brian Brazil
 
Virtual Flink Forward 2020: Cogynt: Flink without code - Samantha Chan, Aslam...
Virtual Flink Forward 2020: Cogynt: Flink without code - Samantha Chan, Aslam...Virtual Flink Forward 2020: Cogynt: Flink without code - Samantha Chan, Aslam...
Virtual Flink Forward 2020: Cogynt: Flink without code - Samantha Chan, Aslam...Flink Forward
 
Apache Flink Training: DataStream API Part 1 Basic
 Apache Flink Training: DataStream API Part 1 Basic Apache Flink Training: DataStream API Part 1 Basic
Apache Flink Training: DataStream API Part 1 BasicFlink Forward
 
Introduction to Twitter Storm
Introduction to Twitter StormIntroduction to Twitter Storm
Introduction to Twitter StormUwe Printz
 

Tendances (20)

K. Tzoumas & S. Ewen – Flink Forward Keynote
K. Tzoumas & S. Ewen – Flink Forward KeynoteK. Tzoumas & S. Ewen – Flink Forward Keynote
K. Tzoumas & S. Ewen – Flink Forward Keynote
 
Apache Flink Deep Dive
Apache Flink Deep DiveApache Flink Deep Dive
Apache Flink Deep Dive
 
Flink 0.10 @ Bay Area Meetup (October 2015)
Flink 0.10 @ Bay Area Meetup (October 2015)Flink 0.10 @ Bay Area Meetup (October 2015)
Flink 0.10 @ Bay Area Meetup (October 2015)
 
Apache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink MeetupApache Flink @ NYC Flink Meetup
Apache Flink @ NYC Flink Meetup
 
Debunking Common Myths in Stream Processing
Debunking Common Myths in Stream ProcessingDebunking Common Myths in Stream Processing
Debunking Common Myths in Stream Processing
 
06 u 2
06 u 206 u 2
06 u 2
 
Anwar Rizal – Streaming & Parallel Decision Tree in Flink
Anwar Rizal – Streaming & Parallel Decision Tree in FlinkAnwar Rizal – Streaming & Parallel Decision Tree in Flink
Anwar Rizal – Streaming & Parallel Decision Tree in Flink
 
Flink Streaming Hadoop Summit San Jose
Flink Streaming Hadoop Summit San JoseFlink Streaming Hadoop Summit San Jose
Flink Streaming Hadoop Summit San Jose
 
Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2
 
Flink Batch Processing and Iterations
Flink Batch Processing and IterationsFlink Batch Processing and Iterations
Flink Batch Processing and Iterations
 
Structured streaming in Spark
Structured streaming in SparkStructured streaming in Spark
Structured streaming in Spark
 
Vasia Kalavri – Training: Gelly School
Vasia Kalavri – Training: Gelly School Vasia Kalavri – Training: Gelly School
Vasia Kalavri – Training: Gelly School
 
Storm: The Real-Time Layer - GlueCon 2012
Storm: The Real-Time Layer  - GlueCon 2012Storm: The Real-Time Layer  - GlueCon 2012
Storm: The Real-Time Layer - GlueCon 2012
 
A Deep Dive into Structured Streaming in Apache Spark
A Deep Dive into Structured Streaming in Apache Spark A Deep Dive into Structured Streaming in Apache Spark
A Deep Dive into Structured Streaming in Apache Spark
 
The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016The Road To Reactive with RxJava JEEConf 2016
The Road To Reactive with RxJava JEEConf 2016
 
Continuous Processing with Apache Flink - Strata London 2016
Continuous Processing with Apache Flink - Strata London 2016Continuous Processing with Apache Flink - Strata London 2016
Continuous Processing with Apache Flink - Strata London 2016
 
Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)
 
Virtual Flink Forward 2020: Cogynt: Flink without code - Samantha Chan, Aslam...
Virtual Flink Forward 2020: Cogynt: Flink without code - Samantha Chan, Aslam...Virtual Flink Forward 2020: Cogynt: Flink without code - Samantha Chan, Aslam...
Virtual Flink Forward 2020: Cogynt: Flink without code - Samantha Chan, Aslam...
 
Apache Flink Training: DataStream API Part 1 Basic
 Apache Flink Training: DataStream API Part 1 Basic Apache Flink Training: DataStream API Part 1 Basic
Apache Flink Training: DataStream API Part 1 Basic
 
Introduction to Twitter Storm
Introduction to Twitter StormIntroduction to Twitter Storm
Introduction to Twitter Storm
 

Similaire à Control your data right way with TPL Dataflow

Kotlin coroutine - behind the scenes
Kotlin coroutine - behind the scenesKotlin coroutine - behind the scenes
Kotlin coroutine - behind the scenesAnh Vu
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel ProcessingRTigger
 
Changelog Stream Processing with Apache Flink
Changelog Stream Processing with Apache FlinkChangelog Stream Processing with Apache Flink
Changelog Stream Processing with Apache FlinkFlink Forward
 
Module 10: CDB Subscribers
Module 10: CDB SubscribersModule 10: CDB Subscribers
Module 10: CDB SubscribersTail-f Systems
 
La programmation concurrente par flux de données
La programmation concurrente par flux de donnéesLa programmation concurrente par flux de données
La programmation concurrente par flux de donnéesMicrosoft
 
Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014P. Taylor Goetz
 
Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache FlinkMaximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache FlinkFlink Forward
 
Python in the database
Python in the databasePython in the database
Python in the databasepybcn
 
Parallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflowParallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflowCodecamp Romania
 
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022HostedbyConfluent
 
Cooperative Task Execution for Apache Spark
Cooperative Task Execution for Apache SparkCooperative Task Execution for Apache Spark
Cooperative Task Execution for Apache SparkDatabricks
 
Kusto (Azure Data Explorer) Training for R&D - January 2019
Kusto (Azure Data Explorer) Training for R&D - January 2019 Kusto (Azure Data Explorer) Training for R&D - January 2019
Kusto (Azure Data Explorer) Training for R&D - January 2019 Tal Bar-Zvi
 
Deep Dive into Oracle ADF Transactions
Deep Dive into Oracle ADF TransactionsDeep Dive into Oracle ADF Transactions
Deep Dive into Oracle ADF TransactionsEugene Fedorenko
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесьDmitry Chuyko
 
20100712-OTcl Command -- Getting Started
20100712-OTcl Command -- Getting Started20100712-OTcl Command -- Getting Started
20100712-OTcl Command -- Getting StartedTeerawat Issariyakul
 
Generic Etl Monitor Review
Generic Etl Monitor ReviewGeneric Etl Monitor Review
Generic Etl Monitor Reviewrobny73
 
Jboss World 2011 Infinispan
Jboss World 2011 InfinispanJboss World 2011 Infinispan
Jboss World 2011 Infinispancbo_
 

Similaire à Control your data right way with TPL Dataflow (20)

IoT Best practices
 IoT Best practices IoT Best practices
IoT Best practices
 
Kotlin coroutine - behind the scenes
Kotlin coroutine - behind the scenesKotlin coroutine - behind the scenes
Kotlin coroutine - behind the scenes
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel Processing
 
Changelog Stream Processing with Apache Flink
Changelog Stream Processing with Apache FlinkChangelog Stream Processing with Apache Flink
Changelog Stream Processing with Apache Flink
 
Java Concurrency
Java ConcurrencyJava Concurrency
Java Concurrency
 
Module 10: CDB Subscribers
Module 10: CDB SubscribersModule 10: CDB Subscribers
Module 10: CDB Subscribers
 
La programmation concurrente par flux de données
La programmation concurrente par flux de donnéesLa programmation concurrente par flux de données
La programmation concurrente par flux de données
 
Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014Scaling Apache Storm - Strata + Hadoop World 2014
Scaling Apache Storm - Strata + Hadoop World 2014
 
Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache FlinkMaximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
 
Google cloud Dataflow & Apache Flink
Google cloud Dataflow & Apache FlinkGoogle cloud Dataflow & Apache Flink
Google cloud Dataflow & Apache Flink
 
Python in the database
Python in the databasePython in the database
Python in the database
 
Parallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflowParallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflow
 
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
 
Cooperative Task Execution for Apache Spark
Cooperative Task Execution for Apache SparkCooperative Task Execution for Apache Spark
Cooperative Task Execution for Apache Spark
 
Kusto (Azure Data Explorer) Training for R&D - January 2019
Kusto (Azure Data Explorer) Training for R&D - January 2019 Kusto (Azure Data Explorer) Training for R&D - January 2019
Kusto (Azure Data Explorer) Training for R&D - January 2019
 
Deep Dive into Oracle ADF Transactions
Deep Dive into Oracle ADF TransactionsDeep Dive into Oracle ADF Transactions
Deep Dive into Oracle ADF Transactions
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесь
 
20100712-OTcl Command -- Getting Started
20100712-OTcl Command -- Getting Started20100712-OTcl Command -- Getting Started
20100712-OTcl Command -- Getting Started
 
Generic Etl Monitor Review
Generic Etl Monitor ReviewGeneric Etl Monitor Review
Generic Etl Monitor Review
 
Jboss World 2011 Infinispan
Jboss World 2011 InfinispanJboss World 2011 Infinispan
Jboss World 2011 Infinispan
 

Plus de GoSharp

Живые приложения с Rx
Живые приложения с RxЖивые приложения с Rx
Живые приложения с RxGoSharp
 
Anemic Domain Model - антипаттерн или SOLID?
Anemic Domain Model - антипаттерн или SOLID?Anemic Domain Model - антипаттерн или SOLID?
Anemic Domain Model - антипаттерн или SOLID?GoSharp
 
Эволюция пользовательского интерфейса бизнес-приложений: от DOSa через окна в...
Эволюция пользовательского интерфейса бизнес-приложений: от DOSa через окна в...Эволюция пользовательского интерфейса бизнес-приложений: от DOSa через окна в...
Эволюция пользовательского интерфейса бизнес-приложений: от DOSa через окна в...GoSharp
 
UniversalApp "убийца" WPF или же это WPF+ ?
UniversalApp "убийца" WPF или же это WPF+ ?UniversalApp "убийца" WPF или же это WPF+ ?
UniversalApp "убийца" WPF или же это WPF+ ?GoSharp
 
UI тестирование WPF приложений в Дойче Банке
UI тестирование WPF приложений в Дойче БанкеUI тестирование WPF приложений в Дойче Банке
UI тестирование WPF приложений в Дойче БанкеGoSharp
 
Практика применения Enterprise Architect и T4-шаблонов для разработки системы...
Практика применения Enterprise Architect и T4-шаблонов для разработки системы...Практика применения Enterprise Architect и T4-шаблонов для разработки системы...
Практика применения Enterprise Architect и T4-шаблонов для разработки системы...GoSharp
 
За что не любить EF и чем его заменить
За что не любить EF и чем его заменитьЗа что не любить EF и чем его заменить
За что не любить EF и чем его заменитьGoSharp
 
MVVM в WinForms – DevExpress Way (теория и практика)
MVVM в WinForms – DevExpress Way (теория и практика)MVVM в WinForms – DevExpress Way (теория и практика)
MVVM в WinForms – DevExpress Way (теория и практика)GoSharp
 
Паттерны быстрой разработки WPF MVVM бизнес-приложений
Паттерны быстрой разработки WPF MVVM бизнес-приложенийПаттерны быстрой разработки WPF MVVM бизнес-приложений
Паттерны быстрой разработки WPF MVVM бизнес-приложенийGoSharp
 
Gosharp Intro
Gosharp IntroGosharp Intro
Gosharp IntroGoSharp
 
Проектирование сетевой инфраструктуры под SOA проекты ASP.NET
Проектирование сетевой инфраструктуры под SOA проекты ASP.NETПроектирование сетевой инфраструктуры под SOA проекты ASP.NET
Проектирование сетевой инфраструктуры под SOA проекты ASP.NETGoSharp
 
Мониторинг приложений ASP.NET на основе сервиса Application Insights
Мониторинг приложений ASP.NET на основе сервиса Application InsightsМониторинг приложений ASP.NET на основе сервиса Application Insights
Мониторинг приложений ASP.NET на основе сервиса Application InsightsGoSharp
 
Опыт разработки сложных клиент-серверных приложений на TypeScript и ASP.NET
Опыт разработки сложных клиент-серверных приложений на TypeScript и ASP.NETОпыт разработки сложных клиент-серверных приложений на TypeScript и ASP.NET
Опыт разработки сложных клиент-серверных приложений на TypeScript и ASP.NETGoSharp
 
ASP.NET Internals
ASP.NET InternalsASP.NET Internals
ASP.NET InternalsGoSharp
 
Кросплатформенная разработка на ASP.NET vNext
Кросплатформенная разработка на ASP.NET vNextКросплатформенная разработка на ASP.NET vNext
Кросплатформенная разработка на ASP.NET vNextGoSharp
 
Внедрение зависимостей в ASP.NET MVС и ASP.NET vNext
Внедрение зависимостей в ASP.NET MVС и ASP.NET vNextВнедрение зависимостей в ASP.NET MVС и ASP.NET vNext
Внедрение зависимостей в ASP.NET MVС и ASP.NET vNextGoSharp
 
Будущее ASP.NET
Будущее ASP.NETБудущее ASP.NET
Будущее ASP.NETGoSharp
 
Коучинг команд разработки и коучинговые инструменты в работе тимлида
Коучинг команд разработки и коучинговые инструменты в работе тимлидаКоучинг команд разработки и коучинговые инструменты в работе тимлида
Коучинг команд разработки и коучинговые инструменты в работе тимлидаGoSharp
 
Взаимное влияние Source Code Management и других средств организации разработки
Взаимное влияние Source Code Management и других средств организации разработкиВзаимное влияние Source Code Management и других средств организации разработки
Взаимное влияние Source Code Management и других средств организации разработкиGoSharp
 
DevOPS инструменты для .NET проектов
DevOPS инструменты для .NET проектовDevOPS инструменты для .NET проектов
DevOPS инструменты для .NET проектовGoSharp
 

Plus de GoSharp (20)

Живые приложения с Rx
Живые приложения с RxЖивые приложения с Rx
Живые приложения с Rx
 
Anemic Domain Model - антипаттерн или SOLID?
Anemic Domain Model - антипаттерн или SOLID?Anemic Domain Model - антипаттерн или SOLID?
Anemic Domain Model - антипаттерн или SOLID?
 
Эволюция пользовательского интерфейса бизнес-приложений: от DOSa через окна в...
Эволюция пользовательского интерфейса бизнес-приложений: от DOSa через окна в...Эволюция пользовательского интерфейса бизнес-приложений: от DOSa через окна в...
Эволюция пользовательского интерфейса бизнес-приложений: от DOSa через окна в...
 
UniversalApp "убийца" WPF или же это WPF+ ?
UniversalApp "убийца" WPF или же это WPF+ ?UniversalApp "убийца" WPF или же это WPF+ ?
UniversalApp "убийца" WPF или же это WPF+ ?
 
UI тестирование WPF приложений в Дойче Банке
UI тестирование WPF приложений в Дойче БанкеUI тестирование WPF приложений в Дойче Банке
UI тестирование WPF приложений в Дойче Банке
 
Практика применения Enterprise Architect и T4-шаблонов для разработки системы...
Практика применения Enterprise Architect и T4-шаблонов для разработки системы...Практика применения Enterprise Architect и T4-шаблонов для разработки системы...
Практика применения Enterprise Architect и T4-шаблонов для разработки системы...
 
За что не любить EF и чем его заменить
За что не любить EF и чем его заменитьЗа что не любить EF и чем его заменить
За что не любить EF и чем его заменить
 
MVVM в WinForms – DevExpress Way (теория и практика)
MVVM в WinForms – DevExpress Way (теория и практика)MVVM в WinForms – DevExpress Way (теория и практика)
MVVM в WinForms – DevExpress Way (теория и практика)
 
Паттерны быстрой разработки WPF MVVM бизнес-приложений
Паттерны быстрой разработки WPF MVVM бизнес-приложенийПаттерны быстрой разработки WPF MVVM бизнес-приложений
Паттерны быстрой разработки WPF MVVM бизнес-приложений
 
Gosharp Intro
Gosharp IntroGosharp Intro
Gosharp Intro
 
Проектирование сетевой инфраструктуры под SOA проекты ASP.NET
Проектирование сетевой инфраструктуры под SOA проекты ASP.NETПроектирование сетевой инфраструктуры под SOA проекты ASP.NET
Проектирование сетевой инфраструктуры под SOA проекты ASP.NET
 
Мониторинг приложений ASP.NET на основе сервиса Application Insights
Мониторинг приложений ASP.NET на основе сервиса Application InsightsМониторинг приложений ASP.NET на основе сервиса Application Insights
Мониторинг приложений ASP.NET на основе сервиса Application Insights
 
Опыт разработки сложных клиент-серверных приложений на TypeScript и ASP.NET
Опыт разработки сложных клиент-серверных приложений на TypeScript и ASP.NETОпыт разработки сложных клиент-серверных приложений на TypeScript и ASP.NET
Опыт разработки сложных клиент-серверных приложений на TypeScript и ASP.NET
 
ASP.NET Internals
ASP.NET InternalsASP.NET Internals
ASP.NET Internals
 
Кросплатформенная разработка на ASP.NET vNext
Кросплатформенная разработка на ASP.NET vNextКросплатформенная разработка на ASP.NET vNext
Кросплатформенная разработка на ASP.NET vNext
 
Внедрение зависимостей в ASP.NET MVС и ASP.NET vNext
Внедрение зависимостей в ASP.NET MVС и ASP.NET vNextВнедрение зависимостей в ASP.NET MVС и ASP.NET vNext
Внедрение зависимостей в ASP.NET MVС и ASP.NET vNext
 
Будущее ASP.NET
Будущее ASP.NETБудущее ASP.NET
Будущее ASP.NET
 
Коучинг команд разработки и коучинговые инструменты в работе тимлида
Коучинг команд разработки и коучинговые инструменты в работе тимлидаКоучинг команд разработки и коучинговые инструменты в работе тимлида
Коучинг команд разработки и коучинговые инструменты в работе тимлида
 
Взаимное влияние Source Code Management и других средств организации разработки
Взаимное влияние Source Code Management и других средств организации разработкиВзаимное влияние Source Code Management и других средств организации разработки
Взаимное влияние Source Code Management и других средств организации разработки
 
DevOPS инструменты для .NET проектов
DevOPS инструменты для .NET проектовDevOPS инструменты для .NET проектов
DevOPS инструменты для .NET проектов
 

Dernier

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Dernier (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Control your data right way with TPL Dataflow

  • 1. Control  your  data  right  way   TPL  Dataflow   crash  course   Mikhail  Veselov   Moscow   20  Апрель  2015  
  • 2. 2 History  overview   §  TPL  Dataflow  is  another  abstracGon  level   §  ReacGve  Extensions  &  Flow  sync   §  TTB  Flow  Graph  analog   §  AAL  à  CCR  à  TDF   TPL  Dataflow  –  crash  course   IntroducGon   20 Апрель 2015 Data   AcGon   Recycle   Cache   Thread  Pool   Threads  
  • 3. 3 Main  idea  -­‐  why  Dataflow?   §  Define  your  applicaGon  dataflow   §  Async  I/O  and  CPU-­‐oriented  code,  high-­‐throughput  &  low-­‐latency   §  Random,  unstructured  data  (compare  with  Parallel  and  PLINQ)   §  Rx  IObservable<T>  support   §  Easy  start:  ActionBlock<T>  &  BufferBlock<T>   TPL  Dataflow  –  crash  course   IntroducGon   20 Апрель 2015 FIFO queue Action Example:     GZIP  compressing  simple  schema  
  • 4. 4 Interfaces  -­‐  IDataflowBlock   public  interface  IDataflowBlock   {          void  Complete();          void  Fault(Exception  error);          Task  Completion  {  get;  }   }                   block.Completion.ContinueWith(t  =>     {          if  (t.IsFaulted)                  ((IDataflowBlock)nextBlock).Fault(t.Exception);          else                  nextBlock.Complete();   });   TPL  Dataflow  –  crash  course   Fundamental  Interfaces   20 Апрель 2015 §  IDataflowBlock  –  base  interface,  no  abstract   implementaGon   §  Task  CompleGon  staGc  methods:   §  WhenAll   §  ContinueWith   §  AggregateException  with  previous  block’s  fault   §  CancellationToken  
  • 5. 5 Interfaces  -­‐  ITargetBlock   public  interface  ITargetBlock<in  TInput>  :  IDataflowBlock   {          DataflowMessageStatus  OfferMessage(                  DataflowMessageHeader  messageHeader,  TInput  messageValue,                    ISourceBlock<TInput>  source,  bool  consumeToAccept);   }     §  DataflowMessageStatus:   –  Accepted  –  OK,  I’ll  handle  it   –  Declined  –  NO,  take  it  back   –  Postponed  –  May  Be,  please,  call  back  later  J   –  NotAvailable  –  Tried  to  consume  with  no  luck   –  DecliningPermanently  –  No,  and  don’t  call  me  anymore  L   §  bool  consumeToAccept:   –  Call  ConsumeMessage  synchroniously   TPL  Dataflow  –  crash  course   Fundamental  Interfaces 20 Апрель 2015
  • 6. 6 Interfaces  -­‐  ISourceBlock   public  interface  ISourceBlock<out  TOutput>  :  IDataflowBlock   {          IDisposable  LinkTo(ITargetBlock<TOutput>  target,  bool  unlinkAfterOne);              bool  ReserveMessage(  //  prepare                  DataflowMessageHeader  messageHeader,  ITargetBlock<TOutput>  target);          TOutput  ConsumeMessage(  //  commit                  DataflowMessageHeader  messageHeader,  ITargetBlock<TOutput>  target,                    out  bool  messageConsumed);          void  ReleaseReservation(  //rollback                  DataflowMessageHeader  messageHeader,  ITargetBlock<TOutput>  target);   }     §  2-­‐phase  commit  protocol  (a.k.a.  transacGon)   TPL  Dataflow  –  crash  course   Fundamental  Interfaces 20 Апрель 2015
  • 7. 7 Advanced  Interfaces   §  IPropagatorBlock<TInput,  TOutput>   public  interface  IPropagatorBlock<in  TInput,  out  TOutput>  :            ITargetBlock<TInput>,  ISourceBlock<TOutput>  {  }   §  1-­‐by-­‐1  linking  vs  1-­‐by-­‐n  linking   §  IReceivableSourceBlock<TOutput>   public  interface  IReceivableSourceBlock<TOutput>  :    ISourceBlock<TOutput>   {          bool  TryReceive(out  TOutput  item,  Predicate<TOutput>  filter);          bool  TryReceiveAll(out  IList<TOutput>  items);   }   §  Easier  data  process   TPL  Dataflow  –  crash  course   Fundamental  Interfaces 20 Апрель 2015
  • 8. 8 Pure  Buffering  Blocks   §  BufferBlock<T>   –  FIFO  queue   –  Producer/Consumer     BufferBlock<FacebookDTO>  dataToProcess  =  new  BufferBlock<FacebookDTO>();     dataToProcess.PostAsync(newVideo);   dataToProcess.Post(newRepost);   dataToProcess.SendAsync(newLike);   TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 9. 9 Pure  Buffering  Blocks   §  BroadcastBlock<T>   –  Current  overwrite   –  No  receivers  –  drop  it     var  bb  =  new  BroadcastBlock<ImageDTO>(i  =>  i);   var  saveToDisk  =  new  ActionBlock<ImageDTO>(item  =>          item.Image.Save(item.Path));       var  showInUi  =  new  ActionBlock<ImageDTO>(item  =>          imagePanel.AddImage(item.Image),            new  DataflowBlockOptions  {                        TaskScheduler  =                          TaskScheduler.FromCurrentSynchronizationContext()          });       bb.LinkTo(saveToDisk);   bb.LinkTo(showInUi);   TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 10. 10 Pure  Buffering  Blocks   §  WriteOnceBlock<T>   –  Singleton   writeOnce  =  new  WriteOnceBlock<Lazy<Task<T>>>(i  =>  i);   writeOnce.Post(new  Lazy<Task<T>>(()  =>  Task.Run(amadeusConnectionFactory)));     var  lazyValue  =  await  writeOnce.RecieveAsync();   var  taskConnection  =  await  lazyValue.Value;   var  connection  =  taskConnection.Result;   TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 11. 11 Executor  Blocks   §  ActionBlock<TInput>   var  chooser  =  new  ActionBlock<PostDTO>(post  =>   {          Process(post);   });     var  threeMessageAtOnce  =  new  DataflowBlockOptions  {  BoundedCapacity  =  3,          TaskScheduler  =  TaskScheduler.Current  };   var  threePerTask  =  new  DataflowBlockOptions  {  MaxMessagesPerTask  =  3  };   TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 12. 12 Executor  Blocks   §  TransformBlock<TInput,  TOutput>   –  Output  ordering-­‐safe  queue     var  gzipper  =  new  TransformBlock<byte[],  Task<byte[]>>          (b  =>  Task.Run(()  =>  Compress(b));   var  RSAEncryptor  =  new  TransformBlock<byte[],  byte[]>(z  =>  RSA(z));     gzipper.LinkTo(RSAEncryptor);     TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 13. 13 Executor  Blocks   §  TransformManyBlock<TInput,  TOutput>   –  Produce  zero  or  more  items  per  1  input  message   –  Output  can  be  a  Task     //  .SelectMany()  analog   var  tagCloudAggregator  =  new  TransformManyBlock<TagFromPost[],  TagFromPost>          (arrayOfTags  =>  arrayOfTags);   var  filteringTags  =  return  new  TransformManyBlock<T,  T>(async  tag  =>          await  filter(tag)  ?  new  []  {  tag  }  :  Enumerable.Empty<T>());   tagCloudAggregator.LinkTo(filteringTags);     //  provide  info  to  UI   filteringTags.TryRecieveAll(out  tagDataSource);   tagCloudControl.Show(tagDataSource);   TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 14. 14 Executor  Blocks   §  NullTarget<TInput>   Recycle  bin   TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 15. 15 Joining  Blocks   §  BatchBlock<T>   –  accumulate  and  run     var  batch  =  new  BatchBlock<T>(batchSize:  Int32.MaxValue);   new  Timer(delegate  {  batch.TriggerBatch();  }).Change(1000,  1000);     var  batch  =  new  BatchBlock<T>(batchSize:  100);   TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 16. 16 Joining  Blocks   §  JoinBlock<T1,  T2,  …>   –  make  a  Tuple   –  StarvaGon  problem   var  throttle  =  new  JoinBlock<SyntaxTree,  Request>();   for  (int  i  =  0;  i  <  10;  ++i)            throttle.Target1.Post(new  SyntaxTree());     var  processor  =            new  TransformBlock<Tuple<SyntaxTree,  Request>,  SyntaxTree>          (pair  =>                  {                          var  request  =  pair.Item2;                          var  resource  =  pair.Item1;                          request.ProcessWith(resource);                          return  resource;                  });   throttle.LinkTo(processor);   processor.LinkTo(throttle.Target1);     TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 17. 17 Joining  Blocks   §  BatchedJoinBlock<T1,  T2,…>   –  accumulate  a  Tuples  and  run       try  {          batchedJoin.Target1.Post(DoWork());          batchedJoin.Target2.Post(default(T2));   }   Catch  (Exception  e)  {          batchJoin.Target2.Post(e);          batchJoin.Target1.Post(default(T1));   }     //  Item1  –  results  from  Target1   //  Item2  –  results  from  Target12   await  batchedJoin.RecieveAsync();   TPL  Dataflow  –  crash  course   Built-­‐in  Dataflow  Blocks 20 Апрель 2015
  • 18. 18 ConfiguraKon  OpKons  –  TPL  support   §  TaskScheduler    &  SynchronizationContext   –  TaskScheduler.Default  is  default   –  TaskScheduler.Current  is  not  a  default   –  ConcurrentExclusiveSchedulerPair   §  MaxDegreeOfParallelism   –  ExecuGonDataflowBlockOpGons   –  All  operaGons  are  not  concurrent  by  default   §  CancellationToken   TPL  Dataflow  –  crash  course   Advanced topics 20 Апрель 2015
  • 19. 19 ConfiguraKon  OpKons  –  load  balancing   §  MaxMessagesPerTask   –  Blocks  try  to  minimize  number  of  Tasks   §  MaxNumberOfGroups   –  Grouping  blocks  autocomplete   §  Greedy   –  How  to  create  batches  and  join   §  BoundedCapacity   –  load  balancing  –  queue  size       var  taskSchedulerPair  =  new  ConcurrentExclusiveSchedulerPair();   var  readerActions  =  from  checkBox  in  new[]  {  checkBox1,  checkBox2,  checkBox3  }          select  new  ActionBlock<int>(milliseconds  =>  {                  toggleCheckBox.Post(checkBox);                  Thread.Sleep(milliseconds);                  toggleCheckBox.Post(checkBox);          );},  new  ExecutionDataflowBlockOptions  {                  TaskScheduler  =  taskSchedulerPair.ConcurrentScheduler  });   TPL  Dataflow  –  crash  course   Advanced topics 20 Апрель 2015
  • 20. 20 StaKc  extension  methods  –  data  process   §  Choose   –  MulGple  sources  for  an  acGon   –  There  will  be  only  one  message  processed   §  OutputAvailableAsync   –  Analog  of  Stack.Peek  operaGon   §  Post/SendAsync   –  Always  async  data  propagaGon   –  You  can  postpone  the  message  with    SendAsync  ,  not  with  Post   §  Receive(Async)   TPL  Dataflow  –  crash  course   Advanced topics 20 Апрель 2015
  • 21. 21 StaKc  extension  methods  –  outer  API   §  Encapsulate  (propagator  block  factory  method)   §  LinkTo   –  Filter  the  message  propagaGon   –  Link  opGons     –  Do  not  confuse  with  ISourceBlock<T>  method   §  AsObsevable(er)   –  Rx  extension  support,  no  holy  war  here       new  DataflowLinkOptions   {          MaxMessages  =  1,          Append  =  false,          PropagateCompletion  =  true   }   TPL  Dataflow  –  crash  course   Advanced topics 20 Апрель 2015
  • 22. 22 Deep  inside   §  Implement  your  own  block   §  Advanced  debug  info  with  DebuggerDisplayAttribute     §  Chapter  #4  in  Concurrency  in  C#  Cookbook   by  Stephen  Cleary   TPL  Dataflow  –  crash  course   Advanced topics 20 Апрель 2015
  • 23. 23 Gains When to useLosses TPL  Dataflow  –  crash  course   Ending 20 Апрель 2015 Gathering  it  up   §  Thread  Safety   §  Structured  dataflow   §  Async  TPL-­‐oriented   §  Rx-­‐Extension  support   §  CCR-­‐oriented  code   easy  migraGon   §  Another  abstracGon   layer   §  Hard  debug  when   dataflow  is  complicated   §  Too  many  generics   §  You  have  a  random  data   which  must  be  ordered   §  CPU  and  I/O  operaGons   §  You  can  parallelize  work  
  • 24. Your QR Code I am at your disposal in case of any questions or doubts 20 Апрель 2015 Mikhail Veselov Moscow MVeselov@luxoft.com +7 911 951 42 98