Three years ago Store4, the little library that could, was released at KotlinConf'19. Store has been simplifying data loading on Android for close to a decade and was supercharged by being 100% Kotlin. Today we're here to talk about the next paradigm shift in data loading Store5 - a Kotlin Multiplatform solution for reading, writing and resolving data conflicts on any platform that Kotlin supports (Android, iOS, Web and Desktop). The Android community has embraced Store for close to a decade, Kotlin is making it possible to adopt the same patterns on other mobile platforms and beyond.
With the addition of support for updating remote sources, network resilience, pain free conflict resolution, and a highly extensible api - Store5 aims to make reading and writing data effortless on all Kotlin platforms. This talk will focus on Store5 foundational concepts and usage in production and at scale. We will be covering adopting KMP, applying Google's offline-first guiding principles beyond Android and how we hope to establish a seamless way for all apps, regardless of platform, to work with local and remote data. This talk is not to be missed for folks (like us) who have battle scars from years of working on hard to fix bugs in offline first applications.
Presentation to the MIT IAP HTML5 Game Development Class on Debugging and Optimizing Javascript, Local storage, Offline Storage and Server side Javascript with Node.js
Asynchronous web apps with the Play Framework 2.0Oscar Renalias
Brief introduction to the asynchronous and reactive IO capabilities available in Play 2.0.
Source code of the demos available here: https://github.com/oscarrenalias/wjax-2012-play-async-apps
Introduction
Web Storage
WebSQL
IndexedDB
File System Access
Final Considerations
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Introduction
Web Storage
WebSQL
IndexedDB
File System Access
Final Considerations
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2014.
http://www.ivanomalavolta.com
Presentation to the MIT IAP HTML5 Game Development Class on Debugging and Optimizing Javascript, Local storage, Offline Storage and Server side Javascript with Node.js
Asynchronous web apps with the Play Framework 2.0Oscar Renalias
Brief introduction to the asynchronous and reactive IO capabilities available in Play 2.0.
Source code of the demos available here: https://github.com/oscarrenalias/wjax-2012-play-async-apps
Introduction
Web Storage
WebSQL
IndexedDB
File System Access
Final Considerations
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Introduction
Web Storage
WebSQL
IndexedDB
File System Access
Final Considerations
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2014.
http://www.ivanomalavolta.com
Scale Your Data Tier With Windows Server App FabricChris Dufour
The distributed in-memory caching capabilities of Windows Server AppFabric will change how you think about scaling your Microsoft .NET-connected applications. Come learn how the distributed nature of the AppFabric cache allows large amounts of data to be stored in-memory for extremely fast access, how AppFabric's integration with Microsoft ASP.NET makes it easy to add low-latency data caching across the web farm, and discover the unique high availability features of AppFabric which will bring new degrees of scale and resilience to your data tier and your web applications.
Max Koretskyi "Why are Angular and React so fast?"Fwdays
Very few developers have the need to write super optimized code. In application development, we tend to favor readability over optimization. But that’s not the case with frameworks. Developers who use frameworks expect them to run as fast as possible. In fact, speed is often a defining characteristic when choosing a framework. There are techniques that make code run faster. You’ve probably heard about linked lists, monomorphism, and bitmasks, right? Maybe you've even used some. Well, you can find all these and a bunch of other interesting approaches in the sources of most popular JS frameworks.
Over the past year, I’ve seen a lot while reverse-engineering Angular and React. In this talk, I want to share my findings with you. Some of you may end up applying them at work. And others, who knows, may even end up writing the next big framework.
It is known that we read more code than we write, so documentation is super important and when done well can be a time saver. But what's a good solution for this? This talk shows how easy it is to take tests and use them as a live documentation of your code, because they're always up to date.
Let'Swift 2019 컨퍼런스에서 RxSwift to Combine 이라고 발표한 자료입니다. 자료 내에 언급되는 코드 링크는 다음과 같습니다.
[BringMyOwnBeer]
• RxSwift/RxCocoa: https://github.com/fimuxd/BringMyOwnBeer-
• Combine/SwiftUI: https://github.com/fimuxd/BringMyOwnBeer-Combine
Slides from talk about Node.js held on JavaScript Fullstack Day at International JavaScript Conference 2019 (https://javascript-conference.com/web-development-architecture/javascript-fullstack-day-from-zero-to-hero/)
The three problems discussed are:
1. "Disconnected" networking apps - how do you handle bad connections.
2. Multiple UIs - how do you adapt to different UI idioms.
3. After release - marketing, customer support, etc.
Most ORMs can optimize querying/joining data to avoid the N + 1 query problem, but it is limited to querying a single database. This session presents a lightweight, purely stateless, and type-safe solution to the N + 1 query problem that can transparently be reused in any microservice environment, which is especially relevant in an event sourcing/CQRS architecture. Through source code examples, the presentation dives into some core java 8 functional patterns to design a simple and user-friendly API that decouples the core logic of querying and efficiently aggregating disparate datasources (REST, NoSQL, database) from the streaming/reactive technology used to connect to those sources (Project Reactor/Spring WebFlux, Akka Stream, RxJava, and so on).
Scale Your Data Tier With Windows Server App FabricChris Dufour
The distributed in-memory caching capabilities of Windows Server AppFabric will change how you think about scaling your Microsoft .NET-connected applications. Come learn how the distributed nature of the AppFabric cache allows large amounts of data to be stored in-memory for extremely fast access, how AppFabric's integration with Microsoft ASP.NET makes it easy to add low-latency data caching across the web farm, and discover the unique high availability features of AppFabric which will bring new degrees of scale and resilience to your data tier and your web applications.
Max Koretskyi "Why are Angular and React so fast?"Fwdays
Very few developers have the need to write super optimized code. In application development, we tend to favor readability over optimization. But that’s not the case with frameworks. Developers who use frameworks expect them to run as fast as possible. In fact, speed is often a defining characteristic when choosing a framework. There are techniques that make code run faster. You’ve probably heard about linked lists, monomorphism, and bitmasks, right? Maybe you've even used some. Well, you can find all these and a bunch of other interesting approaches in the sources of most popular JS frameworks.
Over the past year, I’ve seen a lot while reverse-engineering Angular and React. In this talk, I want to share my findings with you. Some of you may end up applying them at work. And others, who knows, may even end up writing the next big framework.
It is known that we read more code than we write, so documentation is super important and when done well can be a time saver. But what's a good solution for this? This talk shows how easy it is to take tests and use them as a live documentation of your code, because they're always up to date.
Let'Swift 2019 컨퍼런스에서 RxSwift to Combine 이라고 발표한 자료입니다. 자료 내에 언급되는 코드 링크는 다음과 같습니다.
[BringMyOwnBeer]
• RxSwift/RxCocoa: https://github.com/fimuxd/BringMyOwnBeer-
• Combine/SwiftUI: https://github.com/fimuxd/BringMyOwnBeer-Combine
Slides from talk about Node.js held on JavaScript Fullstack Day at International JavaScript Conference 2019 (https://javascript-conference.com/web-development-architecture/javascript-fullstack-day-from-zero-to-hero/)
The three problems discussed are:
1. "Disconnected" networking apps - how do you handle bad connections.
2. Multiple UIs - how do you adapt to different UI idioms.
3. After release - marketing, customer support, etc.
Most ORMs can optimize querying/joining data to avoid the N + 1 query problem, but it is limited to querying a single database. This session presents a lightweight, purely stateless, and type-safe solution to the N + 1 query problem that can transparently be reused in any microservice environment, which is especially relevant in an event sourcing/CQRS architecture. Through source code examples, the presentation dives into some core java 8 functional patterns to design a simple and user-friendly API that decouples the core logic of querying and efficiently aggregating disparate datasources (REST, NoSQL, database) from the streaming/reactive technology used to connect to those sources (Project Reactor/Spring WebFlux, Akka Stream, RxJava, and so on).
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsVictor Morales
K8sGPT is a tool that analyzes and diagnoses Kubernetes clusters. This presentation was used to share the requirements and dependencies to deploy K8sGPT in a local environment.
A review on techniques and modelling methodologies used for checking electrom...nooriasukmaningtyas
The proper function of the integrated circuit (IC) in an inhibiting electromagnetic environment has always been a serious concern throughout the decades of revolution in the world of electronics, from disjunct devices to today’s integrated circuit technology, where billions of transistors are combined on a single chip. The automotive industry and smart vehicles in particular, are confronting design issues such as being prone to electromagnetic interference (EMI). Electronic control devices calculate incorrect outputs because of EMI and sensors give misleading values which can prove fatal in case of automotives. In this paper, the authors have non exhaustively tried to review research work concerned with the investigation of EMI in ICs and prediction of this EMI using various modelling methodologies and measurement setups.
3. Store is a Java library for effortless, reactive data loading.
Guarantee things [you don’t want to think about] are done in the same way
What is Store?
8. Store Version 1.0 Api
2017
2019
Store [was] a Java library for effortless, reactive data loading built with RxJava
Store<Article> Store = ParsingStoreBuilder.<BufferedSource, String>builder()
.fetcher(this::ResponseAsSource)
.persister(SourcePersisterFactory.create(context.getFilesDir())
.parser(GsonParserFactory.createSourceParser(gson, Article.class))
.open();
Barcode barcode = new Barcode("Article", "42");
store.get(barcode).subscribe(onNext, onError, onComplete)
9. 2017
2019
Fresh == skip memory/persister go directly to fetcher
store.fresh(param).subscribe(onNext, onError, onComplete)
Fresh Skip Caches
10. Store Why You Need User Research
2.0 Released 1 month later (oops!)
2017
2019
11. 3.0 Api Rxjava2
RxSingle instead of Observable
Store<Article> Store = ParsingStoreBuilder.<BufferedSource,ArticleParam, String>builder()
.fetcher(this::ResponseAsSource) //responseBody.source()
.persister(SourcePersisterFactory.create(context.getFilesDir())
.parser(GsonParserFactory.createSourceParser(gson, Article.class))
.open();
ArticleParam param = new ArticleParam("42");
store.get(param).subscribe(onNext, onError)
2017
2019
Store
15. Streaming as first class citizen
2017
2019
2021
fun stream(request: StoreRequest<Key>): Flow<StoreResponse>Output>>
lifecycleScope.launchWhenStarted {
store.stream(StoreRequest.cached(3, refresh = false))
.collect{ }
store.stream(StoreRequest.get(3)) .collect{ storeResponse -> }
Store4 Api
16. Loading|Content|Error Return Types
2017
2019
2021
Store 4
store.stream(StoreRequest.cached(key = key, refresh=true)).collect { response ->
when(response) {
is StoreResponse.Loading -> showLoadingSpinner()
is StoreResponse.Data -> {
if (response.origin == ResponseOrigin.Fetcher) hideLoadingSpinner()
updateUI(response.value)
}
is StoreResponse.Error -> {
if (response.origin == ResponseOrigin.Fetcher) hideLoadingSpinner()
showError(response.error)
}}}}
LCE
17. Using Store 4
Examples are from Firefly for Mastodon
https://github.com/digitalbuddha/Firefly
2017
2019
2021
18. You create a Store using a builder. The only requirement is to include a Fetcher which is just a typealias to a
function that returns a Flow<FetcherResult<ReturnType>>.
//build it
val store = StoreBuilder.from(
Fetcher.of { key: Unit ->
userApi.noti
fi
cations(
authHeader = " Bearer ${oauthRepository.getCurrent()}",
offset = null)
}).build()
//use it
store.stream(StoreRequest.cached(Unit, refresh = true)).map { it.dataOrNull()
}
.collect{response-> }
Fetcher as a Function
2017
2019
2021
45. Mike: What is the bene
fi
t of starting over?
Matt: Hmm
Mike: Is it easier to add old to new or new to old?
46. Some time later… (half hour)
Matt: safeguards will be easier to add to new
Matt: because I don’t understand old
Mike: SGTM as long as all tests are migrated, I also
don’t understand old
Matt: Sure how hard can it be?
50. Few weeks later…
Matt:Just finished last test cases everything passes
Mike: Everything?
Matt: Yup in iOS, android, JVM and JS, I took all the
work https://github.com/aclassen did and got it to pass
tests
63. Can’t do with Store 4
Source of Truth to
Repository
Data Flow
64. interface Updater<Key, Output, Response> {
suspend fun post(key: Key, value: Output):
UpdaterResult
val onCompletion:
OnUpdaterCompletion<Response>?}
Store 5 New Mutation Api
Creating an Updater (like a fetcher)
82. What we think you should do
Resolve conflicts on remote
83. On each write request
1. Init thread safety (key-scoped)
2. Add request to stack (key-scoped)
3. Write to memory cache + SOT!!!
4. Try to update network (posting latest)
Mutations In the Weeds
84. On each write request
1. Init thread safety (key-scoped)
2. Add request to stack (key-scoped)
3. Write to memory cache + SOT!!!
4. Try to update network (posting latest)
In the Weeds
Mutations
85. On each write request
1. Init thread safety (key-scoped)
2. Add request to stack (key-scoped)
3. Write to memory cache + SOT!!!
4. Try to update network (posting latest)
In the Weeds
Mutations
86. On each write request
1. Init thread safety (key-scoped)
2. Add request to stack (key-scoped)
3. Write to memory cache + SOT!!!
4. Try to update network (posting latest)
In the Weeds
Mutations
87. When network response
1. Success
1. Reset stack
2. Reset bookkeeper
2. Failure
1. Log with bookkeeper
Try to update network
88. When network response
1. Success
1. Reset stack
2. Reset bookkeeper
2. Failure
1. Log with bookkeeper
Try to update network
89. When network response
1. Success
1. Reset stack
2. Reset bookkeeper
2. Failure
1. Log with bookkeeper
Try to update network
90. When network response
1. Success
1. Reset stack
2. Reset bookkeeper
2. Failure
1. Log with bookkeeper
Try to update network
91. When network response
1. Success
1. Reset stack
2. Reset bookkeeper
2. Failure
1. Log with bookkeeper
Try to update network
97. data class FeatureFlag(
val key: String,
val name: String,
val description: String,
val kind: Kind,
val version: Int,
val creationDate: Long,
) : Identi
fi
able<String> {
enum class Kind { Boolean, Multivariate}}
Trails Feature Flag Model
98. Trails Feature Flag Status Model
sealed class FeatureFlagStatus: Identi
fi
able<String> {
data class Multivariate(
val key: String,
val value: FeatureFlagVariation,
val lastRequested: Long,
val links: Links)}
101. Network Feature Flag Status Fetcher
With Fallback
val networkFetcher = Fetcher.ofWithFallback(
name = “networkFetcher”,
fallback = hardcodedFetcher
) { key ->
when (key) {
is Collection -> fetchFeatureFlagStatuses(key.userId)
is Single -> fetchFeatureFlagStatus(key.userId, key.
fl
agId)}}
102. Hardcoded Feature Flag Status Fetcher
val hardcodedFetcher = Fetcher.of(
name = “hardcodedFetcher”
) { key ->
when (key) {
is Collection -> loadFeatureFlagStatuses(key.userId)
is Single -> loadFeatureFlagStatus(key.userId, key.
fl
agId)}}
103. Build Store as normal
val store = StoreBuilder.from(
fetcher = networkFetcher,
sourceOfTruth = sourceOfTruth,
memoryCache = multiCache
).toMutableStoreBuilder<FeatureFlagStatusData,
FeatureFlagStatusData>().build(
updater = updater,
bookkeeper = bookkeeper)