SlideShare una empresa de Scribd logo
1 de 54
Descargar para leer sin conexión
High Performance Pascal Code On Servers
Arnaud Bouchez – Synopse / LiveMon
High Performance
Pascal Code On Servers
High Performance Pascal Code On Servers
Arnaud Bouchez
– Delphi / FPC
• Various solutions (from Vatican to gaming industry)
• IoT solution (RSI)
• Real-time Monitoring solution (LiveMon)
– Open Source
• mORMot (SOA ORM MVC framework)
• SynPDF SynMustache SynDB SynCrypto
– Training and consultancy
• Synopse one-man company
High Performance Pascal Code On Servers
High Performance Pascal Code On Servers
High Performance
Pascal Code On Servers
High Performance Pascal Code On Servers
High Performance
Pascal Code On Servers
• High Performance
• On Servers
• In Pascal Code
High Performance Pascal Code On Servers
High Performance
Pascal Code On Servers
• High Performance
• On Servers
• In Pascal Code
High Performance Pascal Code On Servers
High Performance
Make our Software
Great Again
(Donald K.)
High Performance Pascal Code On Servers
High Performance
Make our Software
Great Again
(attributed to Donald K.)
High Performance Pascal Code On Servers
High Performance
Premature Optimization
is the root of all evil
(D. Knuth)
High Performance Pascal Code On Servers
High Performance
"Programmers waste enormous amounts of time
thinking about, or worrying about, the speed of
noncritical parts of their programs, and these
attempts at efficiency actually have a strong
negative impact when debugging and
maintenance are considered. We should forget
about small efficiencies, say about 97% of the
time: premature optimization is the root of all
evil. Yet we should not pass up our opportunities
in that critical 3%."
High Performance Pascal Code On Servers
High Performance
"Programmers waste enormous amounts of time
thinking about, or worrying about, the speed of
noncritical parts of their programs, and these
attempts at efficiency actually have a strong
negative impact when debugging and
maintenance are considered. We should forget
about small efficiencies, say about 97% of the
time: premature optimization is the root of all
evil. Yet we should not pass up our opportunities
in that critical 3%."
High Performance Pascal Code On Servers
High Performance
Premature Optimization
is the root of all evil
(D. Knuth)
High Performance Pascal Code On Servers
High Performance
No Premature Optimization
1. Make it right, then make it fast
Unit tests, then performance tests
2. Be Lazy
Change only what is worth optimizing
High Performance Pascal Code On Servers
High Performance
No Premature Optimization
1. Testing is everything
to avoid regression when refactoring
2. Measure, don’t guess
Use a profiler and/or performance logs
High Performance Pascal Code On Servers
High Performance
Premature Optimization
is the root of all evil
(D. Knuth - again)
High Performance Pascal Code On Servers
High Performance
Pascal Code On Servers
• High Performance
• On Servers
• In Pascal Code
High Performance Pascal Code On Servers
On Servers
Not your daddy’s RAD way
• RAD is database centric
creating proper indexes won’t hurt
• RAD is for rich clients
(a lot of) process / business logic
is done on the client side
High Performance Pascal Code On Servers
On Servers
REpresentational State Transfer (REST)
• It is not easy to switch from RAD to REST
but from proper isolation
comes ( may/should come? )
better performance
High Performance Pascal Code On Servers
On Servers
Scaling
• Guess your needs, prepare for eventual
Scaling is (really) hard
Your company may not need GAFA scaling
But you want to maximize ROI
High Performance Pascal Code On Servers
On Servers
Scaling
• Scaling is about uncoupling
Get rid of identified Bottlenecks
and Single Point of Failures
High Performance Pascal Code On Servers
On Servers
Scaling
• Database as Bottleneck
from Vertical Scaling
more CPU, RAM, switch to NVMe…
to Horizontal Scaling
add Microservices instances
with their own storage
High Performance Pascal Code On Servers
On Servers
Scaling
• MicroServices with Local Storage
Using Containers for API and DB servers
(RDMS, NoSQL – MongoDB, Redis)
Using stand-alone database
(objects, SQLite3)
High Performance Pascal Code On Servers
On Servers
Scaling
• MicroServices with Local Storage
Works as a local cache of data
Updates made via Events
High Performance Pascal Code On Servers
On Servers
Scaling
• MicroServices with Local Storage
Updates made via Events
leads to Eventual Consistency
Use a centralized DB for transactional data
High Performance Pascal Code On Servers
High Performance Pascal Code On Servers
High Performance
Pascal Code On Servers
• High Performance
• On Servers
• In Pascal Code
High Performance Pascal Code On Servers
In Pascal Code
From Existing: Reuse, Test and Publish
• Reuse years (decades) of proven code
• Opportunity to add/enhance testing
• Open your solution to 3rd parties clients
High Performance Pascal Code On Servers
In Pascal Code
For new projects: Object Pascal
• Object Pascal is
readable (by nature)
safe (strong typing)
abstract (strings, interfaces)
fast (native/compiled, no GC)
High Performance Pascal Code On Servers
In Pascal Code
For new projects: Object Pascal
• Object Pascal is
your favorite / most fluent language
and you know your company business
High Performance Pascal Code On Servers
In Pascal Code
Not only the Delphi Language
• Complementary compilers/transpilers
FPC, TMS WebCore,
SmartMobileStudio, ElevateWebBuilder…
High Performance Pascal Code On Servers
In Pascal Code
Not only the Delphi Language
• Complementary compilers/transpilers
low-level optimizations usually work
for a single target compiler only
JavaScript execution VM/JIT is very specific
High Performance Pascal Code On Servers
In Pascal Code
The Last Resort
• Best performance comes from design
But code optimization may help
High Performance Pascal Code On Servers
In Pascal Code
Make it Fast?
• Make it right
then
• Make your Design Fast
• Make your Code Fast
High Performance Pascal Code On Servers
High Performance
Pascal Code On Servers
• High Performance
• On Servers
• In Pascal Code
Make your design fast
Make your code fast
High Performance Pascal Code On Servers
Make your Design Fast
• Measure against your company goals
Identify the bottlenecks
- Profiling (on dev/coder side)
- Performance Logging (client/prod side)
High Performance Pascal Code On Servers
Make your Design Fast
• Profiling
External Tools (AQTime, DelphiTools…)
Running on real-live usecases
using automated load stress tests
High Performance Pascal Code On Servers
Make your Design Fast
• Client/prod side performance logging
Log Timing of
Database Statements
SOA/REST methods calls
Main identified bottleneck functions
into logs – as text or DB (SQLite3)
High Performance Pascal Code On Servers
Make your Design Fast
• Client/prod side performance logging
Log Timing as part of mORMot
SQL, SOA on multiple threads
→ show some real logs
High Performance Pascal Code On Servers
Make your Design Fast
• Cache is your friend
In-process Cache
MicroService local DB
preloading the most used values
mORMot TSynDictionary in RAM
High Performance Pascal Code On Servers
Make your Design Fast
• Cache is your friend
Shared Cache
Dedicated Service
REDIS Server
High Performance Pascal Code On Servers
High Performance
Pascal Code On Servers
• High Performance
• On Servers
• In Pascal Code
Make your design fast
Make your code fast
High Performance Pascal Code On Servers
Make your Code Fast
• Processors are very complex beasts
https://www.agner.org/optimize
High Performance Pascal Code On Servers
Make your Code Fast
High Performance Pascal Code On Servers
Make your Code Fast
High Performance Pascal Code On Servers
Make your Code Fast
Shut down the profiler,
keep your regression tests close,
and let’s begin the fun !
(from the most obvious
to the most tenuous)
High Performance Pascal Code On Servers
Make your Code Fast
Shut down the profiler,
keep your regression tests close,
and let’s begin the fun !
(and don’t take my word for it)
High Performance Pascal Code On Servers
Make your Code Fast
• Avoid Unneeded Calls
Cache and reuse values
High Performance Pascal Code On Servers
Make your Code Fast
• Use Tuned Libraries
Written with performance in mind
Hardware accelerated (AES-NI, crc32c)
Link some C code known for efficiency
High Performance Pascal Code On Servers
Make your Code Fast
• Avoid Memory Allocation
Heap allocation has a cost,
especially on multi-threaded applications
High Performance Pascal Code On Servers
Make your Code Fast
• Avoid Copies or Reference Counting
By using const or var input parameters
High Performance Pascal Code On Servers
Make your Code Fast
• Avoid Hidden try..finally Blocks
By using a sub-function
when managed types are involved
High Performance Pascal Code On Servers
Make your Code Fast
• Better Register Allocation
By using a sub-function for loops
High Performance Pascal Code On Servers
Make your Code Fast
• Faster Data Structures
(Dynamic) arrays put all data in a row
are likely to stay in L1 cache
can be accessed using TDynArray wrapper
High Performance Pascal Code On Servers
• Questions?
High Performance
Pascal Code On Servers

Más contenido relacionado

La actualidad más candente

How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleMariaDB plc
 
How to Monitoring the SRE Golden Signals (E-Book)
How to Monitoring the SRE Golden Signals (E-Book)How to Monitoring the SRE Golden Signals (E-Book)
How to Monitoring the SRE Golden Signals (E-Book)Siglos
 
Efficient Schemas in Motion with Kafka and Schema Registry
Efficient Schemas in Motion with Kafka and Schema RegistryEfficient Schemas in Motion with Kafka and Schema Registry
Efficient Schemas in Motion with Kafka and Schema RegistryPat Patterson
 
MySQL Replication: Pros and Cons
MySQL Replication: Pros and ConsMySQL Replication: Pros and Cons
MySQL Replication: Pros and ConsRachel Li
 
IBM JVM 소개 - Oracle JVM 과 비교
IBM JVM 소개 - Oracle JVM 과 비교IBM JVM 소개 - Oracle JVM 과 비교
IBM JVM 소개 - Oracle JVM 과 비교JungWoon Lee
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Henning Jacobs
 
Rate limits and Performance
Rate limits and PerformanceRate limits and Performance
Rate limits and Performancesupergigas
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...Frank Munz
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux KernelKernel TLV
 
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...Vietnam Open Infrastructure User Group
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance AnalysisBrendan Gregg
 
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)Kentaro Ebisawa
 
Segment Routing
Segment RoutingSegment Routing
Segment RoutingAPNIC
 
MongoDB at Baidu
MongoDB at BaiduMongoDB at Baidu
MongoDB at BaiduMat Keep
 
Understanding kube proxy in ipvs mode
Understanding kube proxy in ipvs modeUnderstanding kube proxy in ipvs mode
Understanding kube proxy in ipvs modeVictor Morales
 
IBM MQ on cloud and containers
IBM MQ on cloud and containersIBM MQ on cloud and containers
IBM MQ on cloud and containersRobert Parker
 
Ekon25 mORMot 2 Cryptography
Ekon25 mORMot 2 CryptographyEkon25 mORMot 2 Cryptography
Ekon25 mORMot 2 CryptographyArnaud Bouchez
 

La actualidad más candente (20)

How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
 
How to Monitoring the SRE Golden Signals (E-Book)
How to Monitoring the SRE Golden Signals (E-Book)How to Monitoring the SRE Golden Signals (E-Book)
How to Monitoring the SRE Golden Signals (E-Book)
 
Efficient Schemas in Motion with Kafka and Schema Registry
Efficient Schemas in Motion with Kafka and Schema RegistryEfficient Schemas in Motion with Kafka and Schema Registry
Efficient Schemas in Motion with Kafka and Schema Registry
 
MySQL Replication: Pros and Cons
MySQL Replication: Pros and ConsMySQL Replication: Pros and Cons
MySQL Replication: Pros and Cons
 
IBM JVM 소개 - Oracle JVM 과 비교
IBM JVM 소개 - Oracle JVM 과 비교IBM JVM 소개 - Oracle JVM 과 비교
IBM JVM 소개 - Oracle JVM 과 비교
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
 
Rate limits and Performance
Rate limits and PerformanceRate limits and Performance
Rate limits and Performance
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
 
VLANs in the Linux Kernel
VLANs in the Linux KernelVLANs in the Linux Kernel
VLANs in the Linux Kernel
 
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
 
HAProxy 1.9
HAProxy 1.9HAProxy 1.9
HAProxy 1.9
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
 
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
 
Segment Routing
Segment RoutingSegment Routing
Segment Routing
 
MongoDB at Baidu
MongoDB at BaiduMongoDB at Baidu
MongoDB at Baidu
 
Seamless mpls
Seamless mpls Seamless mpls
Seamless mpls
 
Understanding kube proxy in ipvs mode
Understanding kube proxy in ipvs modeUnderstanding kube proxy in ipvs mode
Understanding kube proxy in ipvs mode
 
Openstack ansible
Openstack ansibleOpenstack ansible
Openstack ansible
 
IBM MQ on cloud and containers
IBM MQ on cloud and containersIBM MQ on cloud and containers
IBM MQ on cloud and containers
 
Ekon25 mORMot 2 Cryptography
Ekon25 mORMot 2 CryptographyEkon25 mORMot 2 Cryptography
Ekon25 mORMot 2 Cryptography
 

Similar a High Performance Object Pascal Code on Servers (at EKON 22)

DevOps, CLI, APIs, Oh My! Security Gone Agile
DevOps, CLI, APIs, Oh My!  Security Gone AgileDevOps, CLI, APIs, Oh My!  Security Gone Agile
DevOps, CLI, APIs, Oh My! Security Gone AgileMatt Tesauro
 
A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)
A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)
A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)Spark Summit
 
Testing at-cloud-speed sans-app-sec-austin-2013
Testing at-cloud-speed sans-app-sec-austin-2013Testing at-cloud-speed sans-app-sec-austin-2013
Testing at-cloud-speed sans-app-sec-austin-2013Matt Tesauro
 
Intro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkIntro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkAlex Zeltov
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Markus Eisele
 
Ceph Community Talk on High-Performance Solid Sate Ceph
Ceph Community Talk on High-Performance Solid Sate Ceph Ceph Community Talk on High-Performance Solid Sate Ceph
Ceph Community Talk on High-Performance Solid Sate Ceph Ceph Community
 
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache KafkaWestpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafkaconfluent
 
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?Markus Michalewicz
 
Low latency high throughput streaming using Apache Apex and Apache Kudu
Low latency high throughput streaming using Apache Apex and Apache KuduLow latency high throughput streaming using Apache Apex and Apache Kudu
Low latency high throughput streaming using Apache Apex and Apache KuduDataWorks Summit
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephenSteve Feldman
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Denny Lee
 
Running Business Critical Workloads on AWS
Running Business Critical Workloads on AWS Running Business Critical Workloads on AWS
Running Business Critical Workloads on AWS Amazon Web Services
 
Our Multi-Year Journey to a 10x Faster Confluent Cloud
Our Multi-Year Journey to a 10x Faster Confluent CloudOur Multi-Year Journey to a 10x Faster Confluent Cloud
Our Multi-Year Journey to a 10x Faster Confluent CloudHostedbyConfluent
 
Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...
Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...
Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...Kaseya
 
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDocker, Inc.
 
VMworld 2013: Strategic Reasons for Classifying Workloads for Tier 1 Virtuali...
VMworld 2013: Strategic Reasons for Classifying Workloads for Tier 1 Virtuali...VMworld 2013: Strategic Reasons for Classifying Workloads for Tier 1 Virtuali...
VMworld 2013: Strategic Reasons for Classifying Workloads for Tier 1 Virtuali...VMworld
 

Similar a High Performance Object Pascal Code on Servers (at EKON 22) (20)

DevOps, CLI, APIs, Oh My! Security Gone Agile
DevOps, CLI, APIs, Oh My!  Security Gone AgileDevOps, CLI, APIs, Oh My!  Security Gone Agile
DevOps, CLI, APIs, Oh My! Security Gone Agile
 
A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)
A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)
A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)
 
Testing at-cloud-speed sans-app-sec-austin-2013
Testing at-cloud-speed sans-app-sec-austin-2013Testing at-cloud-speed sans-app-sec-austin-2013
Testing at-cloud-speed sans-app-sec-austin-2013
 
Intro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with sparkIntro to big data analytics using microsoft machine learning server with spark
Intro to big data analytics using microsoft machine learning server with spark
 
Ml2
Ml2Ml2
Ml2
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Ceph Community Talk on High-Performance Solid Sate Ceph
Ceph Community Talk on High-Performance Solid Sate Ceph Ceph Community Talk on High-Performance Solid Sate Ceph
Ceph Community Talk on High-Performance Solid Sate Ceph
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache KafkaWestpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafka
 
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
 
Novinky v Oracle Database 18c
Novinky v Oracle Database 18cNovinky v Oracle Database 18c
Novinky v Oracle Database 18c
 
Low latency high throughput streaming using Apache Apex and Apache Kudu
Low latency high throughput streaming using Apache Apex and Apache KuduLow latency high throughput streaming using Apache Apex and Apache Kudu
Low latency high throughput streaming using Apache Apex and Apache Kudu
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
 
Running Business Critical Workloads on AWS
Running Business Critical Workloads on AWS Running Business Critical Workloads on AWS
Running Business Critical Workloads on AWS
 
Typesafe spark- Zalando meetup
Typesafe spark- Zalando meetupTypesafe spark- Zalando meetup
Typesafe spark- Zalando meetup
 
Our Multi-Year Journey to a 10x Faster Confluent Cloud
Our Multi-Year Journey to a 10x Faster Confluent CloudOur Multi-Year Journey to a 10x Faster Confluent Cloud
Our Multi-Year Journey to a 10x Faster Confluent Cloud
 
Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...
Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...
Kaseya Connect 2013: Optimizing Your K Server - Best Practices in Kaseya Infr...
 
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
 
VMworld 2013: Strategic Reasons for Classifying Workloads for Tier 1 Virtuali...
VMworld 2013: Strategic Reasons for Classifying Workloads for Tier 1 Virtuali...VMworld 2013: Strategic Reasons for Classifying Workloads for Tier 1 Virtuali...
VMworld 2013: Strategic Reasons for Classifying Workloads for Tier 1 Virtuali...
 

Más de Arnaud Bouchez

EKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdfEKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdfArnaud Bouchez
 
EKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdfEKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdfArnaud Bouchez
 
Ekon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsEkon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsArnaud Bouchez
 
Ekon24 from Delphi to AVX2
Ekon24 from Delphi to AVX2Ekon24 from Delphi to AVX2
Ekon24 from Delphi to AVX2Arnaud Bouchez
 
Ekon23 (2) Kingdom-Driven-Design applied to Social Media with mORMot
Ekon23 (2) Kingdom-Driven-Design applied to Social Media with mORMotEkon23 (2) Kingdom-Driven-Design applied to Social Media with mORMot
Ekon23 (2) Kingdom-Driven-Design applied to Social Media with mORMotArnaud Bouchez
 
Object Pascal Clean Code Guidelines Proposal (at EKON 22)
Object Pascal Clean Code Guidelines Proposal (at EKON 22)Object Pascal Clean Code Guidelines Proposal (at EKON 22)
Object Pascal Clean Code Guidelines Proposal (at EKON 22)Arnaud Bouchez
 
Ekon21 Microservices - SOLID Meets SOA
Ekon21 Microservices - SOLID Meets SOAEkon21 Microservices - SOLID Meets SOA
Ekon21 Microservices - SOLID Meets SOAArnaud Bouchez
 
Ekon21 Microservices - Event Driven Design
Ekon21 Microservices - Event Driven DesignEkon21 Microservices - Event Driven Design
Ekon21 Microservices - Event Driven DesignArnaud Bouchez
 
Ekon20 mORMot WorkShop Delphi
Ekon20 mORMot WorkShop DelphiEkon20 mORMot WorkShop Delphi
Ekon20 mORMot WorkShop DelphiArnaud Bouchez
 
Ekon20 mORMot SOA Delphi Conference
Ekon20 mORMot SOA Delphi Conference Ekon20 mORMot SOA Delphi Conference
Ekon20 mORMot SOA Delphi Conference Arnaud Bouchez
 
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference Ekon20 mORMot Legacy Code Technical Debt Delphi Conference
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference Arnaud Bouchez
 
D1 from interfaces to solid
D1 from interfaces to solidD1 from interfaces to solid
D1 from interfaces to solidArnaud Bouchez
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-designArnaud Bouchez
 
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMot
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMotDelphi ORM SOA MVC SQL NoSQL JSON REST mORMot
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMotArnaud Bouchez
 

Más de Arnaud Bouchez (20)

EKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdfEKON27-FrameworksTuning.pdf
EKON27-FrameworksTuning.pdf
 
EKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdfEKON27-FrameworksExpressiveness.pdf
EKON27-FrameworksExpressiveness.pdf
 
Ekon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsEkon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side Notifications
 
Ekon24 from Delphi to AVX2
Ekon24 from Delphi to AVX2Ekon24 from Delphi to AVX2
Ekon24 from Delphi to AVX2
 
Ekon24 mORMot 2
Ekon24 mORMot 2Ekon24 mORMot 2
Ekon24 mORMot 2
 
Ekon23 (2) Kingdom-Driven-Design applied to Social Media with mORMot
Ekon23 (2) Kingdom-Driven-Design applied to Social Media with mORMotEkon23 (2) Kingdom-Driven-Design applied to Social Media with mORMot
Ekon23 (2) Kingdom-Driven-Design applied to Social Media with mORMot
 
Object Pascal Clean Code Guidelines Proposal (at EKON 22)
Object Pascal Clean Code Guidelines Proposal (at EKON 22)Object Pascal Clean Code Guidelines Proposal (at EKON 22)
Object Pascal Clean Code Guidelines Proposal (at EKON 22)
 
Ekon21 Microservices - SOLID Meets SOA
Ekon21 Microservices - SOLID Meets SOAEkon21 Microservices - SOLID Meets SOA
Ekon21 Microservices - SOLID Meets SOA
 
Ekon21 Microservices - Event Driven Design
Ekon21 Microservices - Event Driven DesignEkon21 Microservices - Event Driven Design
Ekon21 Microservices - Event Driven Design
 
Ekon20 mORMot WorkShop Delphi
Ekon20 mORMot WorkShop DelphiEkon20 mORMot WorkShop Delphi
Ekon20 mORMot WorkShop Delphi
 
Ekon20 mORMot SOA Delphi Conference
Ekon20 mORMot SOA Delphi Conference Ekon20 mORMot SOA Delphi Conference
Ekon20 mORMot SOA Delphi Conference
 
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference Ekon20 mORMot Legacy Code Technical Debt Delphi Conference
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference
 
2016 mORMot
2016 mORMot2016 mORMot
2016 mORMot
 
A1 from n tier to soa
A1 from n tier to soaA1 from n tier to soa
A1 from n tier to soa
 
D1 from interfaces to solid
D1 from interfaces to solidD1 from interfaces to solid
D1 from interfaces to solid
 
A3 from sql to orm
A3 from sql to ormA3 from sql to orm
A3 from sql to orm
 
A2 from soap to rest
A2 from soap to restA2 from soap to rest
A2 from soap to rest
 
D2 domain driven-design
D2 domain driven-designD2 domain driven-design
D2 domain driven-design
 
A4 from rad to mvc
A4 from rad to mvcA4 from rad to mvc
A4 from rad to mvc
 
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMot
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMotDelphi ORM SOA MVC SQL NoSQL JSON REST mORMot
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMot
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Último (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

High Performance Object Pascal Code on Servers (at EKON 22)

  • 1. High Performance Pascal Code On Servers Arnaud Bouchez – Synopse / LiveMon High Performance Pascal Code On Servers
  • 2. High Performance Pascal Code On Servers Arnaud Bouchez – Delphi / FPC • Various solutions (from Vatican to gaming industry) • IoT solution (RSI) • Real-time Monitoring solution (LiveMon) – Open Source • mORMot (SOA ORM MVC framework) • SynPDF SynMustache SynDB SynCrypto – Training and consultancy • Synopse one-man company
  • 3. High Performance Pascal Code On Servers
  • 4. High Performance Pascal Code On Servers High Performance Pascal Code On Servers
  • 5. High Performance Pascal Code On Servers High Performance Pascal Code On Servers • High Performance • On Servers • In Pascal Code
  • 6. High Performance Pascal Code On Servers High Performance Pascal Code On Servers • High Performance • On Servers • In Pascal Code
  • 7. High Performance Pascal Code On Servers High Performance Make our Software Great Again (Donald K.)
  • 8. High Performance Pascal Code On Servers High Performance Make our Software Great Again (attributed to Donald K.)
  • 9. High Performance Pascal Code On Servers High Performance Premature Optimization is the root of all evil (D. Knuth)
  • 10. High Performance Pascal Code On Servers High Performance "Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."
  • 11. High Performance Pascal Code On Servers High Performance "Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."
  • 12. High Performance Pascal Code On Servers High Performance Premature Optimization is the root of all evil (D. Knuth)
  • 13. High Performance Pascal Code On Servers High Performance No Premature Optimization 1. Make it right, then make it fast Unit tests, then performance tests 2. Be Lazy Change only what is worth optimizing
  • 14. High Performance Pascal Code On Servers High Performance No Premature Optimization 1. Testing is everything to avoid regression when refactoring 2. Measure, don’t guess Use a profiler and/or performance logs
  • 15. High Performance Pascal Code On Servers High Performance Premature Optimization is the root of all evil (D. Knuth - again)
  • 16. High Performance Pascal Code On Servers High Performance Pascal Code On Servers • High Performance • On Servers • In Pascal Code
  • 17. High Performance Pascal Code On Servers On Servers Not your daddy’s RAD way • RAD is database centric creating proper indexes won’t hurt • RAD is for rich clients (a lot of) process / business logic is done on the client side
  • 18. High Performance Pascal Code On Servers On Servers REpresentational State Transfer (REST) • It is not easy to switch from RAD to REST but from proper isolation comes ( may/should come? ) better performance
  • 19. High Performance Pascal Code On Servers On Servers Scaling • Guess your needs, prepare for eventual Scaling is (really) hard Your company may not need GAFA scaling But you want to maximize ROI
  • 20. High Performance Pascal Code On Servers On Servers Scaling • Scaling is about uncoupling Get rid of identified Bottlenecks and Single Point of Failures
  • 21. High Performance Pascal Code On Servers On Servers Scaling • Database as Bottleneck from Vertical Scaling more CPU, RAM, switch to NVMe… to Horizontal Scaling add Microservices instances with their own storage
  • 22. High Performance Pascal Code On Servers On Servers Scaling • MicroServices with Local Storage Using Containers for API and DB servers (RDMS, NoSQL – MongoDB, Redis) Using stand-alone database (objects, SQLite3)
  • 23. High Performance Pascal Code On Servers On Servers Scaling • MicroServices with Local Storage Works as a local cache of data Updates made via Events
  • 24. High Performance Pascal Code On Servers On Servers Scaling • MicroServices with Local Storage Updates made via Events leads to Eventual Consistency Use a centralized DB for transactional data
  • 25. High Performance Pascal Code On Servers
  • 26. High Performance Pascal Code On Servers High Performance Pascal Code On Servers • High Performance • On Servers • In Pascal Code
  • 27. High Performance Pascal Code On Servers In Pascal Code From Existing: Reuse, Test and Publish • Reuse years (decades) of proven code • Opportunity to add/enhance testing • Open your solution to 3rd parties clients
  • 28. High Performance Pascal Code On Servers In Pascal Code For new projects: Object Pascal • Object Pascal is readable (by nature) safe (strong typing) abstract (strings, interfaces) fast (native/compiled, no GC)
  • 29. High Performance Pascal Code On Servers In Pascal Code For new projects: Object Pascal • Object Pascal is your favorite / most fluent language and you know your company business
  • 30. High Performance Pascal Code On Servers In Pascal Code Not only the Delphi Language • Complementary compilers/transpilers FPC, TMS WebCore, SmartMobileStudio, ElevateWebBuilder…
  • 31. High Performance Pascal Code On Servers In Pascal Code Not only the Delphi Language • Complementary compilers/transpilers low-level optimizations usually work for a single target compiler only JavaScript execution VM/JIT is very specific
  • 32. High Performance Pascal Code On Servers In Pascal Code The Last Resort • Best performance comes from design But code optimization may help
  • 33. High Performance Pascal Code On Servers In Pascal Code Make it Fast? • Make it right then • Make your Design Fast • Make your Code Fast
  • 34. High Performance Pascal Code On Servers High Performance Pascal Code On Servers • High Performance • On Servers • In Pascal Code Make your design fast Make your code fast
  • 35. High Performance Pascal Code On Servers Make your Design Fast • Measure against your company goals Identify the bottlenecks - Profiling (on dev/coder side) - Performance Logging (client/prod side)
  • 36. High Performance Pascal Code On Servers Make your Design Fast • Profiling External Tools (AQTime, DelphiTools…) Running on real-live usecases using automated load stress tests
  • 37. High Performance Pascal Code On Servers Make your Design Fast • Client/prod side performance logging Log Timing of Database Statements SOA/REST methods calls Main identified bottleneck functions into logs – as text or DB (SQLite3)
  • 38. High Performance Pascal Code On Servers Make your Design Fast • Client/prod side performance logging Log Timing as part of mORMot SQL, SOA on multiple threads → show some real logs
  • 39. High Performance Pascal Code On Servers Make your Design Fast • Cache is your friend In-process Cache MicroService local DB preloading the most used values mORMot TSynDictionary in RAM
  • 40. High Performance Pascal Code On Servers Make your Design Fast • Cache is your friend Shared Cache Dedicated Service REDIS Server
  • 41. High Performance Pascal Code On Servers High Performance Pascal Code On Servers • High Performance • On Servers • In Pascal Code Make your design fast Make your code fast
  • 42. High Performance Pascal Code On Servers Make your Code Fast • Processors are very complex beasts https://www.agner.org/optimize
  • 43. High Performance Pascal Code On Servers Make your Code Fast
  • 44. High Performance Pascal Code On Servers Make your Code Fast
  • 45. High Performance Pascal Code On Servers Make your Code Fast Shut down the profiler, keep your regression tests close, and let’s begin the fun ! (from the most obvious to the most tenuous)
  • 46. High Performance Pascal Code On Servers Make your Code Fast Shut down the profiler, keep your regression tests close, and let’s begin the fun ! (and don’t take my word for it)
  • 47. High Performance Pascal Code On Servers Make your Code Fast • Avoid Unneeded Calls Cache and reuse values
  • 48. High Performance Pascal Code On Servers Make your Code Fast • Use Tuned Libraries Written with performance in mind Hardware accelerated (AES-NI, crc32c) Link some C code known for efficiency
  • 49. High Performance Pascal Code On Servers Make your Code Fast • Avoid Memory Allocation Heap allocation has a cost, especially on multi-threaded applications
  • 50. High Performance Pascal Code On Servers Make your Code Fast • Avoid Copies or Reference Counting By using const or var input parameters
  • 51. High Performance Pascal Code On Servers Make your Code Fast • Avoid Hidden try..finally Blocks By using a sub-function when managed types are involved
  • 52. High Performance Pascal Code On Servers Make your Code Fast • Better Register Allocation By using a sub-function for loops
  • 53. High Performance Pascal Code On Servers Make your Code Fast • Faster Data Structures (Dynamic) arrays put all data in a row are likely to stay in L1 cache can be accessed using TDynArray wrapper
  • 54. High Performance Pascal Code On Servers • Questions? High Performance Pascal Code On Servers