Recent Posts
Archives

Posts Tagged ‘KotlinConf2018’

PostHeaderIcon [KotlinConf2018] Discovering Datomic: August Lilleaas’s Case for an Innovative Database with Kotlin

Lecturer

August Lilleaas is a full-stack developer and consultant in Oslo, working with SQL, Datomic, JVM, Clojure, and React. He leverages Kotlin for client projects. Relevant links: Personal Blog (publications); LinkedIn Profile (professional page).

Abstract

This article explores August Lilleaas’s introduction to Datomic, a unique database with single-threaded writes and client-side queries. Set in Kotlin-driven development, it examines Datomic’s time-travel and storage-agnostic design, inspired by BigTable and VoltDB. The analysis highlights its trade-offs, contextualized in data-intensive applications, with implications for history queries and scalability.

Introduction and Context

August Lilleaas presented Datomic at KotlinConf 2018, emphasizing its unconventional design. Unlike traditional databases, Datomic writes to external stores, runs queries client-side, and supports time-travel. Lilleaas, a Kotlin user, clarified his independence from Datomic’s creators. This narrative unfolds where developers seek flexible databases for Kotlin applications, leveraging its JVM compatibility.

Methodological Approaches to Datomic

Datomic’s writer is single-threaded, capping write throughput but simplifying consistency. It stores data in BigTable or other backends, with no native storage. Queries execute on clients, using indexes for efficiency. Time-travel allows historical queries, supporting “real updates” that preserve past states. Lilleaas demonstrated Kotlin queries, leveraging Datomic’s API.

Analysis of Innovations and Features

Datomic innovates with time-travel, enabling GDPR-like compliance. Client-side queries reduce server load, unlike SQL databases. Compared to MongoDB, Datomic’s structured API suits Kotlin’s type safety. Limitations include proprietary nature and write ceilings, mitigated by cloud offerings.

Implications and Consequences

Datomic implies flexible data modeling, ideal for history-sensitive apps. Its trade-offs suit read-heavy systems, enhancing Kotlin’s data layer.

Conclusion

Lilleaas’s advocacy reveals Datomic’s potential as a Kotlin-friendly database, balancing innovation with practical trade-offs.

Links

PostHeaderIcon [KotlinConf2018] Mastering Concurrency: Roman Elizarov’s Practical Guide to Kotlin Coroutines

Lecturer

Roman Elizarov is a seasoned software developer at JetBrains, with over 17 years of experience in high-performance trading software at Devexperts. An expert in Java and JVM, he teaches concurrent programming at St. Petersburg ITMO and serves as Chief Judge for the Northeastern European Regional Programming Contest. Relevant links: JetBrains Blog (publications); LinkedIn Profile (professional page).

Abstract

This article follows Roman Elizarov’s practical application of Kotlin coroutines to address concurrency challenges. Set in the context of large-scale systems, it examines methodologies for state confinement and communication via channels. The analysis highlights coroutines’ innovations in eliminating shared mutable state, with implications for robust, scalable architectures.

Introduction and Context

Roman Elizarov engaged KotlinConf 2018 attendees with a deep dive into coroutines, building on his prior introductory talk. With a vision for a unified language across distributed systems, Elizarov showcased coroutines as a solution to concurrency without shared mutable state. His examples addressed real-life coordination, set against his experience with high-throughput trading systems processing millions of events per second.

Methodological Approaches to Concurrency

Elizarov demonstrated coroutines confining state to single coroutines, communicating via channels. Each coroutine handles a specific task, receiving input and sending output through channels, avoiding locks. For UI integration, coroutines on the main thread directly update views or report via channels for decoupled architectures. Builders like launch and async orchestrate tasks, while suspend functions enable non-blocking code.

Analysis of Innovations and Features

Coroutines innovate by simplifying async programming. Channels provide fan-out communication, unlike threads’ shared state. Compared to Java’s CompletableFuture, coroutines preserve sequential code structure. Limitations include a learning curve for channel patterns and ensuring proper context management.

Implications and Consequences

Elizarov’s approach implies cleaner, safer concurrency models, reducing bugs in complex systems. It suits UI-driven apps and distributed systems, enhancing scalability. The consequence is a shift toward channel-based designs, though teams must master coroutine semantics.

Conclusion

Elizarov’s practical guide positions coroutines as a cornerstone for modern concurrency, offering a robust alternative to traditional threading models.

Links

PostHeaderIcon [KotlinConf2018] Crafting the Next Great Kotlin Novel: Lisa Wray’s Exploration of Expressive Coding

Lecturer

Lisa Wray is a mobile developer and Google Developer Expert for Android, specializing in user interfaces. Holding a B.S. in music and computer science from M.I.T., she works at Present, a local social network, with prior roles at Google, The New York Times, and Genius. Relevant links: Present Website (professional page); LinkedIn Profile (professional page).

Abstract

This article delves into Lisa Wray’s exploration of Kotlin’s expressive potential, drawing parallels with literary principles from authors like William Zinsser and Stephen King. Contextualized in the transition from Java’s rigidity, it examines methodologies for balancing brevity, maintainability, and domain-specific languages (DSLs). The analysis highlights innovations in Kotlin’s syntax, implications for code quality, and the delicate balance of expressive freedom.

Introduction and Context

Lisa Wray captivated the KotlinConf 2018 audience with a unique perspective, likening Kotlin coding to writing a novel. Transitioning from Java’s prescriptive nature, Wray found Kotlin’s expressive freedom inspiring yet challenging. Her talk, inspired by literary works like On Writing Well and On Writing, navigates the question of how to wield Kotlin’s features—such as concise syntax and DSLs—without sacrificing clarity or maintainability. This narrative unfolds in a context where developers, liberated from Java’s boilerplate, seek guidelines beyond official style guides to craft robust, readable codebases.

Methodological Approaches to Expressive Coding

Wray proposed applying literary principles to coding. Clarity, akin to Zinsser’s advice, demands concise yet understandable code. She advocated selective use of Kotlin’s features: lambdas, extension functions, and optional syntax like type inference. For DSLs, she explored lambda-with-receiver constructs, where a builder class defines a custom interface, as seen in Kotlin’s apply or with. Her methodology emphasized restraint—using DSLs judiciously to avoid complexity. She cautioned against overusing custom DSLs, which add maintenance overhead, while endorsing well-crafted third-party DSLs that leverage Kotlin’s syntax.

Analysis of Innovations and Features

Kotlin’s innovations lie in its expressive syntax: lambdas reduce verbosity, and DSLs create domain-specific interfaces within Kotlin’s grammar. Compared to Java, Kotlin’s flexibility allows poetic code, but Wray warned of Perl-like obscurity. Her golden rule—avoid DSLs where named parameters suffice—curbs boilerplate. Third-party DSLs, when thoughtfully designed, enhance rather than pollute codebases, as they reuse Kotlin’s syntax. Limitations include the tediousness of crafting DSLs and the risk of over-concision, which may obscure intent.

Implications and Consequences

Wray’s approach implies a shift toward intentional coding, where developers weigh brevity against maintainability. It encourages teams to define project-specific style guides, fostering consistency in large codebases. The consequence is a codebase that balances expressiveness with clarity, aiding collaboration and longevity. However, over-reliance on DSLs could deter new developers, necessitating careful documentation.

Conclusion

Wray’s literary analogy reframes Kotlin coding as an art form, urging developers to harness its expressive power thoughtfully. By blending writing principles with technical restraint, she offers a path to crafting maintainable, impactful code—perhaps the next great Kotlin novel.

Links