Can Cloud‑Native Development Redefine Code Architecture? Introducing Water
The article explores Tencent's Nocalhost cloud‑native development tool and proposes a new "Water" code architecture that stores programs as language‑agnostic intermediate representations like AST, enabling real‑time, language‑independent development environments and finer‑grained permission control.
Overview
Nocalhost demonstrates that a development environment can be hosted entirely in the cloud. Inspired by low‑code trends, the author proposes a next‑generation “Water” architecture that treats source code as a set of intermediate representations (AST, HIR, MIR) rather than as language‑specific text files.
In the Water model the human‑written program is not stored as a string of source code. Instead the UI presents a generic AST, and the persistent form is a binary or serialized intermediate representation. This decouples code from the operating system’s file system and enables function‑level granularity.
Key Technical Components
Real‑time Development Environment : A browser‑based IDE renders code directly from a generic AST, providing instant feedback without local files.
Language‑agnostic Editor : The editor receives a language‑independent AST and can present or edit the code in any programming language.
Binary AST Transfer : Code is transmitted between client and cloud as a compact binary AST, reducing bandwidth and eliminating file‑system constraints.
Cloud Environment : Composed of a cloud‑native dev platform, an architecture engine, and a language database.
Architecture Engine
OS‑independent planning – architecture is defined without folders or files.
Automated semantic planning – the engine can infer module boundaries and dependencies.
Future support for class‑graph visualisation in a graph database.
Design Rationale
Traditional layered architectures rely on directories and files because developers depend on the OS file system. By abstracting code into ASTs, the Water model removes this limitation, allowing storage, versioning, and permission management at the function level rather than at the repository level.
Language‑Independent Storage
The stored form is an AST‑based DSL. Developers can write in any language (e.g., Java, JavaScript) and the same underlying model can be rendered in the language of their choice. This enables cross‑language collaboration without translation layers.
package com.phodal.water; // source file path: com/phodal/waterFine‑Grained Permission Management
Permissions can be applied to individual functions, aligning with the “Typeflow” concept where specific business code sets are protected per developer.
Automation and Data‑Centric View
Because code is treated as data, it can be stored in a graph database and automatically organised using clustering algorithms. This supports a “code‑as‑data” perspective where even binary packages (e.g., Android dex files) are transportable data blobs.
Comparison with Serverless
The deployment model resembles Serverless—functions are the smallest execution unit—but Water integrates compilation and deployment into a single unified flow, potentially offering faster iteration for complex applications.
Technical References
GitHub repository: https://github.com/phodal/water
Related projects: https://github.com/phodal/cloud-dev, https://github.com/phodal/clean-frontend, https://github.com/phodal/layer-architecture
The Water concept is experimental; open questions remain about storage formats, database integration, and tooling, but it outlines a concrete direction for future cloud‑native development platforms.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
phodal
A prolific open-source contributor who constantly starts new projects. Passionate about sharing software development insights to help developers improve their KPIs. Currently active in IDEs, graphics engines, and compiler technologies.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
