Back to Web-Dev/Ember


Wire Protocol/Wire Format

Some way of getting data from point to point

Progressive Web Applications

Web App manifest; json of configurations for browsers, with metadata when you add to home screen

Service Worker is a script that browser runs in teh background, separate from a web page

Local Storage on browser stores strings within the user's web browser


Physics > Hardware > Kernel > Userland > Humans

JS Engines > Libraries > Code

V8 is a JS engine, doesn't generate any intermediate code, instead compiles to machine code at execution




Wordpress-like editing in Ember.


XML-encoded, and dynamically rendered by browser


Small library, supplements tools and conventions for concurrency and asynchrony

Arguements against Callbacks

Callback is any executable code that is passed as an argument to other code, which is expected to call back the argument a some given time. Callbacks may be synchronous or asynchronous.

The call graph is a control flow graph representing relationships between subroutines. A callback cycle can be created and result in a stack overflow. Lots of esoteric call graphs are derived from callback workflows.

Event Driven Architecture

Events in OOP translates to a message. Messages are implemented as methods, which are classic function calls

State Machines offer a solution to callbacks too, but can be extremely large when considering every possible state and transition

Structured Concurrency

TCP uses "sessions", implemented as a process or thread. Session management involves mutable state concurrency which may require several locks, mutexes, callbacks

In javascript, cancelable asynchronous operations are very hard to do with promises, and preventing concurrent execution of two async operations is hard to do with promises

State, Time and Concurrency


Addon structure:

Yarn -- todo

npm is non-deterministic and had performance issues

npm has non-determinism and depends on install order of dependencies. Dependency graphs can be vastly different between machines when the initial state was different, since any duplicated dependencies with different versions live in multiple places in node modules. -- todo

yarn uses the npm registry, tries to fix the shortcomings

Ember Internals -- todo

Classic Action

Closure Action uses action helper, has its own action handler

Initial Render with Glimmer

Stepping through the inital render with the append VM:

  1. append VM steps through the op codes generated by the JIT compilation
  2. constructing register is set depending on the op code
  3. VM frames are created to capture the current state of the append VM
  4. HTML is generated as needed
  5. DOM tree of elements is generated corresponding to the HTML

Glimmer has a ticket based system to avoid recomputing references/rerendering to avoid a large amount of repeated work.

Ember Run Loop defines an order for function actions to be handled. Update VM handles rerenders as needed, for dynamic elements