SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Grazie a
           Sponsor
Agenda
•   Falsi miti e definizioni
•   Supporto del .NET Framework
•   Tipologie di operazioni
•   Design applicazioni
Falsi miti
• Serve a velocizzare l’esecuzione
• Eseguire in un nuovo Thread
• Asincrono e parallelo sono sinonimi
Asincrono
• Non bloccare il Thread chiamante
  – Client-side: mantenere la User Interface
    (re)attiva (desktop, tablet, phone)
  – Server-side: evitare la creazione di nuovi
    Thread, risparmiando risorse
Parallelo
• Eseguire contemporaneamente operazioni
  asincrone
  – Ridurre il tempo complessivo di esecuzione
    dividendo il carico di lavoro
Task-based Asynchronous Pattern
• Insieme di tipi e librerie .NET
  – Nuovo modello unificato
  – Evoluzione di quelli passati
• C# nuove keywords async/await
Tipologie
• CPU-bound: intensive da un punto di vista
  computazionale (Thready Tasks)
  – Task.Factory.StartNew(()=>{ /* code */ });
• I/O-bound: interazione con un dispositivo
  di input/output (Threadless Tasks)
  – WebRequest.Create("...").GetResponseAsync();
Design Applicazioni
• La progettazione del software è attività
  molto impegnativa, che richiede molti
  skills, ma progettare software che lavora in
  asincrono e parallelo è ancora più difficile
Word Counter

DEMO
Q&A
Tutto il materiale di questa sessione su
http://www.communitydays.it/

#CDays13

Weitere ähnliche Inhalte

Was ist angesagt?

Dot netcampus2015 green-template
Dot netcampus2015 green-templateDot netcampus2015 green-template
Dot netcampus2015 green-template
DotNetCampus
 
Architetttura Della Soluzione
Architetttura Della SoluzioneArchitetttura Della Soluzione
Architetttura Della Soluzione
Luca Milan
 

Was ist angesagt? (20)

Wcf data services
Wcf data servicesWcf data services
Wcf data services
 
Dependency injection questa sconosciuta
Dependency injection questa sconosciutaDependency injection questa sconosciuta
Dependency injection questa sconosciuta
 
Windows azure - abbattere tempi e costi di sviluppo
Windows azure - abbattere tempi e costi di sviluppoWindows azure - abbattere tempi e costi di sviluppo
Windows azure - abbattere tempi e costi di sviluppo
 
Async/Await: make it simple!!
Async/Await: make it simple!!Async/Await: make it simple!!
Async/Await: make it simple!!
 
Dot netcampus2015 green-template
Dot netcampus2015 green-templateDot netcampus2015 green-template
Dot netcampus2015 green-template
 
Javascript task automation
Javascript task automationJavascript task automation
Javascript task automation
 
Intelligenza artificiale nel mondo front-end - CodeGen2021
Intelligenza artificiale nel mondo front-end - CodeGen2021Intelligenza artificiale nel mondo front-end - CodeGen2021
Intelligenza artificiale nel mondo front-end - CodeGen2021
 
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
 
Sviluppo di soluzioni embedded moderne con .NET Micro Framework by Lorenzo Ma...
Sviluppo di soluzioni embedded moderne con .NET Micro Framework by Lorenzo Ma...Sviluppo di soluzioni embedded moderne con .NET Micro Framework by Lorenzo Ma...
Sviluppo di soluzioni embedded moderne con .NET Micro Framework by Lorenzo Ma...
 
AntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatoreAntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatore
 
Architetttura Della Soluzione
Architetttura Della SoluzioneArchitetttura Della Soluzione
Architetttura Della Soluzione
 
Tutto quello che non vi hanno mai detto su Azure Integration Services (Logic ...
Tutto quello che non vi hanno mai detto su Azure Integration Services (Logic ...Tutto quello che non vi hanno mai detto su Azure Integration Services (Logic ...
Tutto quello che non vi hanno mai detto su Azure Integration Services (Logic ...
 
Soluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie MicrosoftSoluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie Microsoft
 
[Alam aeki] Guida illustrata alla modellazione di un dominio con Event Sourci...
[Alam aeki] Guida illustrata alla modellazione di un dominio con Event Sourci...[Alam aeki] Guida illustrata alla modellazione di un dominio con Event Sourci...
[Alam aeki] Guida illustrata alla modellazione di un dominio con Event Sourci...
 
ASP.NET MVC: sfruttare la piattaforma al 100%
ASP.NET MVC: sfruttare la piattaforma al 100%ASP.NET MVC: sfruttare la piattaforma al 100%
ASP.NET MVC: sfruttare la piattaforma al 100%
 
Xamarin.Forms Performance Tips & Tricks - Francesco Bonacci - Codemotion Rome...
Xamarin.Forms Performance Tips & Tricks - Francesco Bonacci - Codemotion Rome...Xamarin.Forms Performance Tips & Tricks - Francesco Bonacci - Codemotion Rome...
Xamarin.Forms Performance Tips & Tricks - Francesco Bonacci - Codemotion Rome...
 
Kinect + .NET = NUI : Interfacce naturali facili con Kinect!!!
Kinect + .NET = NUI : Interfacce naturali facili con Kinect!!!Kinect + .NET = NUI : Interfacce naturali facili con Kinect!!!
Kinect + .NET = NUI : Interfacce naturali facili con Kinect!!!
 
Introduzione a Service Fabric e Actor Model
Introduzione a Service Fabric e Actor ModelIntroduzione a Service Fabric e Actor Model
Introduzione a Service Fabric e Actor Model
 
Actions on Google e Alexa skills per .NET lovers
Actions on Google e Alexa skills per .NET loversActions on Google e Alexa skills per .NET lovers
Actions on Google e Alexa skills per .NET lovers
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)
 

Andere mochten auch

Texas Start Chart Presentation
Texas Start Chart PresentationTexas Start Chart Presentation
Texas Start Chart Presentation
chapayaa
 
Instructional Leadership Power Point
Instructional Leadership Power PointInstructional Leadership Power Point
Instructional Leadership Power Point
Aaroncloughhpu
 
Treballs dibuix
Treballs dibuixTreballs dibuix
Treballs dibuix
eslider20
 
Texas Star Chart Summary
Texas Star Chart SummaryTexas Star Chart Summary
Texas Star Chart Summary
guest9426122
 
Instructional Leadership Power Point
Instructional Leadership Power PointInstructional Leadership Power Point
Instructional Leadership Power Point
Aaroncloughhpu
 
Texas Star Chart Summary
Texas Star Chart SummaryTexas Star Chart Summary
Texas Star Chart Summary
guest9426122
 
Legacy Coderetreat Bologna @ CodersTUG
Legacy Coderetreat Bologna @ CodersTUGLegacy Coderetreat Bologna @ CodersTUG
Legacy Coderetreat Bologna @ CodersTUG
Matteo Baglini
 
Kyle Presentation
Kyle PresentationKyle Presentation
Kyle Presentation
klpowers
 
Modern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscanaModern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscana
Matteo Baglini
 
New investments in ukraine and belarus and Made in Italy
New investments in ukraine and belarus and Made in ItalyNew investments in ukraine and belarus and Made in Italy
New investments in ukraine and belarus and Made in Italy
Massimiliano Macrì
 

Andere mochten auch (17)

Uniquely40 Powerpoint Presentation
Uniquely40 Powerpoint PresentationUniquely40 Powerpoint Presentation
Uniquely40 Powerpoint Presentation
 
Evimizdeki zehirler
Evimizdeki zehirlerEvimizdeki zehirler
Evimizdeki zehirler
 
Texas Start Chart Presentation
Texas Start Chart PresentationTexas Start Chart Presentation
Texas Start Chart Presentation
 
Instructional Leadership Power Point
Instructional Leadership Power PointInstructional Leadership Power Point
Instructional Leadership Power Point
 
Treballs dibuix
Treballs dibuixTreballs dibuix
Treballs dibuix
 
Texas Star Chart Summary
Texas Star Chart SummaryTexas Star Chart Summary
Texas Star Chart Summary
 
Fang
FangFang
Fang
 
Instructional Leadership Power Point
Instructional Leadership Power PointInstructional Leadership Power Point
Instructional Leadership Power Point
 
Career Outlook
Career OutlookCareer Outlook
Career Outlook
 
How Can A Virtual Assistant Help Your Business
How  Can A Virtual  Assistant  Help   Your BusinessHow  Can A Virtual  Assistant  Help   Your Business
How Can A Virtual Assistant Help Your Business
 
Texas Star Chart Summary
Texas Star Chart SummaryTexas Star Chart Summary
Texas Star Chart Summary
 
Escoleta es Vedranell
Escoleta es VedranellEscoleta es Vedranell
Escoleta es Vedranell
 
Planeta esti TU!
Planeta esti TU!Planeta esti TU!
Planeta esti TU!
 
Legacy Coderetreat Bologna @ CodersTUG
Legacy Coderetreat Bologna @ CodersTUGLegacy Coderetreat Bologna @ CodersTUG
Legacy Coderetreat Bologna @ CodersTUG
 
Kyle Presentation
Kyle PresentationKyle Presentation
Kyle Presentation
 
Modern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscanaModern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscana
 
New investments in ukraine and belarus and Made in Italy
New investments in ukraine and belarus and Made in ItalyNew investments in ukraine and belarus and Made in Italy
New investments in ukraine and belarus and Made in Italy
 

Ähnlich wie Async: scalabilità e responsiveness senza pari! @ CDays

Slide typescript - xe dotnet - Codemotion Rome 2015
Slide typescript - xe dotnet - Codemotion Rome 2015Slide typescript - xe dotnet - Codemotion Rome 2015
Slide typescript - xe dotnet - Codemotion Rome 2015
Codemotion
 
DotNetToscana - Sessione TypeScript
DotNetToscana - Sessione TypeScriptDotNetToscana - Sessione TypeScript
DotNetToscana - Sessione TypeScript
Sinergia Totale
 
Sviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle MonorailSviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle Monorail
DotNetMarche
 
Introduzione a TypeScript
Introduzione a TypeScriptIntroduzione a TypeScript
Introduzione a TypeScript
Sinergia Totale
 

Ähnlich wie Async: scalabilità e responsiveness senza pari! @ CDays (20)

Agileday2013 pratiche agili applicate all'infrastruttura
Agileday2013 pratiche agili applicate all'infrastrutturaAgileday2013 pratiche agili applicate all'infrastruttura
Agileday2013 pratiche agili applicate all'infrastruttura
 
Prototipazione Low-Code con AWS Step Functions
Prototipazione Low-Code con AWS Step FunctionsPrototipazione Low-Code con AWS Step Functions
Prototipazione Low-Code con AWS Step Functions
 
Infrastructure as Data
Infrastructure as DataInfrastructure as Data
Infrastructure as Data
 
Slide typescript - xe dotnet - Codemotion Rome 2015
Slide typescript - xe dotnet - Codemotion Rome 2015Slide typescript - xe dotnet - Codemotion Rome 2015
Slide typescript - xe dotnet - Codemotion Rome 2015
 
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDTYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
 
Sviluppare Azure Web Apps
Sviluppare Azure Web AppsSviluppare Azure Web Apps
Sviluppare Azure Web Apps
 
Asp.net web form 4.5 - what's new!!
Asp.net web form 4.5 - what's new!!Asp.net web form 4.5 - what's new!!
Asp.net web form 4.5 - what's new!!
 
ASP.NET performance optimization
ASP.NET performance optimizationASP.NET performance optimization
ASP.NET performance optimization
 
Introduzione a JavaScript e jQuery (1/2)
Introduzione a JavaScript e jQuery (1/2)Introduzione a JavaScript e jQuery (1/2)
Introduzione a JavaScript e jQuery (1/2)
 
Back to the Future: Migrare da WebForm ad ASP.NET Core gradualmente
Back to the Future: Migrare da WebForm ad ASP.NET Core gradualmente Back to the Future: Migrare da WebForm ad ASP.NET Core gradualmente
Back to the Future: Migrare da WebForm ad ASP.NET Core gradualmente
 
DotNetToscana - Sessione TypeScript
DotNetToscana - Sessione TypeScriptDotNetToscana - Sessione TypeScript
DotNetToscana - Sessione TypeScript
 
Azure dayroma java, il lato oscuro del cloud
Azure dayroma   java, il lato oscuro del cloudAzure dayroma   java, il lato oscuro del cloud
Azure dayroma java, il lato oscuro del cloud
 
Sviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle MonorailSviluppo Web Agile con Castle Monorail
Sviluppo Web Agile con Castle Monorail
 
.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile.NET Core, ASP.NET Core e Linux per il Mobile
.NET Core, ASP.NET Core e Linux per il Mobile
 
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...ASP.NET Core Services e Linux per il Mobile  - Pietro Libro - Codemotion Rome...
ASP.NET Core Services e Linux per il Mobile - Pietro Libro - Codemotion Rome...
 
SQL Saturday 2019 - Event Processing with Spark
SQL Saturday 2019 - Event Processing with SparkSQL Saturday 2019 - Event Processing with Spark
SQL Saturday 2019 - Event Processing with Spark
 
CDays15 - AZ08 - DocumentDB: il NoSql secondo Azure
CDays15 - AZ08 - DocumentDB: il NoSql secondo AzureCDays15 - AZ08 - DocumentDB: il NoSql secondo Azure
CDays15 - AZ08 - DocumentDB: il NoSql secondo Azure
 
Introduzione a TypeScript
Introduzione a TypeScriptIntroduzione a TypeScript
Introduzione a TypeScript
 
Web frameworks
Web frameworksWeb frameworks
Web frameworks
 
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
 

Mehr von Matteo Baglini

Approval Tests @ MiniIAD
Approval Tests @ MiniIADApproval Tests @ MiniIAD
Approval Tests @ MiniIAD
Matteo Baglini
 
Approval Tests @ CodersTUG
Approval Tests @ CodersTUGApproval Tests @ CodersTUG
Approval Tests @ CodersTUG
Matteo Baglini
 
Coderetreat @ CodersTUG
Coderetreat @ CodersTUGCoderetreat @ CodersTUG
Coderetreat @ CodersTUG
Matteo Baglini
 
The NoSQL movement @ DotNetToscana
The NoSQL movement @ DotNetToscanaThe NoSQL movement @ DotNetToscana
The NoSQL movement @ DotNetToscana
Matteo Baglini
 
Key-value databases in practice Redis @ DotNetToscana
Key-value databases in practice Redis @ DotNetToscanaKey-value databases in practice Redis @ DotNetToscana
Key-value databases in practice Redis @ DotNetToscana
Matteo Baglini
 

Mehr von Matteo Baglini (9)

Writing Good Tests
Writing Good TestsWriting Good Tests
Writing Good Tests
 
Approval Tests @ MiniIAD
Approval Tests @ MiniIADApproval Tests @ MiniIAD
Approval Tests @ MiniIAD
 
VS13 - Approval Tests: cosa, come, quando, perché? @ CDays
VS13 - Approval Tests: cosa, come, quando, perché? @ CDaysVS13 - Approval Tests: cosa, come, quando, perché? @ CDays
VS13 - Approval Tests: cosa, come, quando, perché? @ CDays
 
Approval Tests @ CodersTUG
Approval Tests @ CodersTUGApproval Tests @ CodersTUG
Approval Tests @ CodersTUG
 
Coderetreat @ CodersTUG
Coderetreat @ CodersTUGCoderetreat @ CodersTUG
Coderetreat @ CodersTUG
 
RESTFul Web API Services @ DotNetToscana
RESTFul Web API Services @ DotNetToscanaRESTFul Web API Services @ DotNetToscana
RESTFul Web API Services @ DotNetToscana
 
The NoSQL movement @ DotNetToscana
The NoSQL movement @ DotNetToscanaThe NoSQL movement @ DotNetToscana
The NoSQL movement @ DotNetToscana
 
Key-value databases in practice Redis @ DotNetToscana
Key-value databases in practice Redis @ DotNetToscanaKey-value databases in practice Redis @ DotNetToscana
Key-value databases in practice Redis @ DotNetToscana
 
Asynchronous Programming Lab @ DotNetToscana
Asynchronous Programming Lab @ DotNetToscanaAsynchronous Programming Lab @ DotNetToscana
Asynchronous Programming Lab @ DotNetToscana
 

Async: scalabilità e responsiveness senza pari! @ CDays

  • 1.
  • 2. Grazie a Sponsor
  • 3. Agenda • Falsi miti e definizioni • Supporto del .NET Framework • Tipologie di operazioni • Design applicazioni
  • 4. Falsi miti • Serve a velocizzare l’esecuzione • Eseguire in un nuovo Thread • Asincrono e parallelo sono sinonimi
  • 5. Asincrono • Non bloccare il Thread chiamante – Client-side: mantenere la User Interface (re)attiva (desktop, tablet, phone) – Server-side: evitare la creazione di nuovi Thread, risparmiando risorse
  • 6. Parallelo • Eseguire contemporaneamente operazioni asincrone – Ridurre il tempo complessivo di esecuzione dividendo il carico di lavoro
  • 7. Task-based Asynchronous Pattern • Insieme di tipi e librerie .NET – Nuovo modello unificato – Evoluzione di quelli passati • C# nuove keywords async/await
  • 8. Tipologie • CPU-bound: intensive da un punto di vista computazionale (Thready Tasks) – Task.Factory.StartNew(()=>{ /* code */ }); • I/O-bound: interazione con un dispositivo di input/output (Threadless Tasks) – WebRequest.Create("...").GetResponseAsync();
  • 9. Design Applicazioni • La progettazione del software è attività molto impegnativa, che richiede molti skills, ma progettare software che lavora in asincrono e parallelo è ancora più difficile
  • 11. Q&A Tutto il materiale di questa sessione su http://www.communitydays.it/ #CDays13