35

Front End Architecture in a World of AI

 4 years ago
source link: https://www.tuicool.com/articles/NVNFvmb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

At QCon New York 2019 , Front End Software engineer Thijs Bernolet of Oqton explained some of the challenges in creating front end architectures influenced by machine learning.

Looking back to Eternal moonwalk , created in 2009 by Bernolet and his team, he remarked that in 2009 it was not possible to easily manage, tag, and edit the uploading of 15,000 videos in three days. But in today's world of machine learning, there are many possibilities and challenges.

According to Bernolet, the primary challenge with machine learning influencing the user interface is the sharing of state between UI code and machine learning logic, overlapping with data models representing users. Foundations of a sound user interface logic typically rely on principles of loose coupling and high cohesion. Machine learning agents tend to impact infrastructure, data models, and business logic, breaking the UI foundational paradigms.

Bernolet explains that traditional UI models such as MVC degrade due to the introduction of tight coupling between the model and view layers. His team started investigating Redux and asked the question if Redux could also be used by machine learning agents, with action sequences as training actions.

Bernolet demonstrated his proof of concept for a Redux CLI , and he appreciates the Redux ecosystem support for features like undo/redo, time travel, handling of side effects, and Redux devtools .

Bernolet ran into issues in managing distributed state with Redux, including merging states and race conditions. Explorations included operational transforms (OT), and Conflict-free replicated data (CFRD) types. Their team started to consider the management of these challenges might get solved by leveraging git rebase style operations with OT in the browser, which resulted in a git-js proof of concept .

The talk highlights some of the challenges of working with Redux in distributed state systems. Alternatives to Redux that might solve similar challenges could include solutions based on JSON patch such as @dojo/framework/stores and json-patch-ot .

The combination of Redux and client-side git with OT solves Bernolet and his team's use case for optimizing the manufacturing process through a combination of user and machine learning inputs. And this approach, had it existed ten years earlier, might have simplified the development of Eternal Moonwalk.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK