Unison - A new approach to Distributed computing, Storing Code, etc.

  • Thread starter elcaro
  • Start date
In summary, Unison introduces a novel paradigm for distributed computing that emphasizes the management and storage of code across various devices. It enables seamless synchronization of code and state, allowing developers to work collaboratively on projects without the complexities of traditional version control systems. Unison's unique approach ensures that code remains consistent and accessible, facilitating efficient execution and deployment in distributed environments.
  • #1
elcaro
128
30
TL;DR Summary
Some years ago I posted a message about the idea of storing source code ino a (relational) database in its semantic form (AST-Abstract Synta Tree), instead of text-files. I can't find that post anymore. But here is a new post about this topic, and about a recent implementation about this idea in the form of the Unison programming language and development environment.
Most progrmming languages and programming environments work at the basis of a textual representation of the code, and all tools to built the executables or libraries are based on acessing text files, including the built tools, version control systems and compilers and such. There are not much noteworthy exceptions to this, except perhaps SmallTalk, which nowadays is not used very often.
To change from text-based storing and processing of source code to a storage format that stores the semantic form of the code (in the form of the Abstract Syntax Tree) is therefore a major paradigm shift.

There are both advantages and disadvantages to this:
pro:
The tools for compiling/generating code have already knowledge about all the dependencies of the code. After submitting code to the editor (UCM - Unison Codebase Manager) the AST of the code block is produced and from that a hashvalue (SHA512) is computed and stored. Different code will generate different hashes and hash collisions is almost impossible. All kind of code management, like refactoring, renaming, are much easier to perform, and don't have the disadvantage that regular text-base tools have of leaving the code in an invalid intermediate state. Actions like renaming variables or functions are in fact a no-op, which doesn't break the code nor involves recompiling or rebuilding the code. Distributing the code to other systems is also very easy, if the system already runs Unison, it would just involve sending the hashvalue. If the hashvalue already exists on that platform, it can handle (execute) the code, if not, it can ask for the code to be handed over in byteformat, and all dependencies will automatically be handled.

con:
This new format for storing and developing code is a huge break with existing (text-based) code development, and will require time before it becomes adapated widespread. Existing code bases can (as of yet) not be transformed to Unison, but maybe in the future tools will be developed to migrate from existing platforms to Unison. Existing tools for building/compiling software will not work with Unison (but Unison provides a rich set of tools for that kind of work, which potentially are even more capable as existing tools for program development).

As an introduction to Unison, here are some links to video conversations about Unison, and links to the main website.
Rethinking Distributed Programming with Unison Lang (with Rúnar Bjarnason)
Rúnar Bjarnason - Unison
"Unison: a new distributed programming language" by Paul Chiusano
Rúnar Bjarnason, "Unison: A Friendly Programming Language from the Future"

Official website of Unison lang:
Unison-lang website
 
Technology news on Phys.org
  • #2
It looks like Unison is yet another language, one that believes it is better than all the others. Pardon the cynicism, but I have seen this happen many times before.

Come the revolution, things will be different, not better, just different.
 
  • Like
Likes Vanadium 50, PeterDonis and phinds
  • #3
elcaro said:
TL;DR Summary: Some years ago I posted a message about the idea of storing source code ino a (relational) database in its semantic form (AST-Abstract Synta Tree), instead of text-files. I can't find that post anymore. ...

Would that be all of two years ago ? And rather easy to find ...

:rolleyes:

##\ ##
 
  • Like
  • Haha
Likes pbuk, Vanadium 50 and elcaro
  • #4
Baluncore said:
It looks like Unison is yet another language, one that believes it is better than all the others. Pardon the cynicism, but I have seen this happen many times before.

Come the revolution, things will be different, not better, just different.
It might be, we don't know. There are many cases in which mass adaptation of a breaking technology didn't happen, but sometimes it does happen. What I guess has to happen is that existing development platforms have a path to migrate to Unison, else they will not switch to using Unison. That is why older technologies are still around (FORTRAN, COBOL)....
 
  • #5
BvU said:
Would that be all of two years ago ? And rather easy to find ...

:rolleyes:

##\ ##
I guess you are better as me in finding old posts.... Thx!!
 
  • #7
elcaro said:
TL;DR Summary: storing source code ino a (relational) database in its semantic form (AST-Abstract Synta Tree), instead of text-files. I can't find that post anymore.
Is this secretly ironic?
Baluncore said:
It looks like Unison is yet another language, one that believes it is better than all the others. Pardon the cynicism, but I have seen this happen many times before.
FORTRAN was.

Seriously.

Pre-FORTRAN, your choices were assembly and assembly. FORTRAN was the first commercial higher-level language in wide use. It made pretty much everything easier.

Follow-ons were better in one thing or another (at best - some were universally worse or different to be different) but FORTRAN was a language that improved everything. It basically killed assembly-language programming except for special cases, e.g. operating system noot loaders.

FORTRAN was a huge step. All subsequent steps have been smaller.
 
  • Like
  • Love
Likes BvU and dlgoff
  • #8
Vanadium 50 said:
Is this secretly ironic?

FORTRAN was.

Seriously.

Pre-FORTRAN, your choices were assembly and assembly. FORTRAN was the first commercial higher-level language in wide use. It made pretty much everything easier.

Follow-ons were better in one thing or another (at best - some were universally worse or different to be different) but FORTRAN was a language that improved everything. It basically killed assembly-language programming except for special cases, e.g. operating system noot loaders.

FORTRAN was a huge step. All subsequent steps have been smaller.
Correct. The invention of the FORTRAN programming language and similar programming languages (COBOL, ALGOL) was a huge step forward.

But are better programming languages / programming environments, like the one Unison hopes to offer, which can offer another huge step forward possible?

Unison does not just offer a new programming language - there are many other programming languages that offer advantages for programmers (like Rust, Zig, etc.) but none of them are too breaking - but offers a new way of storing program information. Unlike most other programming languages (with the exception perhaps of SmallTalk) which store and process program infiormation in the form of text files, Unison stores the Abstract Syntax Tree in a database, and all development tools (built tools and version control tools) work with that format.
 

FAQ: Unison - A new approach to Distributed computing, Storing Code, etc.

What is Unison and how does it differ from traditional distributed computing frameworks?

Unison is a new programming language and platform designed for distributed computing and code storage. Unlike traditional frameworks that rely on separate mechanisms for code distribution and execution, Unison integrates these aspects directly into the language. This allows code to be stored, shared, and executed seamlessly across multiple nodes in a distributed system, simplifying the development and deployment process.

How does Unison handle code versioning and updates in a distributed environment?

Unison employs a unique approach to code versioning by using content-addressable storage. Each piece of code is identified by a hash of its content, ensuring that any changes create a new, distinct version. This allows Unison to manage dependencies and updates efficiently, as nodes can reference specific versions of code and update only when necessary, reducing the risk of inconsistencies and conflicts.

What are the main benefits of using Unison for distributed computing projects?

Unison offers several key benefits for distributed computing projects, including simplified code distribution, automatic dependency management, and improved consistency across nodes. Its content-addressable storage model ensures that code is uniquely identified and easily shareable, while its integrated approach reduces the complexity of managing distributed systems. Additionally, Unison's design promotes better collaboration and version control, making it easier to maintain and scale projects.

Can Unison be integrated with existing systems and technologies?

Yes, Unison is designed to be interoperable with existing systems and technologies. It can work alongside traditional programming languages and frameworks, allowing developers to gradually adopt Unison without needing to overhaul their entire codebase. Unison's ability to interface with existing APIs and services makes it a flexible choice for enhancing distributed computing capabilities in a variety of environments.

What are the potential challenges or limitations of using Unison?

While Unison offers many advantages, there are potential challenges to consider. The learning curve for adopting a new programming language and paradigm can be steep, especially for teams accustomed to traditional methods. Additionally, as a relatively new technology, Unison may lack the extensive community support and libraries available for more established languages. However, its innovative approach to distributed computing and code management holds significant promise for overcoming these challenges as it matures and gains wider adoption.

Back
Top