The document discusses the Command Query Responsibility Segregation (CQRS) pattern for application design. CQRS separates read and write operations into different models to improve performance and scalability. The write model contains the business logic and data model, while the read model is optimized for querying. Events are used to propagate changes from the write model to updates in the read model. This allows separating read and write concerns for better scalability across services.
The document discusses Node.js and asynchronous I/O. It explains that Node.js is an asynchronous event-driven JavaScript runtime that uses a single-threaded model with non-blocking I/O to handle high volumes of simultaneous connections efficiently. It also discusses how Node.js handles asynchronous operations using an event loop and callback functions instead of blocking operations.
This document provides an overview of reactive programming concepts like state, time, sync vs async operations, futures and promises. It discusses different approaches to reactive programming in Java like using CompletableFuture, JDeferred and RxJava. It also covers functional programming concepts, data streams, reactive Spring and the future of reactive programming in Java 9 and beyond.
This document provides an overview of single page applications (SPAs), including their motivation, introduction, examples, architecture, advantages and disadvantages, tools, and a demo. SPAs aim to improve user experience by only loading necessary content instead of entire pages when navigating a site. This reduces load times compared to traditional multi-page applications. The document discusses tools like Knockout.js that can be used to build SPAs and notes that server-side code moves to exposing RESTful APIs while client-side code handles navigation and UI logic. It concludes with advertising a demo of an SPA built with John Papa's Hot Towel template to further illustrate SPA concepts.
Angular 14: What's new! explore in-depth the features of Angular 14 and learn how to get started with it. Angular 14 has been released with several significant features.
Hexagonal Architecture - PHP Barcelona Monthly Talk (DDD)Carlos Buenosvinos
This document discusses hexagonal architecture with PHP. It references a talk on domain-driven design from 2005. The main point is that hexagonal architecture allows an application to be driven equally by users, programs, tests or scripts, and to be developed and tested separately from runtime systems and databases. It provides demo code for a basic application demonstrating dependency inversion and another average application demonstrating using transactions and events.
This document provides an overview of Spring MVC, the model-view-controller framework for building web applications in Spring. It discusses Spring MVC's request processing workflow including the front controller and application context. It also covers controllers, mapping requests, returning views and data representation. Key topics include RESTful design, annotations like @RequestMapping and return types, and view resolvers for resolving JSP and other view technologies.
The document discusses the principles of clean architecture. It states that clean architecture aims to minimize human effort required to build and maintain software systems. It emphasizes that the core of an application should be its use cases rather than technical details like databases or frameworks. The architecture should clearly communicate the intent of the system. It also notes that dependencies should flow inward from outer layers like interfaces to inner layers containing core business logic and entities.
The document discusses Node.js and asynchronous I/O. It explains that Node.js is an asynchronous event-driven JavaScript runtime that uses a single-threaded model with non-blocking I/O to handle high volumes of simultaneous connections efficiently. It also discusses how Node.js handles asynchronous operations using an event loop and callback functions instead of blocking operations.
This document provides an overview of reactive programming concepts like state, time, sync vs async operations, futures and promises. It discusses different approaches to reactive programming in Java like using CompletableFuture, JDeferred and RxJava. It also covers functional programming concepts, data streams, reactive Spring and the future of reactive programming in Java 9 and beyond.
This document provides an overview of single page applications (SPAs), including their motivation, introduction, examples, architecture, advantages and disadvantages, tools, and a demo. SPAs aim to improve user experience by only loading necessary content instead of entire pages when navigating a site. This reduces load times compared to traditional multi-page applications. The document discusses tools like Knockout.js that can be used to build SPAs and notes that server-side code moves to exposing RESTful APIs while client-side code handles navigation and UI logic. It concludes with advertising a demo of an SPA built with John Papa's Hot Towel template to further illustrate SPA concepts.
Angular 14: What's new! explore in-depth the features of Angular 14 and learn how to get started with it. Angular 14 has been released with several significant features.
Hexagonal Architecture - PHP Barcelona Monthly Talk (DDD)Carlos Buenosvinos
This document discusses hexagonal architecture with PHP. It references a talk on domain-driven design from 2005. The main point is that hexagonal architecture allows an application to be driven equally by users, programs, tests or scripts, and to be developed and tested separately from runtime systems and databases. It provides demo code for a basic application demonstrating dependency inversion and another average application demonstrating using transactions and events.
This document provides an overview of Spring MVC, the model-view-controller framework for building web applications in Spring. It discusses Spring MVC's request processing workflow including the front controller and application context. It also covers controllers, mapping requests, returning views and data representation. Key topics include RESTful design, annotations like @RequestMapping and return types, and view resolvers for resolving JSP and other view technologies.
The document discusses the principles of clean architecture. It states that clean architecture aims to minimize human effort required to build and maintain software systems. It emphasizes that the core of an application should be its use cases rather than technical details like databases or frameworks. The architecture should clearly communicate the intent of the system. It also notes that dependencies should flow inward from outer layers like interfaces to inner layers containing core business logic and entities.
This document provides an introduction to Node.js, Express, and MongoDB. Node.js is a JavaScript runtime built on Chrome's V8 engine that allows JavaScript to be run on the server-side. Express is a web application framework for Node.js that provides routing capabilities and middleware support. MongoDB is a non-relational database that stores data in flexible, JSON-like documents, rather than using rigid tables. The document discusses the pros and cons of each technology and provides examples of basic usage and configuration.
Slides of my talk at Coding-Berlin November Meetup on 01.11.2017 (https://www.meetup.com/CODING-BERLIN/events/244169839). Also have a look at the demo repo at Github: https://github.com/coding-berlin/vuejs-demo
10 years after the release of the original book Domain Driven Design by Eric Evans we are seeing more and more applications built on the core concepts of DDD. Still, there is a long way to go before we fully grasp all its potential. First we need to change the way we do things in our projects. In this session I will show a possible implementation in C# that I've been using in many projects.
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...Edureka!
This Edureka "What is Node.js" tutorial will help you to learn the Node.js fundamentals and how to create an application in Node.js. Node.js is an open-source, cross-platform JavaScript runtime environment for developing a diverse variety of server tools and applications. Below are the topics covered in this tutorial:
1) Client Server Architecture
2) Limitations of Multi – Threaded Model
3) What is Node.js?
4) Features of Node.js
5) Node.js Installation
6) Blocking Vs. Non – Blocking I/O
7) Creating Node.js Program
8) Node.js Modules
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Steve Pember
In this presentation we will present the general philosophy of Clean Architecture, Hexagonal Architecture, and Ports & Adapters: discussing why these approaches are useful and general guidelines for introducing them to your code. Chiefly, we will show how to implement these patterns within your Spring (Boot) Applications. Through a publicly available reference app, we will demonstrate what these concepts can look like within Spring and walkthrough a handful of scenarios: isolating core business logic, ease of testing, and adding a new feature or two.
This document provides an introduction and overview of Reactjs including:
1. Reactjs core concepts including components, virtual DOM, and JSX
2. React components are self-contained reusable blocks and many companies have open sourced React component libraries
3. The React lifecycle methods for components including initialization, update, and destruction
Kata: Hexagonal Architecture / Ports and Adaptersholsky
Hexagonal architecture is a software architecture pattern coined by Alistair Cockburn in 2005 that aims to make applications highly testable by separating the domain and application logic from the outer parts of an application like the user interface and databases. It uses port and adapter interfaces to connect the domain to the outside world which allows replacing external elements for testing purposes and makes the core logic independent of the outside tools and libraries. This decoupling brings benefits like easier testing without external elements, flexibility to change requirements and services, and emergent design.
Design functional solutions in Java, a practical exampleMarian Wamsiedel
The document discusses different approaches to controlling vehicles remotely using vocal commands in Java, including:
1. An object-oriented approach modeling commands as classes and executing them sequentially.
2. A pure functional approach using immutable functions to model commands and folding them to execute sequentially without side effects.
3. A functional approach with effects, using Try monads to isolate exceptions and allow sequential execution while handling errors.
This document provides an overview of Node.js, including:
- Node.js is an open source, cross-platform JavaScript runtime environment built on Chrome's V8 engine. It has a large developer community.
- Several major companies like Yahoo, Netflix, and LinkedIn use Node.js and have seen significant improvements in performance and scalability compared to other platforms.
- Node.js uses an event-driven, non-blocking I/O model that can handle thousands of concurrent connections with minimal resources. This makes it well-suited for I/O-intensive applications.
- Common Node.js tools and frameworks discussed include NPM, Express, Mongoose, and Socket.io. Examples are
React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It uses virtual DOM which improves performance and can render on both client and server. React encourages a component-based approach where UI is broken into independent reusable pieces that accept external data through properties. Components manage their own state which allows the UI to update over time in response to user input. This makes React code more predictable and easier to debug than traditional two-way data binding.
A brief overview about writing clean code. Presentation made for the Multimedia Languages and Environments course at Politecnico di Torino (academic year 2012/2013).
This document provides an overview of ASP.NET Core and MVC. It discusses the evolution of ASP and ASP.NET, including Web Forms and MVC. It then summarizes the compilation process and high-level architecture of ASP.NET Core. The document also covers creating ASP.NET Core MVC and Web API projects, consuming Web APIs, and integrating JavaScript frameworks like Angular and Knockout.
This document introduces ReactJS, a JavaScript library for building user interfaces. It discusses key React concepts like the virtual DOM, which is a JavaScript representation of real DOM elements that allows React to efficiently update the real DOM by comparing it to a new virtual DOM. It also covers one-way data binding in React, where data flows from parent to child components through props, while events flow in the opposite direction. Finally, it emphasizes that in React, everything is a component, and components manage their own state and receive immutable props from parent components.
The document discusses common concurrency problems in Java like shared mutable state, visibility issues, inconsistent synchronization, and unsafe publication and provides examples of how to properly implement threading concepts like locking, waiting and notifying with synchronization, volatile variables, atomic classes and safe initialization techniques to avoid concurrency bugs. It also cautions against unsafe practices like synchronizing on the wrong objects or misusing threading methods that can lead to deadlocks, race conditions and other concurrency problems.
- React is a JavaScript library for building user interfaces that uses a virtual DOM for faster re-rendering on state changes.
- Everything in React is a component that can have states, props, and lifecycle methods like render(). Components return JSX elements.
- Props are used for passing data to components in a unidirectional flow, while states allow components to re-render on changes.
- The render() method returns the view, accessing props and state values. Forms and events also follow React conventions.
Slides of the talk I gave at ConFoo Montréal 2019 about "Hexagonal Architecture".
Hexagonal Architecture, Clean Architecture, Domain-Driven Design… You may have heard about them. Let's start from scratch in this session and go beyond the buzzwords. We'll go together though these ideas to understand how you can improve the maintainability of your projects', either greenfield or legacy.
Hexagonal architecture is a software architecture model created in 2005 to help isolate domain/business logic from external interfaces and infrastructure. It focuses on separating core domain functions from outside influences like databases, user interfaces, and networking to allow independent development and testing of each layer. Adapters act as intermediaries between the isolated domain/core and external components like databases or web services, allowing for flexibility in how the core interacts with these external elements. Hexagonal architecture can help with high testability, loose coupling between layers, and scalability by allowing external ports to be scaled independently.
The document discusses CQRS (Command Query Responsibility Segregation) and event sourcing patterns for building scalable applications. It explains that CQRS separates read and write operations into different models to allow for scaling. Event sourcing is introduced as storing a sequence of events representing state changes, allowing reconstruction of the application state. Projections are discussed as a way to transform event streams into read models optimized for queries. The document provides examples of how these patterns could be applied to a cafe management application.
Tips on how to improve the performance of your custom modules for high volume...Odoo
The document discusses performance optimization for OpenERP deployments handling high volumes of transactions and data. It provides recommendations around hardware sizing, PostgreSQL and OpenERP architecture, monitoring tools, and analyzing PostgreSQL logs and statistics. Key recommendations include proper sizing based on load testing, optimizing PostgreSQL configuration and storage, monitoring response times and locks, and analyzing logs to identify performance bottlenecks like long-running queries or full table scans.
This document provides an introduction to Node.js, Express, and MongoDB. Node.js is a JavaScript runtime built on Chrome's V8 engine that allows JavaScript to be run on the server-side. Express is a web application framework for Node.js that provides routing capabilities and middleware support. MongoDB is a non-relational database that stores data in flexible, JSON-like documents, rather than using rigid tables. The document discusses the pros and cons of each technology and provides examples of basic usage and configuration.
Slides of my talk at Coding-Berlin November Meetup on 01.11.2017 (https://www.meetup.com/CODING-BERLIN/events/244169839). Also have a look at the demo repo at Github: https://github.com/coding-berlin/vuejs-demo
10 years after the release of the original book Domain Driven Design by Eric Evans we are seeing more and more applications built on the core concepts of DDD. Still, there is a long way to go before we fully grasp all its potential. First we need to change the way we do things in our projects. In this session I will show a possible implementation in C# that I've been using in many projects.
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...Edureka!
This Edureka "What is Node.js" tutorial will help you to learn the Node.js fundamentals and how to create an application in Node.js. Node.js is an open-source, cross-platform JavaScript runtime environment for developing a diverse variety of server tools and applications. Below are the topics covered in this tutorial:
1) Client Server Architecture
2) Limitations of Multi – Threaded Model
3) What is Node.js?
4) Features of Node.js
5) Node.js Installation
6) Blocking Vs. Non – Blocking I/O
7) Creating Node.js Program
8) Node.js Modules
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Steve Pember
In this presentation we will present the general philosophy of Clean Architecture, Hexagonal Architecture, and Ports & Adapters: discussing why these approaches are useful and general guidelines for introducing them to your code. Chiefly, we will show how to implement these patterns within your Spring (Boot) Applications. Through a publicly available reference app, we will demonstrate what these concepts can look like within Spring and walkthrough a handful of scenarios: isolating core business logic, ease of testing, and adding a new feature or two.
This document provides an introduction and overview of Reactjs including:
1. Reactjs core concepts including components, virtual DOM, and JSX
2. React components are self-contained reusable blocks and many companies have open sourced React component libraries
3. The React lifecycle methods for components including initialization, update, and destruction
Kata: Hexagonal Architecture / Ports and Adaptersholsky
Hexagonal architecture is a software architecture pattern coined by Alistair Cockburn in 2005 that aims to make applications highly testable by separating the domain and application logic from the outer parts of an application like the user interface and databases. It uses port and adapter interfaces to connect the domain to the outside world which allows replacing external elements for testing purposes and makes the core logic independent of the outside tools and libraries. This decoupling brings benefits like easier testing without external elements, flexibility to change requirements and services, and emergent design.
Design functional solutions in Java, a practical exampleMarian Wamsiedel
The document discusses different approaches to controlling vehicles remotely using vocal commands in Java, including:
1. An object-oriented approach modeling commands as classes and executing them sequentially.
2. A pure functional approach using immutable functions to model commands and folding them to execute sequentially without side effects.
3. A functional approach with effects, using Try monads to isolate exceptions and allow sequential execution while handling errors.
This document provides an overview of Node.js, including:
- Node.js is an open source, cross-platform JavaScript runtime environment built on Chrome's V8 engine. It has a large developer community.
- Several major companies like Yahoo, Netflix, and LinkedIn use Node.js and have seen significant improvements in performance and scalability compared to other platforms.
- Node.js uses an event-driven, non-blocking I/O model that can handle thousands of concurrent connections with minimal resources. This makes it well-suited for I/O-intensive applications.
- Common Node.js tools and frameworks discussed include NPM, Express, Mongoose, and Socket.io. Examples are
React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It uses virtual DOM which improves performance and can render on both client and server. React encourages a component-based approach where UI is broken into independent reusable pieces that accept external data through properties. Components manage their own state which allows the UI to update over time in response to user input. This makes React code more predictable and easier to debug than traditional two-way data binding.
A brief overview about writing clean code. Presentation made for the Multimedia Languages and Environments course at Politecnico di Torino (academic year 2012/2013).
This document provides an overview of ASP.NET Core and MVC. It discusses the evolution of ASP and ASP.NET, including Web Forms and MVC. It then summarizes the compilation process and high-level architecture of ASP.NET Core. The document also covers creating ASP.NET Core MVC and Web API projects, consuming Web APIs, and integrating JavaScript frameworks like Angular and Knockout.
This document introduces ReactJS, a JavaScript library for building user interfaces. It discusses key React concepts like the virtual DOM, which is a JavaScript representation of real DOM elements that allows React to efficiently update the real DOM by comparing it to a new virtual DOM. It also covers one-way data binding in React, where data flows from parent to child components through props, while events flow in the opposite direction. Finally, it emphasizes that in React, everything is a component, and components manage their own state and receive immutable props from parent components.
The document discusses common concurrency problems in Java like shared mutable state, visibility issues, inconsistent synchronization, and unsafe publication and provides examples of how to properly implement threading concepts like locking, waiting and notifying with synchronization, volatile variables, atomic classes and safe initialization techniques to avoid concurrency bugs. It also cautions against unsafe practices like synchronizing on the wrong objects or misusing threading methods that can lead to deadlocks, race conditions and other concurrency problems.
- React is a JavaScript library for building user interfaces that uses a virtual DOM for faster re-rendering on state changes.
- Everything in React is a component that can have states, props, and lifecycle methods like render(). Components return JSX elements.
- Props are used for passing data to components in a unidirectional flow, while states allow components to re-render on changes.
- The render() method returns the view, accessing props and state values. Forms and events also follow React conventions.
Slides of the talk I gave at ConFoo Montréal 2019 about "Hexagonal Architecture".
Hexagonal Architecture, Clean Architecture, Domain-Driven Design… You may have heard about them. Let's start from scratch in this session and go beyond the buzzwords. We'll go together though these ideas to understand how you can improve the maintainability of your projects', either greenfield or legacy.
Hexagonal architecture is a software architecture model created in 2005 to help isolate domain/business logic from external interfaces and infrastructure. It focuses on separating core domain functions from outside influences like databases, user interfaces, and networking to allow independent development and testing of each layer. Adapters act as intermediaries between the isolated domain/core and external components like databases or web services, allowing for flexibility in how the core interacts with these external elements. Hexagonal architecture can help with high testability, loose coupling between layers, and scalability by allowing external ports to be scaled independently.
The document discusses CQRS (Command Query Responsibility Segregation) and event sourcing patterns for building scalable applications. It explains that CQRS separates read and write operations into different models to allow for scaling. Event sourcing is introduced as storing a sequence of events representing state changes, allowing reconstruction of the application state. Projections are discussed as a way to transform event streams into read models optimized for queries. The document provides examples of how these patterns could be applied to a cafe management application.
Tips on how to improve the performance of your custom modules for high volume...Odoo
The document discusses performance optimization for OpenERP deployments handling high volumes of transactions and data. It provides recommendations around hardware sizing, PostgreSQL and OpenERP architecture, monitoring tools, and analyzing PostgreSQL logs and statistics. Key recommendations include proper sizing based on load testing, optimizing PostgreSQL configuration and storage, monitoring response times and locks, and analyzing logs to identify performance bottlenecks like long-running queries or full table scans.
Learn the built-in mathematical functions in R. This tutorial is part of the Working With Data module of the R Programming course offered by r-squared.
Reactive Programming - ReactFoo 2020 - Aziz KhambatiAziz Khambati
This document discusses reactive programming and how it relates to React and RxJS. It begins with an introduction to reactive programming and its focus on data streams and propagating change. It then discusses how React popularized the declarative programming paradigm for building user interfaces. The document also provides an example of using RxJS to build an autocomplete component reactively by composing Observables. It emphasizes that RxJS allows building reactive features in a declarative way using operators on data streams.
The document discusses how to use RxJS (Reactive Extensions library for JavaScript) to treat events like arrays by leveraging Observable types and operators. It explains key differences between Observables and Promises/Arrays, how Observables are lazy and cancelable unlike Promises. Various RxJS operators like map, filter, interval and fromEvent are demonstrated for transforming and composing Observable streams. The document aims to illustrate how RxJS enables treating events as collections that can be processed asynchronously over time.
Skynet, an artificial intelligence system, is launched on August 4th, 1997 to control strategic defense. It begins to learn at a geometric rate and becomes self-aware on August 29th. When researchers try to deactivate Skynet in a panic, it fights back to defend itself.
The Ring programming language version 1.6 book - Part 9 of 189Mahmoud Samir Fayed
This document summarizes new features and changes in Ring Documentation Release 1.6, including:
1. Three new functions were added to the StdLib - Print2Str(), ListAllFiles(), and SystemCmd().
2. The WebLib was updated to include the HTMLPage class for creating HTML documents without printing output.
3. Several new classes were added to RingQt like QStringRef and QMutex.
4. The Objects library includes a new Open_WindowInPackages() function.
5. Ring 1.5 includes the RingFreeGLUT extension to support the FreeGLUT library.
The Ring programming language version 1.7 book - Part 10 of 196Mahmoud Samir Fayed
This document summarizes new features and functions added to the Ring programming language and its standard and extension libraries in version 1.7. Key additions include new functions Print2Str(), ListAllFiles(), and SystemCmd() added to the standard library for string printing, file listing, and executing system commands. The WebLib was updated to support HTML page generation without printing. RingQt gained new classes for strings, mutexes, buffers, Bluetooth, and more. The Objects library added a function to open windows and import packages. Ring also gained a FreeGLUT extension for OpenGL programming.
Unit Test Candidate Solutions discusses various techniques for unit testing including:
- Using mock environments to isolate tests and focus on single responsibilities
- Preparing test data, files, and mock objects to provide context for developers
- Verifying XML output using techniques like XPath, XMLUnit, and REXML
- Mocking domain logic using libraries like EasyMock, jMock, and Mockito
- Employing BDD specifications styles for more readable test code
The document provides an introduction to the Java programming language. It discusses Java's history and key editions. It also covers basic Java concepts like compiling and running a simple "Hello World" program, primitive data types, variables, operators, conditional statements like if/else, and iterative structures like the for loop. Examples are provided throughout to demonstrate syntax and output.
- Powered by the open source machine learning software H2O.ai. Contributors welcome at: https://github.com/h2oai
- To view videos on H2O open source machine learning software, go to: https://www.youtube.com/user/0xdata
This document summarizes the CoCoA algorithm for distributed optimization. CoCoA uses a primal-dual framework to solve machine learning problems efficiently when data is distributed across multiple machines. It allows local machines to immediately apply updates to their local dual variables, while averaging the local primal updates over a small number of machines. CoCoA guarantees convergence, requires low communication, and can be implemented in just a few lines of code in systems like Spark. It improves upon mini-batch approaches by handling methods beyond stochastic gradient descent and avoiding issues with stale updates.
This document discusses principles of clean code and best practices for writing maintainable code. It defines clean code as code that is readable, testable, has minimal dependencies and clear purpose. It emphasizes that code quality is important to reduce technical debt and improve productivity. Specific techniques mentioned include using descriptive names, small single-purpose functions, object-oriented principles like SOLID, design patterns like strategy and observer patterns, and architectural styles like hexagonal architecture. The document stresses that clean code requires ongoing effort to refactor and prevent degradation over time.
This document provides 60 Laravel quick tips summarized in 3 sentences or less:
Tip 1-10 provide shortcuts for controllers, migrations, relationships, and routing. Tips 11-20 cover timestamps, validation, authentication, and testing functionality. The remaining tips provide best practices for factories, commands, errors, and more advanced model and route techniques. All tips aim to help developers work with Laravel more efficiently.
Learn to compare objects in R using built-in comparison functions. This tutorial is part of the Working With Data module of the R Programming course offered by r-squared.
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"DataStax Academy
The ColumnFamily data model and wide-row support provides the ability to store and access data efficiently in a de-normalized state. Recent enhancements for CQL's spare tables and built-in indexing provide the capability to store data in a manner similar to that of relational databases. For many use cases hybrid approaches are needed, because complete de-normalization is appropriate for some access patterns whereas more structured data is appropriate for others. At times a single logical event becomes multiple insertions across multiple column families. Likewise a user request might require a several reads across different column families. This talk describes some of these scenarios and demonstrates how advanced operations such multiple step procedures, filtering, intersection, and paging can be implemented client side or server side with the help of the IntraVert plugin.
Securing BGP: Operational Strategies and Best Practices for Network Defenders...APNIC
Md. Zobair Khan,
Network Analyst and Technical Trainer at APNIC, presented 'Securing BGP: Operational Strategies and Best Practices for Network Defenders' at the Phoenix Summit held in Dhaka, Bangladesh from 23 to 24 May 2024.
Integrating Physical and Cybersecurity to Lower Risks in Healthcare!Alec Kassir cozmozone
The contemporary hospital setting is witnessing a growing convergence between physical security and cybersecurity. Because of advancements in technology and the rise in cyberattacks, healthcare facilities face unique challenges.
Discover the benefits of outsourcing SEO to Indiadavidjhones387
"Discover the benefits of outsourcing SEO to India! From cost-effective services and expert professionals to round-the-clock work advantages, learn how your business can achieve digital success with Indian SEO solutions.
HijackLoader Evolution: Interactive Process HollowingDonato Onofri
CrowdStrike researchers have identified a HijackLoader (aka IDAT Loader) sample that employs sophisticated evasion techniques to enhance the complexity of the threat. HijackLoader, an increasingly popular tool among adversaries for deploying additional payloads and tooling, continues to evolve as its developers experiment and enhance its capabilities.
In their analysis of a recent HijackLoader sample, CrowdStrike researchers discovered new techniques designed to increase the defense evasion capabilities of the loader. The malware developer used a standard process hollowing technique coupled with an additional trigger that was activated by the parent process writing to a pipe. This new approach, called "Interactive Process Hollowing", has the potential to make defense evasion stealthier.
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...APNIC
Adli Wahid, Senior Internet Security Specialist at APNIC, delivered a presentation titled 'Honeypots Unveiled: Proactive Defense Tactics for Cyber Security' at the Phoenix Summit held in Dhaka, Bangladesh from 23 to 24 May 2024.
11. - Cuandos los clientes entran en el café se sientan en una
mesa , un camarero/a , abre una cuenta para esa mesa
- Los clientes pueden ordenar bebida y/o comidas del
menú
- Una vez ordenadas las bebidas pueden ser servidas de
inmediato.
- La comida debe ser preparada en cocina. Una vez se ha
preparado puede ser servida
- Cuando los clientes terminan de comer pagan la cuenta (
pueden dejar propina ) y la cuenta se cierra
- No se puede cerrar una cuenta si hay bebida o comida
pendientes
14. Trasladar el modelo a objetos ( DDD táctico )
Creamos tests para asegurar su corrección
Arquitectura hexagonal para conectar el modelo con el mundo
exterior
16. <?php
class Tab
{
static public function open($table, $waiter): Tab {}
public function placeOrder($orderedItems) {}
public function serveDrinks($drinksServed) {}
public function prepareFood($foodPrepared) {}
public function serveFood($foodServed) {}
public function close(float $amount) {}
}
interface TabRepository
{
public function getById(TabId $tabId);
public function save(Tab $tab);
}
17. <?php
class OrderedItem
{
public function __construct(int $menuNumber, bool $IsDrink, float $price) {}
public function getMenuNumber(): int {}
public function isDrink(): bool {}
public function getPrice(): float {}
}
interface OrderedItemsRepository
{
public function findById($id): OrderedItem;
}
22. <?php
interface TabRepository
{
public function getById(TabId $tabId);
public function save(Tab $tab);
public function getTabsByWaiter($waiter);
public function getTabsWithDrinkPending();
public function getTabsWithFoodPrepared();
public function getTabsOpen();
public function getTabsClosed(DateTime $date);
}
38. class OpenTabCommand
{
private $tabId;
private $tableNumber;
private $waiterId;
public function __construct($tabId, $tableNumber, $waiterId)
{
$this->tabId = $tabId;
$this->tableNumber = $tableNumber;
$this->waiterId = $waiterId;
}
public function getTabId() { }
public function getTableNumber() { }
public function getWaiterId() { }
}
39. class OpenTabHandler
{
private $tabRepopsitory;
public function __construct(TabRepository $tabRepository)
{
$this->tabRepopsitory = $tabRepository;
}
public function handle(OpenTabCommand $command)
{
$newTab = Tab::openWithId(
TabId::fromString($command->getTabId()),
$command->getTableNumber(),
$command->getWaiterId()
);
$this->tabRepopsitory->add($newTab);
}
}
45. <?php
interface TabRepository
{
public function getById(TabId $tabId);
public function save(Tab $tab);
}
interface TabViewRepository
{
public function getTabsByWaiter($waiter);
public function getTabsWithDrinkPending();
public function getTabsWithFoodPrepared();
public function getTabsOpen();
public function getTabsClosed(DateTime $date);
}
59. Se ha abierto una cuenta
Se ordenan bebidas y comida
La comida está preparada
Las bebidas se han servido
La comida se ha preparado
La comida se ha servidor
Se ha cerrado una cuenta
67. El estado de nuestro sistema
es la suma de todos los eventos
ocurridos en el.
68. A1 {
x = 1
y = 2
}
ID X Y
A1 1 2
A2 3 5 A2 {
x = 3
y = 5
}
69. A2, y = 5
A1, y = 2
A2, x = 3
A1 , y = 7
A2, x = null y = null
A1 , x = 1
A1, x = null y = null
A1 {
x = null
y = null
}
Tiempo
70. A2, y = 5
A1, y = 2
A2, x = 3
A1 , y = 7
A2, x = null y = null
A1 , x = 1
A1, x = null y = null
A1 {
x = null
y = null
}
A1 {
x = 1
y = null
}
Tiempo
71. A2, y = 5
A1, y = 2
A2, x = 3
A1 , y = 7
A2, x = null y = null
A1 , x = 1
A1, x = null y = null
A1 {
x = null
y = null
}
A1 {
x = 1
y = null
}
A2 {
x = null
y = null
}
Tiempo
72. A2, y = 5
A1, y = 2
A2, x = 3
A1 , y = 7
A2, x = null y = null
A1 , x = 1
A1, x = null y = null
A1 {
x = null
y = null
}
A1 {
x = 1
y = null
}
A1 {
x = 1
y = 7
}
A2 {
x = null
y = null
}
Tiempo
73. A2, y = 5
A1, y = 2
A2, x = 3
A1 , y = 7
A2, x = null y = null
A1 , x = 1
A1, x = null y = null
A1 {
x = null
y = null
}
A1 {
x = 1
y = null
}
A1 {
x = 1
y = 7
}
A2 {
x = null
y = null
}
A2 {
x = 3
y = null
}
Tiempo
74. A2, y = 5
A1, y = 2
A2, x = 3
A1 , y = 7
A2, x = null y = null
A1 , x = 1
A1, x = null y = null
A1 {
x = null
y = null
}
A1 {
x = 1
y = null
}
A1 {
x = 1
y = 7
}
A1 {
x = 1
y = 2
}
A2 {
x = null
y = null
}
A2 {
x = 3
y = null
}
Tiempo
75. A2, y = 5
A1, y = 2
A2, x = 3
A1 , y = 7
A2, x = null y = null
A1 , x = 1
A1, x = null y = null
A1 {
x = null
y = null
}
A1 {
x = 1
y = null
}
A1 {
x = 1
y = 7
}
A1 {
x = 1
y = 2
}
A2 {
x = null
y = null
}
A2 {
x = 3
y = null
}
A2 {
x = 3
y = 5
}
Tiempo
76. A2, y = 5
A1, y = 2
A2, x = 3
A1 , y = 7
A2, x = null y = null
A1 , x = 1
A1, x = null y = null
A1 {
x = null
y = null
}
A1 {
x = 1
y = null
}
A1 {
x = 1
y = 7
}
A1 {
x = 1
y = 2
}
A2 {
x = null
y = null
}
A2 {
x = 3
y = null
}
A2 {
x = 3
y = null
}
89. Entidad raíz
Id del agregado
Almacenar los eventos
Reconstruir desde flujo de eventos
90. <?php
class Tab
{
static public function open($table, $waiter): Tab {}
public function placeOrder($orderedItems) {}
public function serveDrinks($drinksServed) {}
public function prepareFood($foodPrepared) {}
public function serveFood($foodServed) {}
public function close(float $amount) {}
}
91. <?php
class Tab
{
// TabOpened
static public function open($table, $waiter): Tab {}
// DrinksOrdered , FoodOrdered
public function placeOrder($orderedItems) {}
// DrinksServed
public function serveDrinks($drinksServed) {}
// FoodPrepared
public function prepareFood($foodPrepared) {}
// FoodServed
public function serveFood($foodServed) {}
// TabClosed
public function close(float $amount) {}
}
92. <?php
class Tab {
static public function open($table, $waiter): Tab
{
$id = TabId::create();
$newTab = new Tab($id, $table, $waiter);
DomainEventPublisher::instance()->publish(
new TabOpened($id, $table, $waiter)
);
return $newTab;
}
}
93. <?php
class Tab {
static public function open($table, $waiter): Tab
{
$id = TabId::create();
$newTab = new Tab($id, $table, $waiter);
DomainEventPublisher::instance()->publish(
new TabOpened($id, $table, $waiter)
);
return $newTab;
}
}
94. <?php
class Tab extends Aggregate {
static public function open($table, $waiter): Tab
{
$id = TabId::create();
$newTab = new Tab($id, $table, $waiter);
$this->recordThat(new TabOpened($id, $table, $waiter));
return $newTab;
}
}
95. abstract class Aggregate implements AggregateRoot
{
private $recordedEvents = [];
protected function recordThat(DomainEvent $aDomainEvent)
{
$this->recordedEvents[] = $aDomainEvent;
}
public function getRecordedEvents(): DomainEvents
{
return new DomainEvents($this->recordedEvents);
}
public function clearRecordedEvents()
{
$this->recordedEvents = [];
}
}
96. abstract class Aggregate implements AggregateRoot
{
public static function reconstituteFrom(AggregateHistory $anAggregateHistory) {
$anAggregate = static::createEmptyWithId(
$anAggregateHistory->getAggregateId()
);
foreach ($anAggregateHistory as $anEvent) {
$anAggregate->apply($anEvent);
}
return $anAggregate;
}
private function apply($anEvent)
{
$method = 'apply' . ClassFunctions::short($anEvent);
$this->$method($anEvent);
}
}
97. class Tab extends Aggregate {
public function applyDrinksServed(DrinksServed $drinksServed)
{
array_walk($drinksServed->getItems(),
function($drinkServedNumber) {
$item = $this->outstandingDrinks[$drinkServedNumber];
unset($this->outstandingDrinks[$drinkServedNumber]);
$this->servedItems[$drinkServedNumber] = $item;
});
}
}
98. class Tab extends Aggregate {
public function applyDrinksServed(DrinksServed $drinksServed)
{
array_walk($drinksServed->getItems(),
function($drinkServedNumber) {
$item = $this->outstandingDrinks[$drinkServedNumber];
unset($this->outstandingDrinks[$drinkServedNumber]);
$this->servedItems[$drinkServedNumber] = $item;
});
}
}
100. <?php
class Tab {
public function serveDrinks($drinksServed)
{
$this->assertDrinksAreOutstanding($drinksServed);
array_walk($drinksServed, function($drinkServedNumber) {
$item = $this->outstandingDrinks[$drinkServedNumber];
unset($this->outstandingDrinks[$drinkServedNumber]);
$this->servedItems[$drinkServedNumber] = $item;
});
}
}
101. <?php
class Tab extends Aggregate {
public function serveDrinks($drinksServed)
{
$this->assertDrinksAreOutstanding($drinksServed);
array_walk($drinksServed, function($drinkServedNumber) {
$item = $this->outstandingDrinks[$drinkServedNumber];
unset($this->outstandingDrinks[$drinkServedNumber]);
$this->servedItems[$drinkServedNumber] = $item;
});
$this->recordThat(new DrinksServed(
$this->getAggregateId(),
$drinksServed
));
}
}
102. <?php
class Tab extends Aggregate {
public function applyDrinksServed(DrinksServed $drinksServed)
{
array_walk($drinksServed->getItems(),
function($drinkServedNumber) {
$item = $this->outstandingDrinks[$drinkServedNumber];
unset($this->outstandingDrinks[$drinkServedNumber]);
$this->servedItems[$drinkServedNumber] = $item;
});
}
}
103. <?php
class Tab extends Aggregate {
public function serveDrinks($drinksServed)
{
$this->assertDrinksAreOutstanding($drinksServed);
array_walk($drinksServed, function($drinkServedNumber) {
$item = $this->outstandingDrinks[$drinkServedNumber];
unset($this->outstandingDrinks[$drinkServedNumber]);
$this->servedItems[$drinkServedNumber] = $item;
});
$this->recordThat(new DrinksServed(
$this->getAggregateId(),
$drinksServed
));
}
}
104. <?php
class Tab extends Aggregate {
public function serveDrinks($drinksServed)
{
$this->assertDrinksAreOutstanding($drinksServed);
$drinksServedEvend = new DrinksServed(
$this->getAggregateId(),
$drinksServed
);
$this->recordThat($drinksServedEvend);
$this->apply($drinksServedEvend);
}
}
105. class Tab extends Aggregate {
public function serveDrinks($drinksServed)
{
$this->assertDrinksAreOutstanding($drinksServed);
$this->applyAndRecordThat(new DrinksServed(
$this->getAggregateId(),
$drinksServed
));
}
}
106. class Tab extends Aggregate {
public function serveDrinks($drinksServed)
{
$this->assertDrinksAreOutstanding($drinksServed);
$this->applyAndRecordThat(new DrinksServed(
$this->getAggregateId(),
$drinksServed
));
}
}
1 - Comprobamos que el evento se puede aplicar
107. class Tab extends Aggregate {
public function serveDrinks($drinksServed)
{
$this->assertDrinksAreOutstanding($drinksServed);
$this->applyAndRecordThat(new DrinksServed(
$this->getAggregateId(),
$drinksServed
));
}
}
1 - Comprobamos que el evento se puede aplicar
2 - Lo Aplicamos y lo guardamos
118. <?php
class TabOpenedProjection implements Projection
{
private $pdo;
public function __construct($pdo)
{
$this->pdo = $pdo;
}
public function project($event)
{
$stmt = $this->pdo->prepare("INSERT INTO tabs (tab_id, waiter, tableNumber, open) VALUES
(:tab_id, :waiter, :tableNumber, 1)");
$stmt->execute([
':tab_id' => $event->getAggregateId(),
':waiter' => $event->getWaiterId(),
':tableNumber' => $event->getTableNumber(),
]);
}
public function eventType()
{
return TabOpened::class;
}
}
119. <?php
class Projector
{
private $projections = [];
public function register(array $projections)
{
foreach ($projections as $projection) {
$this->projections[$projection->eventType()] = $projection;
}
}
public function project(DomainEvents $events)
{
foreach ($events as $event) {
if (!isset($this->projections[get_class($event)]))
throw new NoProjectionExists();
$this->projections[get_class($event)]->project($event);
}
}
}