Whether we like it or not we use ORMs a lot. We know that their advantages come with many disadvantages, we still use them though, just to spare precious development time. But in the end we burn a lot more on maintenance, performance enhancements and obscure hacks. So do they really worth the fuss?
The document discusses best practices for building web applications that can scale to large numbers of users. It recommends choosing technologies you are familiar with and avoiding frameworks, using caching extensively through memcached and flat files, testing queries and indexes, and sharding databases horizontally and vertically. The author shares their experiences scaling applications at previous companies like Stardoll and Spotify, emphasizing metrics collection and analyzing bottlenecks.
Things that can go wrong when you're writing a cloud orchestration suite, or pretty much any other kind of highly available distributed system in Erlang (or other programming languages)
Collaboration Tools and Methods in Software DevelopmentStefan Fodor
This document discusses collaboration tools and methods for software development. It describes tools the authors have used like Git and Bitbucket for version control and sharing code. It acknowledges they still need to learn advanced branching, conflict resolution, and proper merging with Git. It also mentions setting up UML diagrams, documentation standards, and bug tracking tools going forward to improve efficiency and reduce issues from working on shared code. The document ends by thanking the reader and opening the floor for any questions.
E' complicato creare uno strumento RPA? Diciamo che non è semplice. Ma se prendiamo in considerazione gli applicativi web, abbiamo a disposizione gli headless browsers che ci possono dare una mano per implementare dei task. E con Azure, facciamo hosting del processo in Cloud. Vediamo come.
RubyConf China 2015 - Rails off assets pipelineFlorian Dutey
Asset pipeline is dead. FrontEnd world has much better tools to handle their needs. Here's some solutions to get rid of it and move into modern Rich Client development era.
This document summarizes one company's experience migrating their PHP e-commerce site to the Go programming language. It discusses how they initially rewrote their catalog page in AngularJS and Go, but ran into issues with Facebook OpenGraph integration. For their second release, they decided on a hybrid PHP and Go approach, with Go used to power specific backend modules like caching and shopping cart functionality. The author reflects on lessons learned around thoroughly evaluating new technologies before deploying them and making sure any changes have team consensus.
The document discusses best practices for building web applications that can scale to large numbers of users. It recommends choosing technologies you are familiar with and avoiding frameworks, using caching extensively through memcached and flat files, testing queries and indexes, and sharding databases horizontally and vertically. The author shares their experiences scaling applications at previous companies like Stardoll and Spotify, emphasizing metrics collection and analyzing bottlenecks.
Things that can go wrong when you're writing a cloud orchestration suite, or pretty much any other kind of highly available distributed system in Erlang (or other programming languages)
Collaboration Tools and Methods in Software DevelopmentStefan Fodor
This document discusses collaboration tools and methods for software development. It describes tools the authors have used like Git and Bitbucket for version control and sharing code. It acknowledges they still need to learn advanced branching, conflict resolution, and proper merging with Git. It also mentions setting up UML diagrams, documentation standards, and bug tracking tools going forward to improve efficiency and reduce issues from working on shared code. The document ends by thanking the reader and opening the floor for any questions.
E' complicato creare uno strumento RPA? Diciamo che non è semplice. Ma se prendiamo in considerazione gli applicativi web, abbiamo a disposizione gli headless browsers che ci possono dare una mano per implementare dei task. E con Azure, facciamo hosting del processo in Cloud. Vediamo come.
RubyConf China 2015 - Rails off assets pipelineFlorian Dutey
Asset pipeline is dead. FrontEnd world has much better tools to handle their needs. Here's some solutions to get rid of it and move into modern Rich Client development era.
This document summarizes one company's experience migrating their PHP e-commerce site to the Go programming language. It discusses how they initially rewrote their catalog page in AngularJS and Go, but ran into issues with Facebook OpenGraph integration. For their second release, they decided on a hybrid PHP and Go approach, with Go used to power specific backend modules like caching and shopping cart functionality. The author reflects on lessons learned around thoroughly evaluating new technologies before deploying them and making sure any changes have team consensus.
The document is a presentation by Benjamin Coverston from DataStax on NoSQL, Big Data, and Real Time. It discusses what NoSQL is, the challenges of scaling databases for Big Data use cases, and strategies for building scalable systems, including avoiding synchronous transactions and coupling. It promotes DataStax Enterprise as a solution that makes many of the difficult aspects of scaling databases possible.
An introduction to event sourcing and CQRS. After the basics and some of the tradeoffs of this particular choice are covered, I include some "lessons from the trenches" aimed at helping begginers with these patterns.
This is a presentation given in London microservices user group on 9th of August 2018.
Scaling a High Traffic Web Application: Our Journey from Java to PHP120bi
What makes an application scale? What should you worry about early on and what can wait?
Over the last 3 years, Achievers has learned many lessons and gained fundamental knowledge on scaling our SaaS platform. CTO Dr. Aris Zakinthinos will present and discuss the decisions we’ve made including language choice, server architecture, and much more; join us while we share tips, tricks, and things to absolutely avoid.
Throughout the evening you will have the opportunity to talk to the development team behind the Achievers Platform and ask questions on scaling best practices.
Best practices with development of enterprise-scale SharePoint solutions - Pa...SPC Adriatics
This session discusses and shares with you best practices and rules for developing enterprise-scale SharePoint solutions, which need to be highly performant, scalable, and secure. You will learn how to design and create SharePoint solutions capable to support large number of users, and a huge number of transactions. Moreover, you will understand how to tune performances, and will see common dos and don’ts of real SharePoint projects. All the topics and samples will target server-side code and full-trust code solutions in on-premises environment.
This document discusses challenges and considerations for leveraging machine learning and big data. It covers the full machine learning lifecycle from data acquisition and cleaning to model deployment and monitoring. Key points include the importance of feature engineering, selecting the right frameworks, addressing barriers to operationalizing models, and deciding between single node versus distributed solutions based on data and algorithm characteristics. Python is presented as a flexible tool for prototyping solutions.
REST APIs require just as much design effort as traditional APIs and leverage a unique skillset. To make matters worse, very few people building REST APIs have experience building world-class services. This almost always results in breaking changes. In this talk we will dive deep into concrete examples learned from building some of the world's largest REST APIs. We will examine several specific points of guidance and then attempt to extrapolate more general principles for future-proofing REST APIs.
The document discusses some of the shortcomings of object-relational mapping (ORM) frameworks. It argues that ORMs can lead developers to go fast initially but end up going slow, as ORMs don't allow for efficient database use and can result in poor code quality. The document also explains that relational data is about subsets of data, not individual objects, and that developers should take control of SQL and understand database concepts rather than relying solely on ORM frameworks.
The No Good, Terrible, Very Bad Web Form — HighEdWeb 2014FormAssembly
FormAssembly's presentation at HighEdWeb 2014! #heweb14
Web form design can suck, but it doesn't have to! In this session, we explore the true horrors of bad form design. We discuss the many things you shouldn't do with online forms, and what best practices you should follow. You'll be better equipped to fit your forms into your content strategy, increase engagement, and compel your audience to take action.
This document discusses Scala as a language for fast data and architectures for fast data systems. It provides an overview of Scala's advantages for fast data including its JVM compatibility, type safety, concise syntax, and support for functional programming. It also discusses why Scala is preferable to other languages like Java, Python, Go, and C++ for fast data workloads. The document outlines some of the tradeoffs involved in architecting systems for fast data and emphasizes approaches like isolation, event-driven data management, and "ACID v2" to build scalable fast data systems.
- The document evaluates criteria for choosing between NoSQL technologies like MongoDB and Redis.
- It discusses two use cases at Offers.com and how Redis was chosen for the first use case due to its fast reads/writes and data persistence, while MongoDB was chosen for the second use case due to its document-oriented data model and flexibility.
- Some downsides discussed are lack of data safety guarantees in MongoDB and lack of abstraction between NoSQL systems.
The document discusses automation in cloud computing. It introduces the topics to be covered, which are why automation is needed, what needs to be automated, and how it can be done using scripting languages or frameworks. Popular automation frameworks that are mentioned include Chef, Puppet, Cfengine, and Capistrano. The document provides an overview and demo of automation techniques.
Tech Talks_04.07.15_Session 4_Vladimir Iliev_Inter-thread Messaging With Disr...EPAM_Systems_Bulgaria
The document discusses challenges with using queues for inter-thread messaging on modern CPU architectures. It presents the Disruptor as an alternative that is better optimized for throughput and latency. The Disruptor aims for simplicity with a single-writer principle and avoids resizing and locking overhead that hurt performance of traditional queues. It demonstrates the Disruptor can achieve much higher throughput and lower latency than an array-backed queue by taking advantage of CPU optimizations like pre-fetching. The key is understanding how hardware works and keeping code clean and simple.
The 6 Common Data Collection Mistakes You May Be MakingCartegraph
Is your organization committing some of the most common data collection mistakes? Uncover asset data collection basics while highlighting common missteps municipalities make along the way.
The rise of NoSQL is characterized with confusion and ambiguity; very much like any fast-emerging organic movement in the absence of well-defined standards and adequate software solutions. Whether you are a developer or an architect, many questions come to mind when faced with the decision of where your data should be stored and how it should be managed. The following are some of these questions: What does the rise of all these NoSQL technologies mean to my enterprise? What is NoSQL to begin with? Does it mean "No SQL"? Could this be just another fad? Is it a good idea to bet the future of my enterprise on these new exotic technologies and simply abandon proven mature Relational DataBase Management Systems (RDBMS)? How scalable is scalable? Assuming that I am sold, how do I choose the one that fit my needs best? Is there a middle ground somewhere? What is this Polyglot Persistence I hear about? The answers to these questions and many more is the subject of this talk along with a survey of the most popular of NoSQL technologies. Be there or be square.
The document provides hints for debugging machine learning systems. It discusses 9 common failure modes and suggestions for addressing each:
1. Check your code - write tests, follow good coding practices.
2. Check your data - audit for quality issues like outliers and missing values.
3. Examine your features - try transformations, combinations, decorrelation, and understand important features.
4. Examine data points - find difficult cases and understand them or remove outliers.
5. Examine your model - use simple models or introspection tools to understand predictions.
6. Watch for overfitting - models may fit noise in training data.
7. Watch for data leakage - separating data properly
Developers arriving at the Serverless scene usually find it hard to use the previous methodologies and tools they are used to in this new arena. Why? Because you can’t run Serverless locally. Up until now, a developer could spin a container or install PostgreSQL or NGNIX on their machine and start playing. The cycle of code → build → test was reasonably fast, but now it changed, building and testing cannot run locally, they have to run in the cloud which causes developers to lose productivity.
How do we change it? How do we keep the same productivity levels while enjoying the benefits of Serverless.
The following session will cover:
Reasons for a slow development cycle in Serverless environments
Tips and tricks for speeding up the development flow
Relational data modeling trends for transactional applicationsIke Ellis
This document provides a summary of Ike Ellis's presentation on data modeling priorities and design patterns for transactional applications. The presentation discusses how data modeling priorities have changed from focusing on writes and normalization to emphasizing reads, flexibility, and performance. It outlines several current design priorities including optimizing the schema for reads, making it easy to change and discoverable, and designing for the network instead of the disk. The presentation concludes with practicing modeling data for example transactional applications like a blog, online store, and refrigeration trucks.
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
The document is a presentation by Benjamin Coverston from DataStax on NoSQL, Big Data, and Real Time. It discusses what NoSQL is, the challenges of scaling databases for Big Data use cases, and strategies for building scalable systems, including avoiding synchronous transactions and coupling. It promotes DataStax Enterprise as a solution that makes many of the difficult aspects of scaling databases possible.
An introduction to event sourcing and CQRS. After the basics and some of the tradeoffs of this particular choice are covered, I include some "lessons from the trenches" aimed at helping begginers with these patterns.
This is a presentation given in London microservices user group on 9th of August 2018.
Scaling a High Traffic Web Application: Our Journey from Java to PHP120bi
What makes an application scale? What should you worry about early on and what can wait?
Over the last 3 years, Achievers has learned many lessons and gained fundamental knowledge on scaling our SaaS platform. CTO Dr. Aris Zakinthinos will present and discuss the decisions we’ve made including language choice, server architecture, and much more; join us while we share tips, tricks, and things to absolutely avoid.
Throughout the evening you will have the opportunity to talk to the development team behind the Achievers Platform and ask questions on scaling best practices.
Best practices with development of enterprise-scale SharePoint solutions - Pa...SPC Adriatics
This session discusses and shares with you best practices and rules for developing enterprise-scale SharePoint solutions, which need to be highly performant, scalable, and secure. You will learn how to design and create SharePoint solutions capable to support large number of users, and a huge number of transactions. Moreover, you will understand how to tune performances, and will see common dos and don’ts of real SharePoint projects. All the topics and samples will target server-side code and full-trust code solutions in on-premises environment.
This document discusses challenges and considerations for leveraging machine learning and big data. It covers the full machine learning lifecycle from data acquisition and cleaning to model deployment and monitoring. Key points include the importance of feature engineering, selecting the right frameworks, addressing barriers to operationalizing models, and deciding between single node versus distributed solutions based on data and algorithm characteristics. Python is presented as a flexible tool for prototyping solutions.
REST APIs require just as much design effort as traditional APIs and leverage a unique skillset. To make matters worse, very few people building REST APIs have experience building world-class services. This almost always results in breaking changes. In this talk we will dive deep into concrete examples learned from building some of the world's largest REST APIs. We will examine several specific points of guidance and then attempt to extrapolate more general principles for future-proofing REST APIs.
The document discusses some of the shortcomings of object-relational mapping (ORM) frameworks. It argues that ORMs can lead developers to go fast initially but end up going slow, as ORMs don't allow for efficient database use and can result in poor code quality. The document also explains that relational data is about subsets of data, not individual objects, and that developers should take control of SQL and understand database concepts rather than relying solely on ORM frameworks.
The No Good, Terrible, Very Bad Web Form — HighEdWeb 2014FormAssembly
FormAssembly's presentation at HighEdWeb 2014! #heweb14
Web form design can suck, but it doesn't have to! In this session, we explore the true horrors of bad form design. We discuss the many things you shouldn't do with online forms, and what best practices you should follow. You'll be better equipped to fit your forms into your content strategy, increase engagement, and compel your audience to take action.
This document discusses Scala as a language for fast data and architectures for fast data systems. It provides an overview of Scala's advantages for fast data including its JVM compatibility, type safety, concise syntax, and support for functional programming. It also discusses why Scala is preferable to other languages like Java, Python, Go, and C++ for fast data workloads. The document outlines some of the tradeoffs involved in architecting systems for fast data and emphasizes approaches like isolation, event-driven data management, and "ACID v2" to build scalable fast data systems.
- The document evaluates criteria for choosing between NoSQL technologies like MongoDB and Redis.
- It discusses two use cases at Offers.com and how Redis was chosen for the first use case due to its fast reads/writes and data persistence, while MongoDB was chosen for the second use case due to its document-oriented data model and flexibility.
- Some downsides discussed are lack of data safety guarantees in MongoDB and lack of abstraction between NoSQL systems.
The document discusses automation in cloud computing. It introduces the topics to be covered, which are why automation is needed, what needs to be automated, and how it can be done using scripting languages or frameworks. Popular automation frameworks that are mentioned include Chef, Puppet, Cfengine, and Capistrano. The document provides an overview and demo of automation techniques.
Tech Talks_04.07.15_Session 4_Vladimir Iliev_Inter-thread Messaging With Disr...EPAM_Systems_Bulgaria
The document discusses challenges with using queues for inter-thread messaging on modern CPU architectures. It presents the Disruptor as an alternative that is better optimized for throughput and latency. The Disruptor aims for simplicity with a single-writer principle and avoids resizing and locking overhead that hurt performance of traditional queues. It demonstrates the Disruptor can achieve much higher throughput and lower latency than an array-backed queue by taking advantage of CPU optimizations like pre-fetching. The key is understanding how hardware works and keeping code clean and simple.
The 6 Common Data Collection Mistakes You May Be MakingCartegraph
Is your organization committing some of the most common data collection mistakes? Uncover asset data collection basics while highlighting common missteps municipalities make along the way.
The rise of NoSQL is characterized with confusion and ambiguity; very much like any fast-emerging organic movement in the absence of well-defined standards and adequate software solutions. Whether you are a developer or an architect, many questions come to mind when faced with the decision of where your data should be stored and how it should be managed. The following are some of these questions: What does the rise of all these NoSQL technologies mean to my enterprise? What is NoSQL to begin with? Does it mean "No SQL"? Could this be just another fad? Is it a good idea to bet the future of my enterprise on these new exotic technologies and simply abandon proven mature Relational DataBase Management Systems (RDBMS)? How scalable is scalable? Assuming that I am sold, how do I choose the one that fit my needs best? Is there a middle ground somewhere? What is this Polyglot Persistence I hear about? The answers to these questions and many more is the subject of this talk along with a survey of the most popular of NoSQL technologies. Be there or be square.
The document provides hints for debugging machine learning systems. It discusses 9 common failure modes and suggestions for addressing each:
1. Check your code - write tests, follow good coding practices.
2. Check your data - audit for quality issues like outliers and missing values.
3. Examine your features - try transformations, combinations, decorrelation, and understand important features.
4. Examine data points - find difficult cases and understand them or remove outliers.
5. Examine your model - use simple models or introspection tools to understand predictions.
6. Watch for overfitting - models may fit noise in training data.
7. Watch for data leakage - separating data properly
Developers arriving at the Serverless scene usually find it hard to use the previous methodologies and tools they are used to in this new arena. Why? Because you can’t run Serverless locally. Up until now, a developer could spin a container or install PostgreSQL or NGNIX on their machine and start playing. The cycle of code → build → test was reasonably fast, but now it changed, building and testing cannot run locally, they have to run in the cloud which causes developers to lose productivity.
How do we change it? How do we keep the same productivity levels while enjoying the benefits of Serverless.
The following session will cover:
Reasons for a slow development cycle in Serverless environments
Tips and tricks for speeding up the development flow
Relational data modeling trends for transactional applicationsIke Ellis
This document provides a summary of Ike Ellis's presentation on data modeling priorities and design patterns for transactional applications. The presentation discusses how data modeling priorities have changed from focusing on writes and normalization to emphasizing reads, flexibility, and performance. It outlines several current design priorities including optimizing the schema for reads, making it easy to change and discoverable, and designing for the network instead of the disk. The presentation concludes with practicing modeling data for example transactional applications like a blog, online store, and refrigeration trucks.
Ähnlich wie Our Love/Hate relationship with ORMs (20)
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
DDS Security Version 1.2 was adopted in 2024. This revision strengthens support for long runnings systems adding new cryptographic algorithms, certificate revocation, and hardness against DoS attacks.
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Odoo ERP software
Odoo ERP software, a leading open-source software for Enterprise Resource Planning (ERP) and business management, has recently launched its latest version, Odoo 17 Community Edition. This update introduces a range of new features and enhancements designed to streamline business operations and support growth.
The Odoo Community serves as a cost-free edition within the Odoo suite of ERP systems. Tailored to accommodate the standard needs of business operations, it provides a robust platform suitable for organisations of different sizes and business sectors. Within the Odoo Community Edition, users can access a variety of essential features and services essential for managing day-to-day tasks efficiently.
This blog presents a detailed overview of the features available within the Odoo 17 Community edition, and the differences between Odoo 17 community and enterprise editions, aiming to equip you with the necessary information to make an informed decision about its suitability for your business.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
4. 4CONFIDENTIAL
The LOVE
Why do we use ORMs?
• To use the Domain Model pattern
• To make data access more abstract and portable
• To move the BL to DAL
• To avoid writing SQL queries
8. 8CONFIDENTIAL
The HATE
Why do we hate using ORMs?
• They are bloatware
• They are blackbox
• They tend to be slow
• They fail to compete against complex queries
• They are not the adequate way to do relational queries
To use Domain Model pattern:
About a decade ago Udi Dahan said: „There is one main reason to use an object/relational mapper, and that is to implement the Domain Model pattern” Which is a nice thing, but be honest, do we use ORMs because of that? Hell no.
To make data access more abstract and portable
That’s another nice thing, and a common pro when people are talking about the advantages of ORMs. They know how to generate vendor-specific SQL queries so you don’t have to worry about that. But let me ask it again: do we you ORMs because of that? No, not really. It’s like choosing jQuery just because it hides all the obscure differences between various browser types and versions. As I said, it’s a nice thing, a nice to have feature, and a big pro, but it surely isn’t the main driver behind choosing it.
To move the BL to DAL
Now we are getting closer. Back then all the business logic were in stored procedures, functions, triggers and whatnot. And everybody who ever worked on a legacy project knows how much pain in the ass that can be. Poorly written stored procedures with zero documentation, no version controlling whatsoever and hacks, hacks everywhere. The urge to move and encapsulate the business logic a bit higher, to write it down in a readable and maintainable OOP language is really strong in developers. And if we do that we have to introduce domain models and then we can go back to Udi’s words and use ORMs. That’s a strong argument, but it’s still not the final answer.
To avoid writing SQL queries
Now that’s the real driver here! We are kinda lazy, we don’t like to write SQL queries, LINQ is much cooler anyway, plus query literals are pretty ugly too. We can also spare writing a lot of lame CRUD methods, we don’t have to map types, and we can have code first too! Those are the real benefits here! Everything else is just a mixture of buzzwords and convenient excuses. SQL makes our code noisy and ugly and we do everything in order to avoid that.
From another aspect let me just collect the most important benefits of ORMs we really like
LINQ
LINQ is the shit, right? We like its fluent API, its very essence of elegance. LINQ is one of the most coolest feature of C# and we love to use it wherever we can. And even better if it can hide those ugly SQL queries we don’t like. It’s a win-win situation, right?
Object mapping
The second most important feature, because there isn’t anything more boring and annoying than to bother with type mapping. Map booleans to bits, enums to integers, byte arrays to blobs or varbinaries and all of those vice versa, to suck with nullables, format datetimes and all those annoying things. An ORM can take care all of those (with some limitations of course) and you don’t have to worry about to find the SQL equivalent of any .NET type.
IntelliSense
Code completion is another important feature, I’m sure I don’t have to explain why. It helps to avoid typos and on another level, if you don’t have to use string literals it’s much easier to do refactors.
Compile-time query checking
It’s kinda related to the previous one and needs to explanation. Highly improves code quality, you don’t have to check the query syntax, it gives you a protection against SQL injection attacks, etc. Just like all the above it spares you a lot of precious development time.
It just doesn’t end, does it? :) ORMs provide features on a so wide range that it’s nearly impossible to collect all and they hold different importance to different people. Some of these are even in the grey area, they can be both pro or con. For instance lazy loading is the ORM equivalent of the auto-correct on mobile phones, meaning they treat the symptoms only not the real cause behind it. The same goes for caching, of course. These features exist only to speed up things.
And if we are talking about Code first. It’s a pretty convenient way to create databases locally on the dev environments, but just simply doesn’t work in case of a production environment. Or it actually can, but it’s a really-really bad anti-pattern.
They are bloatware
Huge ORMs with hundreds of thousands lines of code know a lot, have a lots of features and they put a massive overhead on your solution. They are so complex and robust that it takes infinite amount of time to master them. Most of us just aren’t qualified enough to use them properly. Alternatively this led to the rise of the microORM solutions where they threw out the unnecessary and most problematic features and they focus on the one thing ORMs should be about: object-relation mapping. Therefore they got rid of all the fancy features, even the LINQ support and they provide a solution where you have to write your own queries – bringing back the unwanted code smells – and it will just take care of the mapping and the mapping only.
The third way is – any many critics suggest that – you should come up with your own lightweight alternative. We did that on our project recently, I’m going to talk about that later.
They are blackbox
What people usually hate about ORMs that they don’t exactly know how they work, a lots of logic is hidden, and top of that if it generates ugly, unreadable and often inoptimal SQL queries, and you cannot really do anything against it, because they provide minimal customizability or extensibility. Most of the ORMs are following the closed/closed principle, they are both closed for modification and extension. Which immediately leads to hacking, trust me, I’ve been there many-many times. :)
So ORMs tend to be blackboxes, you can never be sure what truly happens in them, and which input’s going to cause a terrible outcome. Plus as I mentioned earlier, it’s really hard to master them, people can even suffer loss in developer productivity whilst they learn to program with a specific ORM.
They tend to be slow
This is one of the most common con out there. They hold a huge overhead and on top of that they can be slow as hell too. Why? There can be many reasons:
They don’t generate an optimal query, making it unnecessarily complex or in some weird cases they are just unable to filter everything on the SQL side, so they just read all the data and filter them later in memory, which is no wonder that tend to be slow
The latter isn’t just slow because you move unnecessary data between the channels, but because you have to map a lot of unnecessary objects. Remember, there is reflection behind most ORMs, plus you waste memory, you give more job to the GC, etc.
They are not designed for bulk operations, so if you are working on a project where performance is one of the highest quality attribute you are going to have a baaaad time.
They fail to compete against complex queries
Another important problem that when it comes to complex queries they simply fail. Think about joins, nested queries, unions, etc., it’s really difficult to manage them with ORMs. Especially when performance is a critical thing. In case of my recent project I had to „extend” LINQ2SQL with a lot of custom solutions to support these kind of things. And even though I failed with joins. But at least I was able to create custom SQL query generator to support nesting, unions and bulk operations as well. With nesting I was able to avoid some scenarios where the textbox examples use joins. So there’s a way to overcome these limitations, but it takes a lot of time and leads to a custom lightweight ORM solution I mentioned earlier, which of course has it’s own drawbacks.
They are not the adequate way to do relational queries
And last but not least here’s the biggest con of all time about ORMS. Relational data and object-oriented programming are essentially and fundamentally two different things. Mapping between them is hard, and sometimes even impossible. This approach violates all principles of object-oriented programming, tearing objects apart and turning them into dump and passive data bags. Some developers considers it an offensive anti-pattern because of this and claiming that the entire idea is wrong behind ORMs and that it’s invention was the biggest mistake of all time.
Because this is the idea, right? That it should be that simple. Here are your objects, you map them (doesn’t really matter how complex and obscure logic is inside this box) and there you go, you can persist your data to the relational database.
In reality it looks more like this. You cannot encapsulate database interaction inside of an object, instead it extracts it away, literally tearing a solid and cohesive living organism apart. In most cases the data is represented in a whole different structure than your code would need it, so you have to do constant magic and wizardry with the data, join them, split them, transform them, index them, cache them, etc.
So in short objects are not an adequate way of expressing the results of relational queries, and the inadequacy of the mapping of queries to objects leads to a fundamental inefficiency in ORM-backed applications that is pervasive, distributed, and therefore not easily fixed without abandoning ORM entirely.
These all lead to one ultimate question when you are about to start a project and ORM is an option: „What should I do?”
Or, alternatively: „Is there a silver bullet?” But I guess you all know the answer for that one: „No”.
Which means the ultimate answer for the ultimate question is also pretty simple: „It depends.”
Use object stores (NoSQL)
If your data is objects, you can always stop using a relational database. Just because SQL is the traditional way it doesn’t necessarily mean that you should stick to that. The world is currently awash with key-value stores that will allow you to hold elegant, self-contained data structures in huge quantities and they will be much faster than a relational database.
Accept it
If your data is relational in nature, you have to work with an existing database, or if you simply don’t have the expertise in your team, you can still accept the fact that ORMs come with a lot of drawbacks.
In this case you have still three options left:
Choose Entity Framework
Or something the team already knows and can handle with care, like LINQ2SQL. But right now EF is the de facto standard in the .NET world, so that’s the easiest to go with.Try to avoid complex queries and hope for the best that the project won’t increase in complexity too fast. Because if it does, you end up delivering a slow and/or mixed up solution where you force your dev to use SQL instead here and there. Mostly where the performance is the most critical. Try to avoid using TPH (Table per hierarchy) or similar where you have to store inheritance in database. EF doesn’t handle those scenarios well making it even more slow and it has got ridiculous limitations.
Choose a microORM
If you don’t mind losing a lot of cool features using a microORM can be a good alternative. Personally I don’t like them because their fluent API is nothing like LINQ, but I understand they got rid of that for a reason. Anyway, as I mentioned, if you don’t mind writing SQL queries and pollute your code with a lot of literals then go ahead. Just keep in mind something: compared to Dapper LINQ 2 SQL has got absolutely minimal overhead, most of the queries can run on the same speed.
I made a bunch of performance tests at the beginning of my current project and turned out that for us LINQ2SQL is the best choice, because it can run on the same speed as Dapper and we don’t have to write any SQL queries manually. It’s the real win-win, eh?
Well, not exactly.
Go with a custom solution
Eventually we ended up developing a custom hybrid solution. As I mentioned earlier I had to „extend” LINQ2SQL to support all our needs. And there’s a big emphasis on the extend word, because we cannot speak about real extension here. My hybrid solution was that where LINQ2SQL lacked capabilities, I added new extension methods and we used them instead. But because LINQ2SQL is pretty sealed, it was easier to generate custom SQL queries than hack it to the core. Earlier I got so fed up with Entity Framework that I decided to write my very own ORM. Why? I just wanted to see how hard can it be to do it properly. And yeah, it’s hard. That’s the lesson learned here. :) So keep that in mind when you decide to go with a custom thing.
But custom solution can be anything. You can even choose to do everything by yourselves, open direct SQL connections, map the datarows, create all the CRUD methods, etc. Nobody wants to do that, though. :) But if we are talking about the latter, the CRUD methods, I mentioned earlier that it’s a big pro on the ORM side that you don’t have to worry about the CRUD, the ORM takes care of that. However when you introduce the Repository pattern, which is quite famous nowadays, the CRUD methods simply come back. Which means you lose one of the perks of using ORMs anyway.
And that’s all I wanted to share. As you can see there’s no silver bullet, ORMs have a lot of drawbacks, but we still need them, because they have their advantages. It’s just like SQL. There are a lot of other data storage options out there, but SQL is till alive and a lot of projects rely on it. And not just legacy projects. There are scenarios where using SQL is a good choice. Just like an ORM. Whether we love them or hate them.