Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
CIn.ufpe.br
Afluentes
Concurrent I/O Made Easy With Lazy Evaluation
Saulo Medeiros de Araujo
sma2@cin.ufpe.br
CIn.ufpe.br
A Little Bit About Me
• I have been working in the Brazilian software industry for almost 20
years now
• I cof...
CIn.ufpe.br
Context
• Many systems are I/O intensive
• Several I/O intensive systems exhibit few dependencies among data
t...
CIn.ufpe.br
CIn.ufpe.br
Context
• Mainstream mechanisms for concurrent I/O make programming
harder
• Synchronous I/O primitives with m...
CIn.ufpe.br
Calculating b2-4ac with Synchronous Methods
CIn.ufpe.br
CIn.ufpe.br
Asynchronous Methods and Callbacks Issues
• More lines of code
• The programmer has to manually coordinate the...
CIn.ufpe.br
Synchronous and Asynchronous Methods
• Synchronous Methods
– Deliver their results through return values
– Eas...
CIn.ufpe.br
CIn.ufpe.br
The Afluentes Framework Strategy
Asynchronous
Methods
Synchronous
Methods
Evaluators
Adapters
Adapters
CIn.ufpe.br
Evaluators
• Evaluators are synchronous methods, therefore, composing them is
easy
• They receive evaluations ...
CIn.ufpe.br
(Lazy) Evaluations
• Evaluations are objects built by evaluators
• They encapsulate
– A method to be invoked
–...
CIn.ufpe.br
CIn.ufpe.br
Problem in the Paradise
• Methods are not first class citzens in Java
• They cannot be stored in attributes, p...
CIn.ufpe.br
The Afluentes Framework Strategy
• The Afluentes framework represents methods, both
synchronous and asynchrono...
CIn.ufpe.br
Synchronous Functions
CIn.ufpe.br
Calculating b2-4ac with Synchronous Functions
CIn.ufpe.br
Asynchronous Functions
CIn.ufpe.br
Callbacks
CIn.ufpe.br
CIn.ufpe.br
Experimental Evaluation
• Java web application that allows its users to exchange messages
– Sort of e-mail
• P...
CIn.ufpe.br
Concurrent I/O Opportunities
CIn.ufpe.br
Introducing the Afluentes Framework
CIn.ufpe.br
Evaluation Results
CIn.ufpe.br
What We Are Cooking
CIn.ufpe.br
Thanks!
github.com/afluentes
Upcoming SlideShare
Loading in …5
×

of

Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 1 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 2 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 3 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 4 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 5 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 6 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 7 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 8 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 9 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 10 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 11 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 12 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 13 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 14 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 15 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 16 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 17 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 18 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 19 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 20 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 21 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 22 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 23 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 24 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 25 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 26 Afluentes - Concurrent I/O Made Easy with Lazy Evaluation Slide 27
Upcoming SlideShare
Reyrey pecha kucha
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Afluentes - Concurrent I/O Made Easy with Lazy Evaluation

Download to read offline

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Afluentes - Concurrent I/O Made Easy with Lazy Evaluation

  1. 1. CIn.ufpe.br Afluentes Concurrent I/O Made Easy With Lazy Evaluation Saulo Medeiros de Araujo sma2@cin.ufpe.br
  2. 2. CIn.ufpe.br A Little Bit About Me • I have been working in the Brazilian software industry for almost 20 years now • I cofounded a startup (1999-2004) • I worked in medium and large sized companies (2004-2006) • Currently, I am working at the Brazilian Central Bank (2006-Present) • I have been acting mainly as a software architect for object-oriented web applications backed by relational databases • This experience is the starting point of the Afluentes framework
  3. 3. CIn.ufpe.br Context • Many systems are I/O intensive • Several I/O intensive systems exhibit few dependencies among data transfer and processing tasks • The performance of these systems may be significantly improved by requesting I/O operations concurrently • This is because these operations will be performed in parallel, if the necessary resources are available • Despite this huge potential, most systems request I/O operations sequentially
  4. 4. CIn.ufpe.br
  5. 5. CIn.ufpe.br Context • Mainstream mechanisms for concurrent I/O make programming harder • Synchronous I/O primitives with multithreaded programming – Race conditions – Deadlocks – Scalability issues • Asynchronous I/O primitives – Callback hell – Pyramid of doom
  6. 6. CIn.ufpe.br Calculating b2-4ac with Synchronous Methods
  7. 7. CIn.ufpe.br
  8. 8. CIn.ufpe.br Asynchronous Methods and Callbacks Issues • More lines of code • The programmer has to manually coordinate the execution of asynchronous methods manually • Callbacks should be just a mechanism for asynchronous methods deliver their executions results • In the absence of further programming language support, programmers end up using callbacks to manage communication and synchronization among different execution contexts • This is how things become nasty
  9. 9. CIn.ufpe.br Synchronous and Asynchronous Methods • Synchronous Methods – Deliver their results through return values – Easily composed  – The runtime system coordinates their executions  – Are sequentially executed  • Asynchronous methods – Deliver their results through callbacks – Composing them is hard  – The programmer has to manually coordinate their executions  – Are concurrently executed  • Is it possible to combine the advantages of synchronous and asynchronous methods?
  10. 10. CIn.ufpe.br
  11. 11. CIn.ufpe.br The Afluentes Framework Strategy Asynchronous Methods Synchronous Methods Evaluators Adapters Adapters
  12. 12. CIn.ufpe.br Evaluators • Evaluators are synchronous methods, therefore, composing them is easy • They receive evaluations as parameters • They produce evaluations as results
  13. 13. CIn.ufpe.br (Lazy) Evaluations • Evaluations are objects built by evaluators • They encapsulate – A method to be invoked – The parameters (other evaluations) with witch this method must be invoked • When executed, an evaluator composition builds an evaluation tree
  14. 14. CIn.ufpe.br
  15. 15. CIn.ufpe.br Problem in the Paradise • Methods are not first class citzens in Java • They cannot be stored in attributes, passed as parameters, etc. • This is a necessary condition for implementing evaluations
  16. 16. CIn.ufpe.br The Afluentes Framework Strategy • The Afluentes framework represents methods, both synchronous and asynchronous, and callbacks through objects that implement specific interfaces
  17. 17. CIn.ufpe.br Synchronous Functions
  18. 18. CIn.ufpe.br Calculating b2-4ac with Synchronous Functions
  19. 19. CIn.ufpe.br Asynchronous Functions
  20. 20. CIn.ufpe.br Callbacks
  21. 21. CIn.ufpe.br
  22. 22. CIn.ufpe.br Experimental Evaluation • Java web application that allows its users to exchange messages – Sort of e-mail • Persists objects in a relational database (MySQL) • Interacts with this database through an object-relational mapper (Hibernate)
  23. 23. CIn.ufpe.br Concurrent I/O Opportunities
  24. 24. CIn.ufpe.br Introducing the Afluentes Framework
  25. 25. CIn.ufpe.br Evaluation Results
  26. 26. CIn.ufpe.br What We Are Cooking
  27. 27. CIn.ufpe.br Thanks! github.com/afluentes

Views

Total views

383

On Slideshare

0

From embeds

0

Number of embeds

2

Actions

Downloads

4

Shares

0

Comments

0

Likes

0

×