top of page
Search
  • Akmod

Scalable Distributed App Development With POP

In the ever-evolving world of software development, a new paradigm is making waves: Plugin Oriented Programming (POP). As an early adopter and primary maintainer of POP, I've had firsthand experience with its transformative potential. In this post, I'll delve into what makes POP unique, its practical applications, and its exciting future.


Understanding POP

POP stands apart from traditional programming paradigms by its unique focus on namespaces. Unlike Object-Oriented Programming (OOP), which relies on polymorphism, objects, and inheritance, POP operates on a different structure. Everything in POP is built off the namespace on the hub, comprising plugin subsystems (subs) and plugins (simply Python modules). This approach is akin to a computer's filesystem, where every file exists under root "/". In POP, everything merges onto this singular, elegant structure, allowing for dynamic namespaces and the seamless integration of multiple projects.


The modular nature of POP is one of its standout features. Projects like idem-aws demonstrate this by extending the dynamic namespaces of it's base project, idem, adding states and exec module plugins onto the states and exec subsystems set up by idem. This modularity ensures that each component stays separate yet integrated, much like files in a well-organized filesystem.


Extending Distributed Applications in POP

POP introduces the concept of app merging, both vertically and horizontally. Vertical merging occurs when a project like idem-aws builds on top of an existing project (idem), using idem's hub but adding its own functionality. Horizontal merging, on the other hand, involves bringing another project's functionality into your project, as idem does with pop-config and acct. This process is like building with Legos, where each piece connects to create a cohesive whole.


In POP, dynes (Dynamic Namespaces) play a crucial role. They facilitate app-merging to extend functionality across projects. However, it's up to the developers to ensure that namespaces are redundant and collision-free. You will often see redundantly nested directories in POP projects -- and this is to make sure that everything is organized and collision-free after app-merging. I should also note that sometimes the collisions are intended -- as a way to completely replace a function with your own custom implementation without having to wait for your code to be merged into someone else's project.


The Dual Definitions of 'Plugin'

Initially, a "plugin" in POP was simply a Python module discovered and added to the hub's namespace. Over time, this term has evolved. Colloquially, POP developers have started referring to entire projects that extend the dynamic namespaces of another project as plugins. Being aware of that distinction will help you navigate any confusing use of the word "plugin" in the documentation.


Practical Applications and Challenges

POP's ease of use and organization makes it ideal for collaborative development. Developers can extend the functionality of core projects without the need for forking or submitting excessive pull requests. This decentralized approach fosters a more organic and scalable project growth. Rather than contributing to a single monolith, each plugin can be maintained, tested, and developed by the person or team that cares about it most. This way, a small team doesn't end up managing a monolith.


The Future of POP POP itself is an evolution of Salt's loader. Salt is highly modular and extendible on its own -- and more fully embracing POP's distributed app model could have significant impacts on the scalability of plugin development in Salt.

I foresee even more open-source projects flocking to the Plugin Oriented Programming model. I've experimented with making a QT application with POP and can't believe how easy it was to build and maintain compared to the traditional OOP tangled mess of objects, polymorphism, and inheritance it normally takes to develop a QT app. I hope to see something more done with QT


Conclusion For those new to POP, my advice is simple: dive in and experiment. The creation of distributed apps in POP is not just easy but also incredibly rewarding. I encourage everyone to explore POP and experience its benefits firsthand.


Plugin Oriented Programming is more than just a new way to write code; it's a gateway to a more collaborative, efficient, and scalable future in software development. As we continue to explore and expand its capabilities, the possibilities are limitless.


I invite you to try your hand at POP. Experiment, create, and share your experiences. For more insights and guidance, follow my blog and join the journey into the world of POP.

Recent Posts

See All
bottom of page