Lean Android applications with small APK sizes and low method counts are hard to come by nowadays as some of the most used libraries such as AppCompat and Play Services continue to grow in size. In an increasingly mobile first world, it important to try and maintain a lean application in order to avoid loading extra DEX files, slowing down local development builds and increasing the size of the updates you ship to your customers.
This talk is centered around how I was able to lower Yammer for Android’s method count down to a single DEX and will give several tips on how to help you lower the number of methods and overall APK size of your application.
The Road To Single Dex (GDG San Francisco Meetup)Jared Burrows
Lean Android applications with small APK sizes and low method counts are hard to come by nowadays as some of the most used libraries such as AppCompat and Play Services continue to grow in size. In an increasingly mobile first world, it important to try and maintain a lean application in order to avoid loading extra DEX files, slowing down local development builds and increasing the size of the updates you ship to your customers.
This talk is centered around how I was able to lower Yammer for Android’s method count down to a single DEX and will give several tips on how to help you lower the number of methods and overall APK size of your application.
Use case for using the ElastiCache for Redis in production知教 本間
This document discusses using ElastiCache for Redis in production. It begins with an introduction to the author and their role at gumi Inc. It then provides an overview of Redis operations and data persistence methods. The document outlines gumi's migration from memcached to Redis, including their use of master-slave replication and multiple databases. It notes potential issues with ElastiCache for Redis like lack of auto failover and inability to change instance types. In summary, while some features are still missing, ElastiCache for Redis allows quick node provisioning and has proven reliable for gumi despite initial function gaps.
This document discusses writing modular and encapsulated Redis code. It introduces the concepts of promises and futures as they relate to Redis pipelines and transactions. Promises schedule Redis operations, returning future objects that can be transformed and bound to variables. This approach separates data access logic from business logic, making the code more readable, maintainable and refactorable compared to do-everything functions.
Tailoring Redis Modules For Your Users’ NeedsRedis Labs
This document discusses using Redis modules to tailor Redis for users' needs. Redis modules allow adding new commands, data types, and APIs to Redis in order to make Redis understand custom data, speak custom languages, and do custom work. With modules, code can be consolidated across platforms, network hops minimized, and computation moved closer to data. The ReDe module is provided as an example of implementing an event dehydration algorithm in Redis using a module.
Peek behind the scenes to learn about Amazon ElastiCache's design and architecture. See common design patterns of our Memcached and Redis offerings and how customers have used them for in-memory operations and achieved improved latency and throughput for applications. During this session, we review best practices, design patterns, and anti-patterns related to Amazon ElastiCache.
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...confluent
The document discusses securing connections between KSQL and Kafka. It covers enabling encryption using TLS for the KSQL-Kafka connection. It also covers enabling authentication using SASL and authorization using Kafka ACLs. It provides configuration examples for securing each part of the connection and recommends configuring the KSQL output topic name prefix to more easily manage ACLs for output topics.
Trend Micro uses Hadoop for processing large volumes of web data to quickly identify and block malicious URLs. They have expanded their Hadoop cluster significantly over time to support growing data and job volumes. They developed Hadooppet to automate deployment and management of their large, customized Hadoop distribution across hundreds of nodes. Profiling tools like Nagios, Ganglia and Splunk help monitor and troubleshoot cluster performance issues.
The Road To Single Dex (GDG San Francisco Meetup)Jared Burrows
Lean Android applications with small APK sizes and low method counts are hard to come by nowadays as some of the most used libraries such as AppCompat and Play Services continue to grow in size. In an increasingly mobile first world, it important to try and maintain a lean application in order to avoid loading extra DEX files, slowing down local development builds and increasing the size of the updates you ship to your customers.
This talk is centered around how I was able to lower Yammer for Android’s method count down to a single DEX and will give several tips on how to help you lower the number of methods and overall APK size of your application.
Use case for using the ElastiCache for Redis in production知教 本間
This document discusses using ElastiCache for Redis in production. It begins with an introduction to the author and their role at gumi Inc. It then provides an overview of Redis operations and data persistence methods. The document outlines gumi's migration from memcached to Redis, including their use of master-slave replication and multiple databases. It notes potential issues with ElastiCache for Redis like lack of auto failover and inability to change instance types. In summary, while some features are still missing, ElastiCache for Redis allows quick node provisioning and has proven reliable for gumi despite initial function gaps.
This document discusses writing modular and encapsulated Redis code. It introduces the concepts of promises and futures as they relate to Redis pipelines and transactions. Promises schedule Redis operations, returning future objects that can be transformed and bound to variables. This approach separates data access logic from business logic, making the code more readable, maintainable and refactorable compared to do-everything functions.
Tailoring Redis Modules For Your Users’ NeedsRedis Labs
This document discusses using Redis modules to tailor Redis for users' needs. Redis modules allow adding new commands, data types, and APIs to Redis in order to make Redis understand custom data, speak custom languages, and do custom work. With modules, code can be consolidated across platforms, network hops minimized, and computation moved closer to data. The ReDe module is provided as an example of implementing an event dehydration algorithm in Redis using a module.
Peek behind the scenes to learn about Amazon ElastiCache's design and architecture. See common design patterns of our Memcached and Redis offerings and how customers have used them for in-memory operations and achieved improved latency and throughput for applications. During this session, we review best practices, design patterns, and anti-patterns related to Amazon ElastiCache.
KSQL and Security: The Current State of Affairs (Victoria Xia, Confluent) Kaf...confluent
The document discusses securing connections between KSQL and Kafka. It covers enabling encryption using TLS for the KSQL-Kafka connection. It also covers enabling authentication using SASL and authorization using Kafka ACLs. It provides configuration examples for securing each part of the connection and recommends configuring the KSQL output topic name prefix to more easily manage ACLs for output topics.
Trend Micro uses Hadoop for processing large volumes of web data to quickly identify and block malicious URLs. They have expanded their Hadoop cluster significantly over time to support growing data and job volumes. They developed Hadooppet to automate deployment and management of their large, customized Hadoop distribution across hundreds of nodes. Profiling tools like Nagios, Ganglia and Splunk help monitor and troubleshoot cluster performance issues.
Kafka Summit NYC 2017 - The Best Thing Since Partitioned Bread confluent
The document discusses Apache Kafka's new Streams API for stream processing. It introduces the Streams API and provides examples of stateless and stateful computations that can be performed on streams of data. It also notes that the Streams API is now in production use at LINE Corp, processing millions of messages per second, and provides additional resources for learning more about the Streams API.
Handling Redis failover with ZooKeeperryanlecompte
This document discusses using ZooKeeper to automatically handle Redis failover. ZooKeeper is an open-source tool that provides primitives for building distributed applications and handles tasks like leader election and quorum management. The presenter describes how his redis_failover Ruby gem uses ZooKeeper to monitor Redis servers, detect failures, and automatically inform clients so they reconnect to the new master, preventing downtime during a failover. Several companies already use this approach with redis_failover to make their Redis infrastructure more robust and fault-tolerant.
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated HadoopYafang Chang
In enterprise on-premises data center, we may have multiple Secured Hadoop clusters for different purpose. Sometimes, these Hadoop clusters might have different Hadoop distribution, Hadoop version, or even locat in different Data Center. To fulfill business requirement, data synchronize between these clusters could be an important mechanism. However, the story will be more complicated within the real world secured multi-cluster, compare to distcp between two same version and non-secured Hadoop clusters.
We would like to go through our experience on enable live data synchronization for mutiple kerberos enabled Hadoop clusters. Which include the functionality verification, multi-cluster configurations and automation setup process, etc. After that, we would share the use cases among those kerberos federated Hadoop clusters. Finally, provide our common practice on multi-cluster data synchronization.
Compliance as Code with terraform-complianceEmre Erkunt
terraform-compliance is a lightweight, security and compliance focused test framework against terraform to enable negative testing capability for your infrastructure-as-code.
DevoxxUK: Optimizating Application Performance on KubernetesDinakar Guniguntala
Now that you have your apps running on K8s, wondering how to get the response time that you need ? Tuning a polyglot set of microservices to get the performance that you need can be challenging in Kubernetes. The key to overcoming this is observability. Luckily there are a number of tools such as Prometheus that can provide all the metrics you need, but here is the catch, there is so much of data and metrics that is difficult make sense of it all. This is where Hyperparameter tuning can come to the rescue to help build the right models.
This talk covers best practices that will help attendees
1. To understand and avoid common performance related problems.
2. Discuss observability tools and how they can help identify perf issues.
3. Look closer into Kruize Autotune which is a Open Source Autonomous Performance Tuning Tool for Kubernetes and where it can help.
Developing with the Go client for Apache KafkaJoe Stein
This document summarizes Joe Stein's go_kafka_client GitHub repository, which provides a Kafka client library written in Go. It describes the motivation for creating a new Go Kafka client, how to use producers and consumers with the library, and distributed processing patterns like mirroring and reactive streams. The client aims to be lightweight with few dependencies while supporting real-world use cases for Kafka producers and high-level consumers.
The document describes a presentation about data processing with CDK (Cloud Development Kit). It includes an agenda that covers CDK and Projen, serverless ETL with Glue, Databrew with continuous integration/continuous delivery (CICD), and using Amazon Comprehend with S3 object lambdas. Constructs are demonstrated for building architectures with CDK across multiple programming languages. Examples are provided of using CDK to implement Glue workflows, Databrew CICD pipelines, and combining Comprehend with S3 object lambdas for PII detection and redaction.
This document summarizes the key aspects of a public cloud archive storage solution. It offers affordable and unlimited storage using standard transfer protocols. Data is stored using erasure coding for redundancy and fault tolerance. Accessing archived data takes 10 minutes to 12 hours depending on previous access patterns, with faster access for inactive archives. The solution uses middleware to handle sealing and unsealing archives along with tracking access patterns to regulate retrieval times.
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
Reproducible builds, fast and safe deployment process together with self-healing services form the basis of stable and maintainable infrastructure. In this talk I’d like to cover, from the Site Reliability Engineering (SRE) perspective, how Dropbox addresses above challenges, what technologies are used and what lessons were learnt during implementation process.
OpenStack APIs: Present and Future (Beta Talk)Wade Minter
OpenStack APIs: Present and Future by H. Wade Minter provides an overview of OpenStack storage (Swift) APIs and how to use them. The document discusses how OpenStack is an open source cloud computing platform producing interrelated projects for cloud infrastructure. It then summarizes the Swift storage component and demonstrates making API calls to authenticate, list containers and objects, upload/download objects, and set metadata using CURL examples. Language bindings like Ruby gems simplify using the OpenStack Storage APIs.
The document discusses various techniques for optimizing Java application performance on Kubernetes, including:
1. Using optimized container images that are small in size and based on Alpine Linux.
2. Configuring the JVM to use container resources efficiently through settings like -XX:MaxRAMPercentage instead of hardcoded heap sizes.
3. Setting appropriate resource requests and limits for pods to ensure performance isolation and prevent throttling.
4. Leveraging tools like Kubernetes' Horizontal Pod Autoscaler and Pod Disruption Budget for scaling and high availability.
5. Tuning both software and hardware settings for optimal performance of Java workloads on Kubernetes.
Description of some of the elements that go in to creating a PostgreSQL-as-a-Service for organizations with many teams and a diverse ecosystem of applications and teams.
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerSematext Group, Inc.
This document discusses running Elasticsearch clusters on Docker containers. It describes how Docker containers are more lightweight than virtual machines and have less overhead. It provides examples of running official Elasticsearch Docker images and customizing configurations. It also covers best practices for networking, storage, constraints, and high availability when running Elasticsearch on Docker.
This is Apache ZooKeeper session.
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
By the end of this presentation you should be fairly clear about Apache ZooKeeper.
To watch the video or know more about the course, please visit
http://www.knowbigdata.com/page/big-data-and-hadoop-online-instructor-led-training
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis Labs
This document discusses best practices for running Redis in a multi-tenant environment. It covers architectural considerations like high availability, security and isolation techniques using ACLs and SSL, and the importance of monitoring and understanding your environment. The key opportunities are that failover is easy to implement, changes can be introduced smoothly, and the architecture is reusable. Challenges include managing global sentinels and Redis drivers. Case studies demonstrate issues like customer spikes causing problems and the importance of monitoring.
Get Your Insecure PostgreSQL Passwords to SCRAMJonathan Katz
Passwords: they just seem to work. You connect to your PostgreSQL database and you are prompted for your password. You type in the correct character combination, and presto! you're in, safe and sound.
But what if I told you that all was not as it seemed. What if I told you there was a better, safer way to use passwords with PostgreSQL? What if I told you it was imperative that you upgraded, too?
PostgreSQL 10 introduced SCRAM (Salted Challenge Response Authentication Mechanism), introduced in RFC 5802, as a way to securely authenticate passwords. The SCRAM algorithm lets a client and server validate a password without ever sending the password, whether plaintext or a hashed form of it, to each other, using a series of cryptographic methods.
In this talk, we will look at:
* A history of the evolution of password storage and authentication in PostgreSQL
* How SCRAM works with a step-by-step deep dive into the algorithm (and convince you why you need to upgrade!)
* SCRAM channel binding, which helps prevent MITM attacks during authentication
* How to safely set and modify your passwords, as well as how to upgrade to SCRAM-SHA-256 (which we will do live!)
all of which will be explained by some adorable elephants and hippos!
At the end of this talk, you will understand how SCRAM works, how to ensure your PostgreSQL drivers supports it, how to upgrade your passwords to using SCRAM-SHA-256, and why you want to tell other PostgreSQL password mechanisms to SCRAM!
Pulsar Architectural Patterns for CI/CD Automation and Self-Service_Devin BostStreamNative
We examine real-world architectural patterns involving Apache Pulsar to automate the creation of function and pub/sub flows for improved operational scalability and ease of management. We’ll cover CI/CD automation patterns and reveal our innovative approach of leveraging streaming data to create a self-service platform that automates the provisioning of new users. We will also demonstrate the innovative approach of creating function flows through patterns and configuration, enabling non-developer users to create entire function flows simply by changing configurations. These patterns enable us to drive the automation of managing Pulsar to a whole new level. We also cover CI/CD for on-prem, GCP, and AWS users.
This is Part 2 of this presentation: https://www.youtube.com/watch?v=pmaCG...
In summary, we will cover:
CI/CD for on-prem, GCP, and AWS users
Automated creation of function flows by configuration
Automated provisioning of pub/sub users and topics
Architectural patterns and best practices that enable automation
Overstock has leveraged Pulsar as the backbone of a self-service data fabric, a unified data platform to enable users to publish and consume data across the company and integrate with other services. We utilized Pulsar to solve a data governance problem, and Pulsar has performed marvelously. To support our real-world production use cases, we have developed message flows, integrations, and architectural patterns to solve common use cases, maximize value, simplify ease-of-use, automate management, and unify company data and services around this new platform.
- Kerberos is used to authenticate Hadoop services and clients running on different nodes communicating over a non-secure network. It uses tickets for authentication.
- Key configuration changes are required to enable Kerberos authentication in Hadoop including setting hadoop.security.authentication to kerberos and generating keytabs containing principal keys for HDFS services.
- Services are associated with Kerberos principles using keytabs which are then configured for use by the relevant Hadoop processes and services.
LinkRest (http://linkrest.io) is a small HTTP-based protocol and a Java framework that rethinks how REST APIs should be built and consumed. It turns each API endpoint into a graph query engine, giving the client full control over the shape and contents of the requested data sets, while the server controls query strategy and security. The talk will start with the easy parts – how to reuse an existing Apache Cayenne ORM model for the REST service and write simple Java one-liners to get it up and running. Then we will delve into alternative backends, graph access security and parallel data processing.
Generating efficient APK by Reducing Size and Improving PerformanceParesh Mayani
Talk delivered in GDG Ahmedabad DevFest 2017 (#DevFestAhm) on 5th November, 2017.
Talked about various tips/tricks and steps to reduce apk size. Also covered some of the tools that I have used for reducing apk size.
Enjoy actual presentation with GIFs http://bit.ly/reduce-apk-size-drive
AndroidX is a major refactor of the Android Support Library that provides backwards compatibility since AndroidX has more logical artifact names and finer-grained libraries. It addresses issues with the legacy Support Library like inconsistent versioning that could cause crashes. AndroidX features like RecyclerView selection and Slices make app development easier, and Android KTX extensions allow writing more concise Kotlin code. The migration to AndroidX helps modernize third-party libraries and provides a better foundation for future Android features.
Kafka Summit NYC 2017 - The Best Thing Since Partitioned Bread confluent
The document discusses Apache Kafka's new Streams API for stream processing. It introduces the Streams API and provides examples of stateless and stateful computations that can be performed on streams of data. It also notes that the Streams API is now in production use at LINE Corp, processing millions of messages per second, and provides additional resources for learning more about the Streams API.
Handling Redis failover with ZooKeeperryanlecompte
This document discusses using ZooKeeper to automatically handle Redis failover. ZooKeeper is an open-source tool that provides primitives for building distributed applications and handles tasks like leader election and quorum management. The presenter describes how his redis_failover Ruby gem uses ZooKeeper to monitor Redis servers, detect failures, and automatically inform clients so they reconnect to the new master, preventing downtime during a failover. Several companies already use this approach with redis_failover to make their Redis infrastructure more robust and fault-tolerant.
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated HadoopYafang Chang
In enterprise on-premises data center, we may have multiple Secured Hadoop clusters for different purpose. Sometimes, these Hadoop clusters might have different Hadoop distribution, Hadoop version, or even locat in different Data Center. To fulfill business requirement, data synchronize between these clusters could be an important mechanism. However, the story will be more complicated within the real world secured multi-cluster, compare to distcp between two same version and non-secured Hadoop clusters.
We would like to go through our experience on enable live data synchronization for mutiple kerberos enabled Hadoop clusters. Which include the functionality verification, multi-cluster configurations and automation setup process, etc. After that, we would share the use cases among those kerberos federated Hadoop clusters. Finally, provide our common practice on multi-cluster data synchronization.
Compliance as Code with terraform-complianceEmre Erkunt
terraform-compliance is a lightweight, security and compliance focused test framework against terraform to enable negative testing capability for your infrastructure-as-code.
DevoxxUK: Optimizating Application Performance on KubernetesDinakar Guniguntala
Now that you have your apps running on K8s, wondering how to get the response time that you need ? Tuning a polyglot set of microservices to get the performance that you need can be challenging in Kubernetes. The key to overcoming this is observability. Luckily there are a number of tools such as Prometheus that can provide all the metrics you need, but here is the catch, there is so much of data and metrics that is difficult make sense of it all. This is where Hyperparameter tuning can come to the rescue to help build the right models.
This talk covers best practices that will help attendees
1. To understand and avoid common performance related problems.
2. Discuss observability tools and how they can help identify perf issues.
3. Look closer into Kruize Autotune which is a Open Source Autonomous Performance Tuning Tool for Kubernetes and where it can help.
Developing with the Go client for Apache KafkaJoe Stein
This document summarizes Joe Stein's go_kafka_client GitHub repository, which provides a Kafka client library written in Go. It describes the motivation for creating a new Go Kafka client, how to use producers and consumers with the library, and distributed processing patterns like mirroring and reactive streams. The client aims to be lightweight with few dependencies while supporting real-world use cases for Kafka producers and high-level consumers.
The document describes a presentation about data processing with CDK (Cloud Development Kit). It includes an agenda that covers CDK and Projen, serverless ETL with Glue, Databrew with continuous integration/continuous delivery (CICD), and using Amazon Comprehend with S3 object lambdas. Constructs are demonstrated for building architectures with CDK across multiple programming languages. Examples are provided of using CDK to implement Glue workflows, Databrew CICD pipelines, and combining Comprehend with S3 object lambdas for PII detection and redaction.
This document summarizes the key aspects of a public cloud archive storage solution. It offers affordable and unlimited storage using standard transfer protocols. Data is stored using erasure coding for redundancy and fault tolerance. Accessing archived data takes 10 minutes to 12 hours depending on previous access patterns, with faster access for inactive archives. The solution uses middleware to handle sealing and unsealing archives along with tracking access patterns to regulate retrieval times.
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
Reproducible builds, fast and safe deployment process together with self-healing services form the basis of stable and maintainable infrastructure. In this talk I’d like to cover, from the Site Reliability Engineering (SRE) perspective, how Dropbox addresses above challenges, what technologies are used and what lessons were learnt during implementation process.
OpenStack APIs: Present and Future (Beta Talk)Wade Minter
OpenStack APIs: Present and Future by H. Wade Minter provides an overview of OpenStack storage (Swift) APIs and how to use them. The document discusses how OpenStack is an open source cloud computing platform producing interrelated projects for cloud infrastructure. It then summarizes the Swift storage component and demonstrates making API calls to authenticate, list containers and objects, upload/download objects, and set metadata using CURL examples. Language bindings like Ruby gems simplify using the OpenStack Storage APIs.
The document discusses various techniques for optimizing Java application performance on Kubernetes, including:
1. Using optimized container images that are small in size and based on Alpine Linux.
2. Configuring the JVM to use container resources efficiently through settings like -XX:MaxRAMPercentage instead of hardcoded heap sizes.
3. Setting appropriate resource requests and limits for pods to ensure performance isolation and prevent throttling.
4. Leveraging tools like Kubernetes' Horizontal Pod Autoscaler and Pod Disruption Budget for scaling and high availability.
5. Tuning both software and hardware settings for optimal performance of Java workloads on Kubernetes.
Description of some of the elements that go in to creating a PostgreSQL-as-a-Service for organizations with many teams and a diverse ecosystem of applications and teams.
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerSematext Group, Inc.
This document discusses running Elasticsearch clusters on Docker containers. It describes how Docker containers are more lightweight than virtual machines and have less overhead. It provides examples of running official Elasticsearch Docker images and customizing configurations. It also covers best practices for networking, storage, constraints, and high availability when running Elasticsearch on Docker.
This is Apache ZooKeeper session.
ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
By the end of this presentation you should be fairly clear about Apache ZooKeeper.
To watch the video or know more about the course, please visit
http://www.knowbigdata.com/page/big-data-and-hadoop-online-instructor-led-training
Redis in a Multi Tenant Environment–High Availability, Monitoring & Much More! Redis Labs
This document discusses best practices for running Redis in a multi-tenant environment. It covers architectural considerations like high availability, security and isolation techniques using ACLs and SSL, and the importance of monitoring and understanding your environment. The key opportunities are that failover is easy to implement, changes can be introduced smoothly, and the architecture is reusable. Challenges include managing global sentinels and Redis drivers. Case studies demonstrate issues like customer spikes causing problems and the importance of monitoring.
Get Your Insecure PostgreSQL Passwords to SCRAMJonathan Katz
Passwords: they just seem to work. You connect to your PostgreSQL database and you are prompted for your password. You type in the correct character combination, and presto! you're in, safe and sound.
But what if I told you that all was not as it seemed. What if I told you there was a better, safer way to use passwords with PostgreSQL? What if I told you it was imperative that you upgraded, too?
PostgreSQL 10 introduced SCRAM (Salted Challenge Response Authentication Mechanism), introduced in RFC 5802, as a way to securely authenticate passwords. The SCRAM algorithm lets a client and server validate a password without ever sending the password, whether plaintext or a hashed form of it, to each other, using a series of cryptographic methods.
In this talk, we will look at:
* A history of the evolution of password storage and authentication in PostgreSQL
* How SCRAM works with a step-by-step deep dive into the algorithm (and convince you why you need to upgrade!)
* SCRAM channel binding, which helps prevent MITM attacks during authentication
* How to safely set and modify your passwords, as well as how to upgrade to SCRAM-SHA-256 (which we will do live!)
all of which will be explained by some adorable elephants and hippos!
At the end of this talk, you will understand how SCRAM works, how to ensure your PostgreSQL drivers supports it, how to upgrade your passwords to using SCRAM-SHA-256, and why you want to tell other PostgreSQL password mechanisms to SCRAM!
Pulsar Architectural Patterns for CI/CD Automation and Self-Service_Devin BostStreamNative
We examine real-world architectural patterns involving Apache Pulsar to automate the creation of function and pub/sub flows for improved operational scalability and ease of management. We’ll cover CI/CD automation patterns and reveal our innovative approach of leveraging streaming data to create a self-service platform that automates the provisioning of new users. We will also demonstrate the innovative approach of creating function flows through patterns and configuration, enabling non-developer users to create entire function flows simply by changing configurations. These patterns enable us to drive the automation of managing Pulsar to a whole new level. We also cover CI/CD for on-prem, GCP, and AWS users.
This is Part 2 of this presentation: https://www.youtube.com/watch?v=pmaCG...
In summary, we will cover:
CI/CD for on-prem, GCP, and AWS users
Automated creation of function flows by configuration
Automated provisioning of pub/sub users and topics
Architectural patterns and best practices that enable automation
Overstock has leveraged Pulsar as the backbone of a self-service data fabric, a unified data platform to enable users to publish and consume data across the company and integrate with other services. We utilized Pulsar to solve a data governance problem, and Pulsar has performed marvelously. To support our real-world production use cases, we have developed message flows, integrations, and architectural patterns to solve common use cases, maximize value, simplify ease-of-use, automate management, and unify company data and services around this new platform.
- Kerberos is used to authenticate Hadoop services and clients running on different nodes communicating over a non-secure network. It uses tickets for authentication.
- Key configuration changes are required to enable Kerberos authentication in Hadoop including setting hadoop.security.authentication to kerberos and generating keytabs containing principal keys for HDFS services.
- Services are associated with Kerberos principles using keytabs which are then configured for use by the relevant Hadoop processes and services.
LinkRest (http://linkrest.io) is a small HTTP-based protocol and a Java framework that rethinks how REST APIs should be built and consumed. It turns each API endpoint into a graph query engine, giving the client full control over the shape and contents of the requested data sets, while the server controls query strategy and security. The talk will start with the easy parts – how to reuse an existing Apache Cayenne ORM model for the REST service and write simple Java one-liners to get it up and running. Then we will delve into alternative backends, graph access security and parallel data processing.
Generating efficient APK by Reducing Size and Improving PerformanceParesh Mayani
Talk delivered in GDG Ahmedabad DevFest 2017 (#DevFestAhm) on 5th November, 2017.
Talked about various tips/tricks and steps to reduce apk size. Also covered some of the tools that I have used for reducing apk size.
Enjoy actual presentation with GIFs http://bit.ly/reduce-apk-size-drive
AndroidX is a major refactor of the Android Support Library that provides backwards compatibility since AndroidX has more logical artifact names and finer-grained libraries. It addresses issues with the legacy Support Library like inconsistent versioning that could cause crashes. AndroidX features like RecyclerView selection and Slices make app development easier, and Android KTX extensions allow writing more concise Kotlin code. The migration to AndroidX helps modernize third-party libraries and provides a better foundation for future Android features.
A lecture for a college class: Hacking Mobile Devices at CCSF
Based on "The Mobile Application Hacker's Handbook 1st Edition", by Dominic Chell
Instructor: Sam Bowne
More info: https://samsclass.info/128/128_S19.shtml
This document provides an overview of DevOPS concepts including containers, Docker, and related tools. It discusses what containers are and the differences between virtual machines and containers. It then covers how containers can be used by developers and systems engineers. Docker is introduced as a tool for running and managing containers. Dockerfiles are described as documents for assembling container images. Docker Compose is presented as a tool for defining and running multi-container applications. Examples are given for creating a simple container with Dockerfile and running it locally and sharing it publicly. Monitoring tools like cAdvisor are mentioned. The document ends with discussing continuous integration/deployment using tools like Gitlab and Jenkins to automate the build and deployment process.
Best practises how to reduce Android application install size & improve your app install conversation rate. Video can be found here youtu.be/ksgW-VHH-Qo
To ∞ (~65K) and beyond! - Sebastiano Gottardo - Codemotion Milan 2016Codemotion
This talk focuses on analyzing the infamous 65K methods limit for Android apps, from a pragmatic and down-to-earth perspective for developers. You will get to understand what exactly this problem is about and why it exists in the first place. Moreover, we will go through the possible solutions, each one of them presented with pros and cons. At the end of this talk, you should be able to evaluate which solution best suits your app, and even if you need a solution in the first place.
This document provides an overview of Docker containers and developer workflows using Docker. It defines containers and images, and explains how Docker abstracts machine-specific settings to allow containers to run on different machines. Popular Docker images are listed, and benefits of using Docker for development are outlined. Common Docker commands are also described.
Creating Developer-Friendly Docker Containers with ChaperoneGary Wisniewski
The document discusses creating developer-friendly containers using Chaperone and the chaperone-baseimage family. Chaperone is a process manager that provides services like logging, cron jobs, and orderly shutdown within containers. The chaperone-baseimage images use Chaperone to provide three personalities for containers: closed, attached-data, and development. This allows developers to have a consistent environment to develop applications without understanding container internals. The development model mounts the container's infrastructure to the developer's local directory for easy editing of code and data outside the container.
Decrease build time and application sizeKeval Patel
This is the presentation of the talk I gave in the MAD meetup on 15th April. This talk basically explains different tricks & tweaks to decrease your application size and your Gradle build time.
If you have any queries or any feedback, hit me on twitter: https://twitter.com/kevalpatel2106
Containers Roadshow: How to Develop Containers for the EnterpriseHonza Horák
Introduction of how we do Docker containers development in Red Hat. The talk shares some best practices and gotchas that we realized during databases packaging as linux containers.
Android is an open source software platform and operating system for mobile devices based on the Linux kernel. It allows developers to write managed code in the Java programming language. The Android platform was developed by Google and the Open Handset Alliance. The document discusses the Android platform, software development tools, key components and APIs, building blocks like activities and services, different layouts, and the activity lifecycle.
The document provides tips for Android development. It recommends using RelativeLayout over LinearLayout to improve performance. It also recommends using the Hierarchy Viewer tool to analyze layouts and identify potential performance issues. Additional tips include using keyboard shortcuts effectively in Eclipse, using LogCat to debug problems, and properly configuring and testing applications before publishing.
This document discusses application delivery in a container world. It summarizes using Docker from development to production, including local development, continuous integration, deploying to servers using schedulers like Kubernetes and ECS, service discovery using tools like Consul, and updating applications safely using blue-green deployments and feature toggling. It then demonstrates these concepts using Docker, AWS ECS, Consul, and Consul Template to deploy a voting application.
The document provides an introduction to C++.NET Windows Forms course. It outlines topics that will be covered including OOP concepts in .NET, C++.NET console programming, debugging, Windows forms controls, drawing, collections, event handling, exception handling, file processing, and dynamic controls. It also provides brief introductions and overviews of the .NET framework, languages and tools, common language runtime, base class libraries, and Visual Studio.
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...Felipe Prado
This document provides documentation for the r2c analysis platform and command line interface (CLI). It describes how to install and set up the r2c CLI, create an example analyzer, write analysis code using Python, run the analyzer locally on a test codebase, and publish the analyzer to the r2c platform to run at larger scale. The example analyzer counts the percentage of whitespace in JavaScript files to identify potentially minified code. The document guides the reader through each step of developing and testing an analyzer locally before publishing it for cloud-based analysis.
DCEU 18: Developing with Docker ContainersDocker, Inc.
Laura Frank Tacho - Director of Engineering, CloudBees
Wouldn't it be great for a new developer on your team to have their dev environment totally set up on their first day? What about having the confidence that your dev environment mirrors testing and prod? Containers enable this to become reality, along with other great benefits like keeping dependencies nice and tidy and making packaged code easier to share. Come learn about the ways containers can help you build and ship software easily, and walk away with two actionable steps you can take to start using Docker containers for development.
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Patrick Chanezon
This document provides an overview of developing and deploying Java applications on Azure using Docker. It discusses using Docker to build Java applications, running containers, and deploying stacks. It also covers Docker Enterprise Edition, including subscriptions, certifications, and security features. Finally, it demonstrates using Docker on Azure, such as with Azure Container Service, and shows examples of building, running, and deploying Java applications with Docker.
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...Daniel Gallego Vico
1) The document discusses strategies for developing a white label Android app that can support many clients with minimal code duplication. This includes using Gradle for build automation, custom tasks for continuous integration with Jenkins, and tools like Sorolla for generating client-specific assets.
2) Testing is a major focus, with techniques like cloud-based device testing to improve coverage. Crash reporting and analytics are used to monitor app usage and identify issues.
3) Challenges of pre-installing the app on devices were addressed, such as ensuring update notifications and access to native libraries. The tradeoffs of installing to system partitions are also discussed.
Similar to The Road To Single Dex (Gradle Summit 2017) (20)
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.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
What is Master Data Management by PiLog Groupaymanquadri279
PiLog Group's Master Data Record Manager (MDRM) is a sophisticated enterprise solution designed to ensure data accuracy, consistency, and governance across various business functions. MDRM integrates advanced data management technologies to cleanse, classify, and standardize master data, thereby enhancing data quality and operational efficiency.
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
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.
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
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.
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
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.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
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
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
WhatsApp offers simple, reliable, and private messaging and calling services for free worldwide. With end-to-end encryption, your personal messages and calls are secure, ensuring only you and the recipient can access them. Enjoy voice and video calls to stay connected with loved ones or colleagues. Express yourself using stickers, GIFs, or by sharing moments on Status. WhatsApp Business enables global customer outreach, facilitating sales growth and relationship building through showcasing products and services. Stay connected effortlessly with group chats for planning outings with friends or staying updated on family conversations.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
2. Motivation
• Yammer is a social networking service used for
communication within an organization
• 3 APKs: Min SDK 15, 16 and 19, Target SDK 25
• Loading extra DEX files may lead to possible ANRs
• Multidex makes very large memory allocation requests may
crash during run time
4. Results
1 DEX file, Smaller APK, All features kept!
Before After Reduction
Method Count 85k+ 60.8k 28.47%
APK Size 10.7MB+ 7.1MB 33.64%
5. What makes an APK so big?
Multiple DEX files
+
Many Resources
6. What is inside an APK?
• AndroidManifest.xml
• assets/
• classes.dex
• META-INF/
- CERT.SF
- MANIFEST.MF
- CERT.RSA
• lib/
• res/
- drawable/
- layout/
• resources.arsc
7. Big APKs - DEX size
• Remove all/any dead code
• Remove any old/unused libraries
• Refactor out large/non-mobile libraries
• Verify Gradle configurations
8. Big APKs - Resources
• Remove extra and unused files in your “/res” folder
• Remove extra and used files in your “/assets” folder
9. Before Optimizations - Debug build
$ gradlew countDebugDexMethods sizeDebugApk
> Task :countDebugDexMethods
Total methods in debug.apk: 113007 (172.44% used)
Total fields in debug.apk: 50547 (77.13% used)
Methods remaining in debug.apk: 0
Fields remaining in debug.apk: 14988
> Task :sizeDebugApk
Total APK Size in debug.apk in bytes: 12386152 (12.3MB)
10. Before Optimizations - Release build
$ gradlew countReleaseDexMethods sizeReleaseApk (with Proguard)
> Task :countReleaseDexMethods
Total methods in release.apk: 85259 (130.10% used)
Total fields in release.apk: 39887 (60.86% used)
Methods remaining in release.apk: 0
Fields remaining in release.apk: 25648
> Task :sizeReleaseApk
Total APK Size in release.apk in bytes: 10764242 (10.7MB)
13. Trimming the DEX size - Dead Code
• Remove any and all unused code
- PMD - Comes with Gradle
- Proguard - Comes with Android Gradle Plugin
- Intellij/Android Studio Inspections - Click “Analyze” > Click “Inspect Code…”
• Remove all unused libraries
- We chose HockeyApp over an open source analytics library called ApplicationInsights
- HockeyApp’s functionality encompasses all of the functionality that we need from
ApplicationInsights
14. Trimming the DEX size - Old Libraries
• Remove old libraries
- Using HockeyApp for releasing versioning/nightlies - Allowed us to remove AndroidQuery - version
checking
• Remove unnecessary libraries
- Try not add libraries that duplicate Android’s existing functionality
- Able to remove Apache Commons validator - validate emails addresses
• Removing differential versions of same library
- Jackson 1 and Jackson 2 are the same library but Jackson 2 has a different package name
- Duplicating functionality across across prevent tools such as Proguard from optimizing
15. Trimming the DEX size - Transitive Libraries
• Watch out for Library Duplication
- Jackson 1 vs Jackson 2 vs Gson
- Consider using a Groovy map in your build.gradle
• Bringing in extra libraries based on a libraries’ dependencies
- Use “gradlew dependencies” to see what you are actually using
18. Trimming the DEX size - Large Libraries
• Try not to use Large/Non-mobile libraries
- Guava - 15k+ methods
- Jackson2 2.9.0.pr3 - 12k+ methods
- Check size of libraries with methodscount.com
• Necessary Evils
- AppCompat - 25.4.0 has 16.5k+ methods, 26.0.0-beta2 has 18.3k+ (continues to increase)
- Google Play Services GCM 11.0.0 - 16.7k+ methods
- Simply using both App Compat + Play Services together brings your APK to 30k+ methods,
halfway to the 64k limit per DEX file!
19. Trimming the DEX size - MethodsCount
methodscount.com/?lib=com.android.support:appcompat-v7:24.2.1
20. Trimming the DEX size - Gradle Configurations
dependencies {
compile project(":common")
compile project(":common-test")
}
Pre Android Gradle Plugin 3.0
21. Trimming the DEX size - Gradle Configurations
dependencies {
compile project(":common")
compile project(":common-test")
}
Pre Android Gradle Plugin 3.0
22. Trimming the DEX size - Gradle Configurations
Pre Android Gradle Plugin 3.0
dependencies {
compile project(":common")
testCompile project(":common-test")
}
23. Trimming the DEX size - Gradle Configurations
dependencies {
api project(":common")
testImplementation project(":common-test")
}
With Android Gradle Plugin 3.0
24. Trimming the DEX size - Proguard
• Use Proguard on Release builds
- Set “minifyEnabled” to true!
- Easiest way to help lower your DEX size
• Consider using “proguard-android-optimize.txt” over
“proguard-android.txt”
- Proguard will make 5 optimization passes on your code
25. Trimming the DEX size - Proguard
android {
buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile("proguard-android.txt")
proguardFile "custom-proguard-rules.txt"
signingConfig signingConfigs.release
}
}
}
Make sure you turn on “minifyEnabled”
26. Trimming the DEX size - Proguard
android {
buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile("proguard-android.txt")
proguardFile "custom-proguard-rules.txt"
signingConfig signingConfigs.release
}
}
}
Make sure you turn on “minifyEnabled”
27. Trimming the DEX size - Proguard
Make sure you provide Proguard rules
android {
buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile("proguard-android.txt")
proguardFile "custom-proguard-rules.txt"
signingConfig signingConfigs.release
}
}
}
28. Trimming the DEX size - Proguard
Try using more aggressive Proguard rules
android {
buildTypes {
release {
minifyEnabled true
proguardFile getDefaultProguardFile("proguard-android-optimize.txt")
proguardFile "custom-proguard-rules.txt"
signingConfig signingConfigs.release
}
}
}
29. Trimming the DEX size - Proguard
• Remove extra Proguard rules
• Keep them up to date with the current libraries in your app
• Make sure to use “-keep” sparingly
30. Trimming the DEX size - Proguard
Over using “-keep” can be costly
-keep class okhttp3.* { ; }
-keep interface okhttp3.* { ; }
-dontwarn okhttp3.**
-dontnote okhttp3.**
31. Trimming the DEX size - Proguard
Over using “-keep” can be costly
-keep class okhttp3.* { ; }
-keep interface okhttp3.* { ; }
-dontwarn okhttp3.**
-dontnote okhttp3.**
32. Trimming the DEX size - Proguard
Try and let Proguard decide
-dontwarn okhttp3.**
-dontnote okhttp3.**
34. Trimming the Resources - Lint
• Make sure to use lint to check for “UnusedResources”
• Do not suppress this lint rule unless you are writing an
Android library
• Consider failing the builds based on lint warnings/errors
36. Trimming the Resources - Lint
android {
lintOptions {
error "UnusedResources"
}
}
Less strict, check for “UnusedResources”
37. Trimming the Resources - ShrinkResources
• What Lint does not find, you have to remove manually
• Remove all unused resources in “assets/” folder
- Raw media such as Font files
• Use “shrinkResources” to remove unused resources
- Great for removing library dependencies resources in your final APK
41. Trimming the Resources - ResConfigs
• Use “resConfigs” to filter out localizations that you do not
want/support in your app
42. Trimming the Resources - ResConfig
Using “resConfigs” to keep English only
android {
defaultConfig {
resConfigs "en"
}
}
43. Trimming the Resources - ResConfig
android {
defaultConfig {
resConfigs "en",
"de", "fr"
}
}
Using “resConfigs” to keep multiple languages
44. Trimming the Resources - PackagingOptions
• Remove extra files that are baked into your APK
• Use the APK Analyzer to find these files
- In Android Studio, Click “Build” > Click “Analyze APK…”
• Use “packagingOptions” to filter out these files
45. Trimming the Resources - PackagingOptions
android {
packagingOptions {
exclude "META-INF/LICENSE.txt"
exclude "META-INF/NOTICE.txt"
}
}
Common “packagingOptions” excludes
46. Trimming the Resources - PackagingOptions
After using common “packagingOptions” excludes
48. Trimming the Resources - PackagingOptions
After using stricter “packagingOptions” excludes
49. Trimming the Resources - Vector Drawables
• Consider converting simple PNGs to “Vector” Drawables
• Single XML file is smaller than multiple PNGs
• Use tools such as “svg2android” to convert SVGs to Android
Vector Drawables
53. Trimming the Resources - Vector Drawables
After dropping your SVG file, Copy it to your project in “res/drawable”
54. Trimming the Resources - Vector Drawables
Make sure to use “app:srcCompat” your in XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/circle"/>
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/hello"/>
</LinearLayout>
55. Trimming the Resources - Vector Drawables
Make sure to use “app:srcCompat” your in XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/circle"/>
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/hello"/>
</LinearLayout>
56. Trimming the Resources - Vector Drawables
Using “app:srcCompat” your in XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
app:srcCompat="@drawable/circle"/>
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
app:srcCompat="@drawable/hello"/>
</LinearLayout>
57. After Optimizations - Debug build
$ gradlew countDebugDexMethods sizeDebugApk
> Task :countDebugDexMethods
Total methods in debug.apk: 100595 (153.50% used)
Total fields in debug.apk: 51278 (78.25% used)
Methods remaining in debug.apk: 0
Fields remaining in debug.apk: 14257
> Task :sizeDebugApk
Total APK Size in debug.apk in bytes: 10053036 (10.1MB)
58. After Optimizations - Release build
$ gradlew countReleaseDexMethods sizeReleaseApk (with Proguard)
> Task :countReleaseDexMethods
Total methods in release.apk: 60810 (92.79% used)
Total fields in release.apk: 29445 (44.93% used)
Methods remaining in release.apk: 4725
Fields remaining in release.apk: 36090
> Task :sizeReleaseApk
Total APK Size in release.apk in bytes: 7049930 (7.1MB)
60. Before vs After Release Builds
1 DEX file, Smaller APK, All features kept!
Before After Reduction
Method Count 85k+ 60.8k 28.47%
APK Size 10.7MB+ 7.1MB 33.64%