SlideShare uma empresa Scribd logo
1 de 73
THE

ARCHITECT
   WAY




                   Jan Jongboom
          Yet Another Conference
         1 October 2012, Moscow
@drbernhard
Program

•Cloud9? 5 minute intro + what's new
• Problems growing your codebase
• Introducing: Architect!
• Lessons learned
Normal developers
JavaScript Developer
Для динамического
программирования, я
  выбираю Cloud9
Debugging
(Smart!) Code completion
Free Linux VM!
Real terminal
Collaboration
See each other type

 Debug together

  Productivity++
Program

•Cloud9? 5 minute intro + what's new
• Problems growing your codebase
• Introducing: Architect!
• Lessons learned
Pure madness
Openshift
Cloud9 datacenter
                    Remote VM




     IDE server     Remote VM




                    Remote VM
Rules of Jan


• A codebase needs modularization
• Modularization abstracts features away
• Teams can work on separate features without
 breaking code
Modularization?

• Node.js has require
• Similar to ‘using’ or ‘import’ in .NET / Java

• Great for abstracting away functionality
• But not for application modularity
Downsides of
           require
•   Relies on the filesystem
    • Two modules, same dependencies?
     Copy or symlink
    • Maps to folder name
• Configuration is hard
• Multiple instances
No dependency
          model
•   Static compilation: build dependency tree on
    compile time
• Dependency tree not good? Compilation
    error!
• Require fails at runtime
Now fix it!

•   Static dependency list
    • Resolve at startup
• Named services
  • No longer require filesystem
• Easy configuration options
Program

•Cloud9? 5 minute intro + what's new
• Problems growing your codebase
• Introducing: Architect!
• Lessons learned
Architect

•Every piece of functionality is a plugin
• Plugins can consume other plugins
• An application is a set of plugins
• Declare entity ‘jan’ with behavior
• Use ‘jan’ to do a presentation
Group functions
  by behavior
Dependency model


Jan (presenter)   Presentation
How to express our
      model

•   Package.json
    • Metadata file (default to node)
• Allows to build dependency tree w/o
    executing code
What’s next?

•Extract the code
• Wrap in Architect plugin code
  • It’s simple!
• Make two plugins
Function signature




Call when done
Architect plugin
           code
•   Module.exports
    • Options, will get to that
    • Imports, everything you ‘consume’
    • Register, invoke when done
Dependencies
    abstracted away

• Easily unit testable
• Mock dependencies
• Assert ‘dance’ function is called 11 times
No black magic

• Dependency model needs to be specified
• Feed Architect a config file
  • Simple array with list of plugins
• Call ‘createApp’
Configuration

•Per-plugin options
• No global options object
• Specify in config file
Options

•Automatically passed in at startup
• Options are also dependencies
• Fail if options aren’t present
  • Use default assertions
Architect makes you think
      of your app as
  chunks of functionality
rather than sets of classes
Think ‘chunks of
      functionality’
•   Implicit type constraints
    • Keep implementation private
• Swap feature implementations
 • Rather than interface implementations
How do we use it?
• Open source version
• Local version (OS + sync)
• Hosted version
  • Normal
  • FTP
  • SSH
Swap feature per
   implementation

•On Open source: talk local filesystem
• On FTP: talk FTP library
• On SSH: log in and talk via a SSH bridge
Here is something
your DI framework
     can’t do
Single node.js process


                         IDE instance   IDE instance
                            (FTP)          (SSH)
     Other code
   (dashboard etc.)
                         IDE instance   IDE instance
                           (Normal)       (Normal)
Architect can do
• Multiple instances of same plugin
• Run independent
  • In separate contexts
• But in the same process
  • Manageable
  • No process overhead
HERE’S SOMETHING
      COOL
Centralized
          eventbus

•Loose coupling between plugins
• No hard dependencies!
• Can also do inter-context communication
React on event
Other plugin




                                Eventbus




                                           Emit event
                                                        Plugin
And now scale up

• Need something inter-server
• Swap it with i.e. Redis PubSub
• Plugins will never notice
• Awesome!
Program

•Cloud9? 5 minute intro + what's new
• Problems growing your codebase
• Introducing: Architect!
• Lessons learned
Modularize in
      feature blocks

•Don’t over engineer
• Don’t create too small blocks
  • They are no interfaces!
Use dependency
      injection

•Architect (javascript)
• StructureMap (.NET)
• Spring (Java)
Avoid context
          switching
•   Less code!
• Less errors!
• Less boilerplate!

•   StructureMap has some basics for this as well
Loose coupling


• Eventbus
• Smaller dependency graph
github.com/c9/yac2012

github.com/c9/architect
Happy coding!
http://c9.io


                   Jan Jongboom
         github.com/janjongboom
                    @drbernhard

Mais conteúdo relacionado

Mais procurados

Python to go
Python to goPython to go
Python to go
Weng Wei
 

Mais procurados (20)

Jenkins & scriptable build
Jenkins & scriptable buildJenkins & scriptable build
Jenkins & scriptable build
 
.NET - The Current Spectrum
.NET -  The Current Spectrum.NET -  The Current Spectrum
.NET - The Current Spectrum
 
Engage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPagesEngage 2019 - De04. Java with Domino After XPages
Engage 2019 - De04. Java with Domino After XPages
 
Sutol 2016 - Automation is developer's friend
Sutol 2016 - Automation is developer's friendSutol 2016 - Automation is developer's friend
Sutol 2016 - Automation is developer's friend
 
Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
 
Алексей Волков "Введение в React Native"
Алексей Волков "Введение в React Native"Алексей Волков "Введение в React Native"
Алексей Волков "Введение в React Native"
 
Take your CFML Legacy Apps to Modernization
Take your CFML Legacy Apps to ModernizationTake your CFML Legacy Apps to Modernization
Take your CFML Legacy Apps to Modernization
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
All out on the Cloud - PloneConf 2012
All out on the Cloud - PloneConf 2012All out on the Cloud - PloneConf 2012
All out on the Cloud - PloneConf 2012
 
React Native
React NativeReact Native
React Native
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
 
Hashicorp at holaluz
Hashicorp at holaluzHashicorp at holaluz
Hashicorp at holaluz
 
React native-meetup-talk
React native-meetup-talkReact native-meetup-talk
React native-meetup-talk
 
Python to go
Python to goPython to go
Python to go
 
The Three Musketeers
The Three MusketeersThe Three Musketeers
The Three Musketeers
 
Don Wibier
Don WibierDon Wibier
Don Wibier
 
React talk, GrunnJs 24 September 2014
React talk, GrunnJs 24 September 2014React talk, GrunnJs 24 September 2014
React talk, GrunnJs 24 September 2014
 
Javantura v4 - The power of cloud in professional services company - Ivan Krn...
Javantura v4 - The power of cloud in professional services company - Ivan Krn...Javantura v4 - The power of cloud in professional services company - Ivan Krn...
Javantura v4 - The power of cloud in professional services company - Ivan Krn...
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java Developer
 
Introduction To AOP
Introduction To AOPIntroduction To AOP
Introduction To AOP
 

Destaque

Building GPE: What We Learned
Building GPE: What We LearnedBuilding GPE: What We Learned
Building GPE: What We Learned
rajeevdayal
 

Destaque (6)

Architecting large Node.js applications
Architecting large Node.js applicationsArchitecting large Node.js applications
Architecting large Node.js applications
 
Building GPE: What We Learned
Building GPE: What We LearnedBuilding GPE: What We Learned
Building GPE: What We Learned
 
A Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for WicketA Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for Wicket
 
So, you want to be a plugin developer?
So, you want to be a plugin developer?So, you want to be a plugin developer?
So, you want to be a plugin developer?
 
Run your JavaScript app for years on a coin cell - JSConf.asia 2016
Run your JavaScript app for years on a coin cell - JSConf.asia 2016Run your JavaScript app for years on a coin cell - JSConf.asia 2016
Run your JavaScript app for years on a coin cell - JSConf.asia 2016
 
How to prevent an Internet of Shit - AMSxTech 2017
How to prevent an Internet of Shit - AMSxTech 2017How to prevent an Internet of Shit - AMSxTech 2017
How to prevent an Internet of Shit - AMSxTech 2017
 

Semelhante a The Architect Way

Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
Hannes Lowette
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
rsebbe
 

Semelhante a The Architect Way (20)

Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOps
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
Introduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald BelchamIntroduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald Belcham
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
 
Php on Windows
Php on WindowsPhp on Windows
Php on Windows
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
 
Native App Development for iOS, Android, and Windows with Visual Studio
Native App Development for iOS, Android, and Windows with Visual StudioNative App Development for iOS, Android, and Windows with Visual Studio
Native App Development for iOS, Android, and Windows with Visual Studio
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & How
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
 
Mobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great againMobile Fest 2018. Алексей Лизенко. Make your project great again
Mobile Fest 2018. Алексей Лизенко. Make your project great again
 
CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development CrossWorlds: Unleash the Power of Domino for Connections Development
CrossWorlds: Unleash the Power of Domino for Connections Development
 

Mais de Jan Jongboom

Intelligent Edge - Getting started with TinyML for industrial applications
Intelligent Edge - Getting started with TinyML for industrial applicationsIntelligent Edge - Getting started with TinyML for industrial applications
Intelligent Edge - Getting started with TinyML for industrial applications
Jan Jongboom
 
Develop with Mbed OS - The Things Conference 2019
Develop with Mbed OS - The Things Conference 2019Develop with Mbed OS - The Things Conference 2019
Develop with Mbed OS - The Things Conference 2019
Jan Jongboom
 

Mais de Jan Jongboom (20)

TinyML on Arduino - workshop
TinyML on Arduino - workshopTinyML on Arduino - workshop
TinyML on Arduino - workshop
 
Intelligent Edge - Getting started with TinyML for industrial applications
Intelligent Edge - Getting started with TinyML for industrial applicationsIntelligent Edge - Getting started with TinyML for industrial applications
Intelligent Edge - Getting started with TinyML for industrial applications
 
Teaching your sensors new tricks with Machine Learning - Eta Compute webinar
Teaching your sensors new tricks with Machine Learning - Eta Compute webinarTeaching your sensors new tricks with Machine Learning - Eta Compute webinar
Teaching your sensors new tricks with Machine Learning - Eta Compute webinar
 
Get started with TinyML - Embedded online conference
Get started with TinyML - Embedded online conferenceGet started with TinyML - Embedded online conference
Get started with TinyML - Embedded online conference
 
Adding intelligence to your LoRaWAN deployment - The Things Virtual Conference
Adding intelligence to your LoRaWAN deployment - The Things Virtual ConferenceAdding intelligence to your LoRaWAN deployment - The Things Virtual Conference
Adding intelligence to your LoRaWAN deployment - The Things Virtual Conference
 
Get started with TinyML - Hackster webinar 9 April 2020
Get started with TinyML - Hackster webinar 9 April 2020Get started with TinyML - Hackster webinar 9 April 2020
Get started with TinyML - Hackster webinar 9 April 2020
 
Tiny intelligent computers and sensors - Open Hardware Event 2020
Tiny intelligent computers and sensors - Open Hardware Event 2020Tiny intelligent computers and sensors - Open Hardware Event 2020
Tiny intelligent computers and sensors - Open Hardware Event 2020
 
Teaching your sensors new tricks with Machine Learning - CENSIS Tech Summit 2019
Teaching your sensors new tricks with Machine Learning - CENSIS Tech Summit 2019Teaching your sensors new tricks with Machine Learning - CENSIS Tech Summit 2019
Teaching your sensors new tricks with Machine Learning - CENSIS Tech Summit 2019
 
Adding intelligence to your LoRaWAN devices - The Things Conference on tour
Adding intelligence to your LoRaWAN devices - The Things Conference on tourAdding intelligence to your LoRaWAN devices - The Things Conference on tour
Adding intelligence to your LoRaWAN devices - The Things Conference on tour
 
Machine learning on 1 square centimeter - Emerce Next 2019
Machine learning on 1 square centimeter - Emerce Next 2019Machine learning on 1 square centimeter - Emerce Next 2019
Machine learning on 1 square centimeter - Emerce Next 2019
 
Fundamentals of IoT - Data Science Africa 2019
Fundamentals of IoT - Data Science Africa 2019Fundamentals of IoT - Data Science Africa 2019
Fundamentals of IoT - Data Science Africa 2019
 
17,000 contributions in 32K RAM - FOSS North 2019
17,000 contributions in 32K RAM - FOSS North 201917,000 contributions in 32K RAM - FOSS North 2019
17,000 contributions in 32K RAM - FOSS North 2019
 
Open Hours: Mbed Simulator
Open Hours: Mbed SimulatorOpen Hours: Mbed Simulator
Open Hours: Mbed Simulator
 
Efficient IoT solutions based on LoRaWAN, The Things Network and Mbed OS
Efficient IoT solutions based on LoRaWAN, The Things Network and Mbed OSEfficient IoT solutions based on LoRaWAN, The Things Network and Mbed OS
Efficient IoT solutions based on LoRaWAN, The Things Network and Mbed OS
 
Machine learning on 1 cm2 - Tweakers Dev Summit
Machine learning on 1 cm2 - Tweakers Dev SummitMachine learning on 1 cm2 - Tweakers Dev Summit
Machine learning on 1 cm2 - Tweakers Dev Summit
 
Simulating LoRaWAN devices - LoRa Alliance AMM 2019
Simulating LoRaWAN devices - LoRa Alliance AMM 2019Simulating LoRaWAN devices - LoRa Alliance AMM 2019
Simulating LoRaWAN devices - LoRa Alliance AMM 2019
 
Develop with Mbed OS - The Things Conference 2019
Develop with Mbed OS - The Things Conference 2019Develop with Mbed OS - The Things Conference 2019
Develop with Mbed OS - The Things Conference 2019
 
Firmware Updates over LoRaWAN - The Things Conference 2019
Firmware Updates over LoRaWAN - The Things Conference 2019Firmware Updates over LoRaWAN - The Things Conference 2019
Firmware Updates over LoRaWAN - The Things Conference 2019
 
Faster Device Development - GSMA @ CES 2019
Faster Device Development - GSMA @ CES 2019Faster Device Development - GSMA @ CES 2019
Faster Device Development - GSMA @ CES 2019
 
Mbed LoRaWAN stack: a case study - LoRa Alliance AMM Tokyo
Mbed LoRaWAN stack: a case study - LoRa Alliance AMM TokyoMbed LoRaWAN stack: a case study - LoRa Alliance AMM Tokyo
Mbed LoRaWAN stack: a case study - LoRa Alliance AMM Tokyo
 

The Architect Way

Notas do Editor

  1. \n
  2. Hi!\n
  3. Last year also present. Today I won't be speaking about Cloud9 itself, but rather about the framework that helped us progress in the past year.\n
  4. Last year also present. Today I won't be speaking about Cloud9 itself, but rather about the framework that helped us progress in the past year.\n
  5. The world is all about the web, from viewing information to online banking to editing documents: you won't have to leave your browser. \n
  6. But why do the offline developers have all the perks? Great IDEs, integrated testing suites, static compilation, language analysis? But when you write javascript, the language of the web:\n
  7. not so much. They are just happy with syntax highlighting.\n
  8. So that's why we decided to build the best IDE for dynamic languages.\n
  9. But other than current IDE's like Eclipse or Visual Studio, we built our IDE on top of the web. Here are some things that you can do with it:\n
  10. Cool IDE features like ‘debugging’\n
  11. Context aware code completion\n
  12. Run everything you want. Because we give you a free VM, true freedom. Java? MemSQL? Already GIT.\n
  13. Fully functional. Real VIM, Telnet, Watch Star Wars ASCII. VM included on every project.\n
  14. Real time code collaboration like in google docs\n
  15. See each other typing, debug together and be more productive!\n
  16. To build these features, our code base has grown to 400,000 lines of code, plus X external modules. All in javascript.\n
  17. Madness! A language without static compilation or type safety. And our server side part is built on node.js, unproven technology when we started.\n
  18. Even worse, part of our architecture is decentralized. Because you get your own VM where all code lives and all processes run. \n
  19. Sounds tedious? The good thing is that we can help YOU grow when your application gets out of hand. Here are the ‘rules of jan’ for a large application.\n
  20. Node.js already has a way to do modularization through the use of 'packages' that you load in via `require`. They are great for abstracting away simple pieces of functionality, but they don't fit for application modules.\n
  21. \n
  22. * Rely on the file system\n * If two modules use the same module, we'll need two copies or a symlink\n * Require calls map to a folder name\n - Give me the folder `database` rather than\n - Give me the service `database`\n* Impossible to pass in options, what to do with the querystring?\n* Multiple instances may be loaded, so no shared state\n
  23. And there is no explicit dependency model. When doing a static typed language, you're creating your dependency graph on compile time. If it doesn't make sense, your app won't compile. If you mistype a dependency that you load through `require` you will only find out when it's too late. At runtime.\n
  24. So to solve this problem we built a library on the following principles:\n\n* Static dependency list, that will be resolved at start up time (next best thing)\n* Use named services, rather than folders on a filesystem\n* Make configuration options easy, e.g. passing in a connection string\n
  25. So here are the main principles of architect:\n
  26. So let's start building an application via architect. We have the following piece of code in node.js, where we put this talk into code:\n
  27. To see if this is a bad function, ask yourself the question: "is this code unit testable?" In this case no: we have two types of behavior that cannot be tested indepedently.\n
  28. And that is what you do in Architect. \n
  29. \n
  30. \n
  31. To tell architect which plugins we want to consume or provide, we use the standard package.json file that is already used in normal node modules, but with some additions.\n
  32. \n
  33. Now we can move the code that declared `jan` into a seperate plugin:\n
  34. \n
  35. There is a little boilerplate added. First is the `module.exports` line. This is the standard format of any architect plugin, and consist of a function call with three arguments:\n\n- Options, we'll get to that later\n- Imports, provides the services you want to consume\n- Register, call after initialization code, provide your service\n
  36. This model can also be applied to the presentation part of our application. Just wrap it into the architect boiler plate code, and as you might have guessed, our `imports` [HIGHLIGHT IMPORTS] object will now contain the plugin we just required.\n
  37. The great thing is that this module is now perfectly unit testable as well. Let's say we want to verify that the `dance` function of our presenter is called 11 times.\n
  38. You have clean code, with managed dependencies, that are easily swapped out or injected. Also in unit tests.\n
  39. Architect is no black magic. We will still need to tell it which plugins should be loaded. It does this via a very simple javascript application containing an array of plugins, and the `createApp` function.\n
  40. In the `createApp` step architect will build a dependency tree, and if it finds an unmet dependency it will throw at startup. For instance, if we remove the `jan` plugin from config.\n\n
  41. If you want to check out this application, it will be available on GitHub today.\n
  42. \n
  43. So let's make the number of dance moves that our presenter makes configurable.\n
  44. These options are automatically passed into your plugin the moment that the initialization code is called. \n
  45. Because architect ensures that the plugin is loaded at the startup of your application you can use default assertions to verify that all options are passed in.\n
  46. When now loading this plugin without the option, the application will not start, but fail with a nice error message and a stack trace pointing to the right plugin.\n\n
  47. \n
  48. Architect allows you to be as specific as you like about your plugin depth. You can write your modules on a very small 'class level', or very high on a feature level. Depending on the size of your application. But the most important lesson:\n
  49. This is great because you can swap packages the same way you would swap implementations of an interface. Because type constraints are implicit, it's also not required to expose the actual types to the outside world. \n\n
  50. Cloud9 IDE is not one single product, we actually have some different flavours:\nDepending on where we run, we load different plugins or even *swap* complete sets of functionality. This happens for example to the filesystem. The consuming plugins will always have a standard interface that they consume:\n
  51. \n
  52. \n
  53. But that's possible with any Dependency Injection framework. Within one Cloud9 process however, multiple IDE's can live, some running FTP, some running SSH; we can spawn an architect application from within another architect application.\n\n
  54. And this has even more advantages than you would think at first glance. Let's presume we are creating a multiplayer online game, but there are multiple games running at the same time.\n\n
  55. Your code will be cluttered with code depending on 'what is the game we're dealing with at this very moment'.\n
  56. With architect we can create multiple instances of the same plugin, each running completely independent of eachother in a different context in the same process. So still manageble, and no process overhead.\n\nWhen someone starts a new game, we can create a new architect application.\n
  57. The code in the plugin will **never** have to deal with context switching, checking which game it runs, etc. Because **all** code will run in a seperate per-game context.\n
  58. \n
  59. So here is something else that you can build, a centralized eventbus in your application, that ALL plugins can use to send / receive data without creating hard dependencies.\n
  60. \n
  61. \n
  62. All plugins can now hook into this by referencing the eventbus.\n
  63. \n
  64. And if you want something inter-process, replace the `eventbus` plugin by something like Redis PubSub. Your plugins will never notice!\n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. You can find Cloud9's source on GitHub, at github.com/ajaxorg/cloud9, including all libraries like VFS under /c9 or /ajaxorg. The editor is under ajaxorg/ace.\n
  71. \n
  72. \n