Posts Tagged ‘DistributedSystems’
[DevoxxFR2013] Objects and Functions: Conflict Without a Cause?
Lecturer
Martin Odersky is a professor at EPFL in Lausanne, Switzerland, specializing in programming languages that blend object-oriented and functional paradigms. His research unifies these approaches, evidenced by designs like Pizza, GJ, and Functional Nets. He co-designed Java generics and authored the original javac compiler. Currently, he focuses on Scala, fusing functional and object-oriented programming while ensuring interoperability with Java and .NET.
Abstract
Martin Odersky’s lecture traces object-oriented programming’s (OOP) rise, parallels it with functional programming’s (FP) resurgence, and argues for their synthesis. Analyzing historical catalysts, methodological benefits, and modern hardware demands, he demonstrates how FP addresses parallelism and reactivity challenges. Through Scala examples, Odersky shows OOP and FP as complementary, enhancing modularity and abstraction without mutual exclusion.
Historical Roots and Catalysts for OOP Adoption
Odersky recounts his journey from Pascal compilers to modular languages, Java involvement, and Scala creation. OOP’s mainstreaming, he argues, stemmed not from encapsulation or reuse but practical necessities. Simula (1967) for simulations and Smalltalk (late 1970s) for GUI widgets inverted traditional data structures: fixed operations, unbounded implementations.
In procedural languages like C, this was cumbersome via function pointers; OOP simplified dynamic binding for unknown implementations. Odersky notes early confusion with Smalltalk, mirroring current FP bewilderment. OOP’s advantages – modeling, dependency inversion – emerged post-adoption, sparked by widget programming appeal.
Functional Programming’s Resurgence and Methodological Strengths
FP offers fewer errors, superior modularity, and productivity via higher abstractions and shorter code. Yet, despite 50-year existence, mainstream adoption lagged. Odersky identifies multicore and cloud computing as catalysts: parallelism for hardware utilization, reactivity for asynchronous events, distribution for delays/failures.
Mutable state exacerbates issues like cache coherence and non-determinism in concurrent environments. Immutable data mitigates races, enabling safe caching. Locks/threads scale poorly; even transactions retain problems. FP’s immutability fosters determinism, crucial for scalable systems.
Addressing Modern Computing Challenges with FP
Odersky outlines a triple challenge: parallel, reactive, distributed programming. Mutable state hinders each; FP excels by avoiding it.
For parallelism, he exemplifies mapping developer names: sequential in Scala, parallel via .par, yielding a parallel collection. Side effects risk chaos due to reordered executions, necessitating functional purity for correctness.
Reactivity example: an online store querying users, orders, products, stock. Synchronous calls block threads on slow services, degrading performance. Asynchronous futures prevent blocking; Scala’s for-comprehensions compose them elegantly, hiding complexity. Refactoring for parallelism pairs futures, executing concurrently.
For-comprehensions translate universally to map, flatMap, filter, allowing library-defined interpretations – sequential or async – without polluting domain logic.
Synthesizing OOP and FP: Beyond False Dichotomies
Communities often view OOP and FP oppositely, but Odersky argues orthogonality. Objects modularize (“what goes where”), providing containers with dynamic binding and inheritance. Essential for large codebases (e.g., million-line Scala systems), they prevent global namespace chaos – a Haskell limitation.
Redefine objects: eliminate mutable state dogma (e.g., immutable java.lang.String), structural equality over identity, focus on behavior. Scala embodies this fusion, modeling algebraic types with objects while importing FP capabilities.
Scala unifies scripting (winning JavaOne Script Bowl) and safe, performant systems (core for Twitter, LinkedIn). Odersky concludes OOP/FP synergy enhances development, urging exploration via Scala Days, courses, and talks.
Relevant Links and Hashtags
Links:
[DevoxxFR2013] Web Oriented Architecture: A Transmutation of Practices in Building Information Systems
Lecturer
Habib Guergachi is a Centrale graduate and the CEO and co-founder of Zenexity, established in 2003. As an expert in urbanization, he is among the French architects who introduced key concepts such as the “integrability coefficient” of applications. His professional background includes over seven years at the Central IT Department of AXA, more than three years at the IT Strategy Department of Société Générale, and five years on the executive committee and Technical Direction of a major IT services company. Currently, he leads large-scale urbanization projects and transformations of information systems toward web-oriented models. He also conducts seminars at the prestigious Capgemini Institute.
Abstract
This article explores Habib Guergachi’s lecture on Web Oriented Architecture (WOA), which critiques traditional enterprise practices and advocates for a shift to distributed, hyper-scalable systems. Drawing from historical analogies and real-world examples like LinkedIn, Guergachi argues for abandoning monolithic architectures in favor of independent, reactive applications that leverage modern web protocols. The discussion analyzes the implications for software development, emphasizing innovation, scalability, and the rejection of outdated paradigms to ensure future competitiveness in the French and global IT landscape.
Contextualizing the Shift from Hyper-Integrated to Hyper-Distributed Systems
Guergachi begins by drawing a parallel between the decline of traditional industries, such as steel mills like Gandrange and Florange, and the potential obsolescence of current software engineering practices. He posits that modern IT specialists, akin to specialized workers in software factories, risk irrelevance if they fail to innovate. The core dilemma is the overemphasis on hyper-integrated systems, where enterprises purchase off-the-shelf software that imposes architectures dictated by vendors. This leads to rigid, costly structures that stifle adaptability.
In contrast, Guergachi introduces the concept of hyper-distributed architectures, inspired by web-oriented principles. He illustrates this with a cultural anecdote: a hypothetical Chinese viewer searching for a French film clip on ina.fr fails due to rigid, integrated search mechanisms, while Google succeeds through flexible, distributed intelligence. This highlights how integrated systems, often built around enterprise architecture, application servers, and service buses, create “bousins” – complex, unmaintainable assemblages of tools like CMS for content, transactional plugins, and adapters for legacy JSF applications.
The lecturer critiques the inefficiency of such systems, where decision-making processes involve dumping data into warehouses for analysis, rather than fostering real-time adaptability. He urges a generational shift: respecting past achievements that built foundational information systems but making way for younger developers to construct future-proof ones. Avoiding the trap of using ingenuity merely to bypass imposed integrations is crucial, as technological evolution accelerates.
Principles of Distributed Paradigms and Real-World Implementations
Central to Guergachi’s thesis is the advocacy for distributed paradigms over integrated ones. He references Play Framework, a French-origin technology (despite initial skepticism due to its nationality), as a tool for building independent applications. LinkedIn’s approach exemplifies this: constructing systems as separate components, each focused on core business logic, deployed autonomously. These might use various technologies but prioritize scalability, security, and reactivity.
In a distributed model, non-core functions like search are outsourced to specialized services, allowing internal applications to remain focused and resilient under load. Guergachi explains techniques such as eventual consistency for high-load scenarios and strict consistency only where necessary, like payment processing. Communication between applications relies on RESTful hypermedia over HTTP, rejecting heavy RPC protocols or plugins like Flash, which he derides as symptomatic of a “third-world syndrome” – adopting external technologies without deep understanding.
He envisions enterprises concentrating solely on core business, externalizing storage, CMS, back-office, and video management to superior providers. Performance concerns with HTTP are dismissed as psychological barriers; no in-house solution can compete with storage specialists. Applications will interconnect in a “spaghetti” manner, but one that ensures predictability and adaptability, mirroring the web’s organic structure.
Guergachi introduces entropy as a metaphor: solid (rigid, controlled architectures), liquid (flexible, scalable across servers), and gaseous (pervasive, occupying value chain interstices like Google). Enterprises must evolve toward gaseous states for survival, contrasting with legacy systems that “suck blood” through perpetual maintenance fees.
Implications for Innovation and the Role of French IT Genius
The lecturer delineates integrated paradigms – building overarching technical architectures without functional hypotheses, aiming for longevity – as flawed, akin to overpacking for unforeseen disasters. Distributed paradigms, conversely, tailor architectures per application, prioritizing functional solutions over technical absolutes. For instance, displaying cached content during network failures ensures usability, decided by business logic rather than rigid transactional rules.
A paradigm, per Guergachi, is a coherent worldview offering solutions to its own problems. He warns against half-measures, like deploying advanced frameworks on outdated servers, urging full commitment to distributed models despite risks like dismissal. Submitting to vendor-driven technologies prepares for shameful obsolescence, whereas bold shifts enable glory through innovation.
Critiquing entities like INPI’s outdated systems, he highlights France’s image issues, comparable to 1980s Korean cars. French IT genius, exemplified by talents like Guillaume Bort and Sadek Drobi, must harness business acumen. Concepts like Scalaz originated in France (at Camel), underscoring untapped potential.
The economy of the web remains to be fully realized; Silicon Valley leads but hasn’t won. French informatics must act through innovation serving functionality, user experience, and distributed architectures with increasing entropy. Mastering interconnection complexity yields value, constructing planetary software masterpieces to safeguard jobs and elevate France.
In conclusion, Guergachi’s call to action – rebooting mindsets Monday morning – emphasizes radical change for continuity. By embracing WOA, developers transcend traditional constraints, fostering systems that are open, secure, adaptable, and cost-effective, aligning with business evolutions.