architecture

LinkedIn, Allen Holub

🪕 1. The Software Architect

UML: Unified Modeling Language, xmind

📑 Modern Architects

Agile Software Development (incremental design)

An Agile Architect (Servant 仆人 Leader) duty:

  • teaching, coaching, coordinating

  • main design responsibility: assures coherence(连贯性) across the system (reviews work, makes suggestions, helps refine process)

  • guide, direction, collaboratively, make decisions

  • Researching is part of job: programmers, conferences, vendors, operations

Daily work

  • 9:00am meeting: ba, po, tech leader, scrum master, developers, ui/ux designers, db experts, testers, devops,

  • 10:30am: Sprint Review

  • 2:00pm: techincal understanding and availibility, trade-offs(权衡), innerconnections, etc(open-source research, license, dependencies, firewall setup, backup, searching engines, kubernates, i18n, cloud/api integration)

  • meetup, work collaboratively

Good Architecture

  • Simplicity

  • Maintainability

  • Testability

📑 Thinking Architecturally

  • Conway's law: Architecutre and organization structure

  • Story: a description of the user's work - a story touches every piece of the system

  • Agile Incremental Designs: Customer, Stories, Technology

  • DDD (Domain-Driven Design): The structure of your code should map to the structure of the problem domain.( =300x200)

  • ubiquitous language(无处不在的语言) in DDD: universal notation, such as SKU=order item,

  • JIRA, Sticky notes

    -

📑 System vs. enterprise architecture (EA)

Broad architectural patterns

📑 monolith 整体式

  • homogeneous (同质) structure, heterogeneous (异质), Protocol Aware Heterogeneous Interoperability (协议感知异构互操作性)

  • N-Tier

📑 Microkernel(plugin) architecture

  • Isolation prevents big ball-of-mud dependencies

  • Plugins are small and easy to write, debug, and maintain

📑 Message-based architectures

  • producer, broker, consumer

  • Pub/Sub Model

  • messaging infrastructure

📑 Microservices and miniservices

  • Small (few hundred lines of source codes)

  • independently deployable

  • fully autonomous(自主性)

  • distributed

  • Highly observable

  • Modeled around business concepts

📑 Reactive and choreographed(编排) systems

🪕 2. Microservices Foundations

  • Decompositions, System Decompositions

  • polyglot (多种语言) development support

  • All communications over ReST/GraphQL

  • The stages of evolution in modern software servicce architectures, from oldest to most modern are: N-Tier, SOA, Microservices

  • BPEL (Business Process Execution Language) is an XML-based language that allows Web services in a service-oriented architecture (SOA) to interconnect and share data. Programmers use BPEL to define how a business process that involves web services will be executed.

  • ACID: atomic, consitent, isolated, durable transaction

  • BASE

🪕 3. Node.js: Design Patterns

📑 Creational Patterns

  • singleton

  • prototype

  • factory

  • builder

    class Person {
        constructor(builder) {
            this.name = name;
            this.isEmployee = builder.isEmployee;
            this.shoppingList = builder.shoppingList || [];
        }
        toString() {
            return JSON.stringify(this);
        }
    }
    class PersonBuilder {
        constructor(name) {
            this.name = name;
        }
        makeEmployee() {
            this.isEmployee = true;
            return this;
        }
        build() {
            return new Person(this);
        }
    }
    const bill = new PersonBuilder("Bill").makeEmployee().makePartTime().build();
    console.log(bill.toString());

📑 Structural Patterns

  • adapter: 兼容不同环境,比如 browser 环境和 nodejs 环境的兼容。

  • proxy

  • composite 综合

  • decorator

See github/jxjwilliam/my-package

📑 Behaviral Patterns

  • command

  • iterator

  • observer

  • strategy

See node-js-design-patterns

🪕 4. Software Architecture Patterns

📑 Design Patterns vs. Architecture Patterns (higher level)

📑 Categories of patterns (3)

  • Application Landscape Patterns

    • Monolith

    • N-tier (BusinessTier, DataTier, PresentationTier, ...)

    • Service-oriented

    • Microservices

    • Serverless

    • Peer-to-peer (discoverable)

  • Application Streucture Patterns

    • Layered

    • Microkernel

    • Command Query Responsibility Segregation (CQRS)

    • Event sourcing

    • Command Query Responsibilityy Segregation and event souring combined

  • User Interface Patterns

    • Model-view-controller(MVC)

    • Model-view-presenter (MVP)

    • Model-view-viewmodel (MVVM)

📑 Application Landscape Patterns

  • SOA: Service-Oriented Architecture

  • Microservices

    • Docker, containers

    • No logic-heavy enterprise serivce bus

    • Teams run multiple services independently

    • Each service is a business activity

    • Loosely coupled and easily scalable, reliability, designed to handle failures

  • Serverless

    • Backend as a Service

    • Function as a Service

    • Cold Start

    • AWS cloud

  • Peer-to-Peer

    • Share resources

📑 Application Structure Patterns

  • Layered

    • Easy to organize

  • Microkernel: Plugin Pattern, flexibility, separate

    • Taskk scheduler

    • Workflow

    • Data processing

    • Browser

    • Graphic designer

📑 UI Patterns

MVC, MVP, MVVM Similarities:

  • Decoupling view and model

  • Extra component in between

  • Increased testability

  • Web: MVC; Desktop: MVP; Morden/Mobile: MVVM

Last updated

Was this helpful?