Polymorph is a project of mine, aiming at creating a smart media platform and ecosystem, that is decentralized, high performance, low latency, easy to use and allows for user composition of the media experience. The currently planned functionality can take Polymorph in many different directions - so exactly where Polymorph will "land" is for the future to tell. The overall direction is clear though. It's about tools for building smart media.
The official website of Polymorph is: plmph.com
The website does not yet contain so much information, so this tutorial series here is currently the best way to learn about the Polymorph project.
What is Smart Media?
The first question you might have after reading the introductory paragraph is: What do I mean by "Smart Media"?
When we switched from using the term "mobile phone" to "smart phone" - what made the new class of phones "smart" was their ability to run applications. Thus, the phone evolved from being a pre-purposed device with a limited, preinstalled set of functions, to being a platform on top of which the end user could decide what apps to install and run - thus repurposing the phone functionality to the end user's needs. Additionally, the phone and the apps actively attempt to anticipate the end users needs and wants (if you let them - they might need to collect data to do so), making smart phones even smarter.
By this standard, the web and web technologies are not "smart". A browser only has 3 core features:
- Load a web page
- Open multiple tabs
- Bookmark the web page
Apart from these 3 features, the web browsers do not really let the end user do much themselves (except perhaps for the Brave browser). There is only client-server functionality built in by default. No peer-to-peer functionality. Users are reduced to "dumb consumers" of whatever content the web developers have the good grace to offer. There is no creativity or emergent behaviour possible. A bit like what tablets are too desktop computers. One device is best for consumption, and the other is great for production too.
Strange, right? Users seemingly are able to use very advanced web applications, desktop applications and mobile applications - yet the browser must be insanely simple, or the users can't figure it out?
This is what I will try to change with project Polymorph - to unleash the creativity of the world.
By smart I mean enabling the user to solve a wide variety of problems (versatility), while being easy enough to use for the average person (ease-of-use). This will of course always be a trade-off between what is possible both technically, and in terms of the time it takes to implement.
It is not enough that Polymorph enables developers to be smart. Polymorph must empower the end user to be smart too.
Additionally, Polymorph should make it easy for both developers and end users to be smart, by being easy to adapt to their needs. This means a lot of sensible default behaviour, and to the extent possible - intelligent automatic adaption to actual usage at runtime.
This leads to the following definition, or goals, for what smart in smart media means:
- Developer controlled versatility.
- End user controlled versatility.
- Intelligent software adaptability.
By media I mean the tools needed to deliver a smart media experience. This includes the end user application, infrastructure, protocols, data formats and content types and formats.
To start out, Polymorph will focus on commonly used media formats such as text document, graphics, charts, presentations, animations, video and audio. Later, Polymorph may add more application style media support too - similar to how web applications work - but according to the Polymorph philosophy.
This leads to the following definition, or goals, for what media in smart media means:
- End user application(s)
- Infrastructure toolkit(s).
- Infrastructure as a service (possibly).
- Data formats
- Content types and formats
- Text documents
- Combinations of the above
Polymorph Major Parts
Polymorph consists of two major parts:
- Polymorph Fabric
- Polymorph App
The Fabric will most likely be open source. The App will probably be a free-to-use app for organizations with fewer users, while having a commercial license for organizations with more users. Where exactly the limit will be between what is "fewer" and "more" users remains to be decided - but at the moment I lean towards the first 100 users being free. That means an organization has to be reasonably large before having to pay for user number 101 and above.
Both of these two major components are explained in a bit more detail in the following sections.
The Polymorph Fabric is a distributed systems infrastructure toolkit. Polymorph Fabric will be able to be used for traditional client-server topologies, but also other topologies such as distributed hash tables and peer-to-peer networks.
Polymorph fabric will have its own polyring peer-to-peer network topology which is designed for efficient media routing, multicast and broadcast as well as geographically based topology, and other fun and useful features. You can read more about how that is intended to work here: Polymorph P2P Network Algorithm .
Polymorph fabric will support asynchronous communication via non-blocking IO. To support this properly and elegantly, a custom concurrency model had to be designed for Polymorph Fabric - based on single-threaded concurrency techniques.
The Polymorph App is an end user application that will function as a kind of "smart media player". The Polymorph App will be able to connect to the Polymorph Fabric to upload and download media - but will also be able to download media via the web (standard HTTP).
The Polymorph App will get its own script language. This script language will enable users to compose media experiences by combining smart media formats in scripts. For instance, combine a slide presentation or an interview (audio or video) with an audio soundtrack etc. Or - interactive exploratory movie where the viewer can select the action at certain points, to make the movie take different directions.
Composability would also make it easier to do commentary on other media clips or compose larger presentations from smaller sections or raw media clips etc. Exactly what we can achieve with composability will be interesting to explore.
It is possible that the Polymorph App will get some collaborative features in the future too - but the first goal is media functionality.
Polymorph Technology Overview
In order to get the two major parts of Polymorph, the app and the fabric, to work together, the Polymorph project requires several other, smaller parts. I imagine these parts (technologies) will look as illustrated in this diagram:
Here is a more structured listing of these parts:
- Polymorph Fabric
- Single-threaded concurrency tools
- Background thread tools
- Asynchronous network IO tools
- Non-blocking network IO tools
- Simple client-server functionality
- Peer-to-peer network functionality
- Polymorph data format
- Polymorph protocol message format
- Polymorph RPC protocol
- Polymorph subscribe-notify protocol
- Polymorph polyring routing protocol
- Polymorph privacy protocol
- Polymorph stream storage
- Polymorph stream processing
- Polymorph VM
- Polymorph Script Specification
- Polymorph UI component specification
- Polymorph media timeline specification
Note: In the diagram above the VM and scripts are illustrated as belonging to the Polymorph app. However, since the VM might be useful in services too, and since the app will anyways need a lot of the tools in the fabric toolkit (e.g. to connect to a fabric), the VM and script language will probably be located in the Polymorph Fabric.
I will explain each of these parts in more detail in a near future.
Functional Similarities in Other Technologies
Polymorph is intended to function as a coherent ecosystem. Even so, the different parts of Polymorph have some functional similarities with other reasonably well-known products and technologies. Polymorph is not intended to be direct alternatives to these products. I only list these similarities to give you an idea about what functionality Polymorph will end up with, based on the functionality of already reasonably well-known products and technologies.
For instance, part of Polymorph will have functionality that is similar to functionality in Kafka, but Polymorph is not intended as a replacement for Kafka. The similarity is only listed to make it easier to understand what Polymorph's functionality will eventually be like.
|Polymorph Part||Other Product / Technology|
|Polymorph Data||MessagePack, CBOR, Protobuf, ION, RION|
|Polymorph Stream Storage||Kafka|
|Polymorph Stream Processing||Java Streams, Kafka Streams, Apache Flink etc.|
|Polymorph Polyring P2P Topology||Chord, Kademlia, Pastry, Tapestry|