The document summarizes Mark Wong's presentation on using PostgreSQL with Android applications. It provides an overview and code samples for connecting to a PostgreSQL database from an Android application using the PostgreSQL JDBC driver. It also covers topics like executing queries, listening for notifications, and using prepared statements. The slides are available online and questions from the audience are welcomed.
This presentation is for people who want to understand how PostgreSQL shares information among processes using shared memory. Topics covered include the internal data page format, usage of the shared buffers, locking methods, and various other shared memory data structures.
Lisp Macros in 20 Minutes (Featuring Clojure)Phil Calçado
"We just started holding 20 minutes presentations during lunch time in the ThoughtWorks Sydney office. For the first session I gave a not-that-short talk on Lisp macros using Clojure. The slides are below.
It turns out that 20 minutes is too little time to actually acquire content but I think at least we now have some people interested in how metaprogramming can be more than monkey patching."
http://fragmental.tw/2009/01/20/presentation-slides-macros-in-20-minutes/
Integrando React.js en aplicaciones Symfony (deSymfony 2016)Ignacio Martín
Introducción a React.js + técnicas y conceptos útiles, como aplicaciones universales (isomórficas) o cómo usar json schema para facilitarnos la vida al trabajar con formularios.
by Mahesh Pakal, AWS
PostgreSQL is a powerful, enterprise class open source object-relational database system with an emphasis on extensibility and standards-compliance. PostgreSQL boasts many sophisticated features and runs stored procedures in more than a dozen programming languages. We’ll explore the advantages and limitations of PostgreSQL, examples of where it is best suited for use, and examples of who is using PostgreSQL to power their applications.
This presentation is for people who want to understand how PostgreSQL shares information among processes using shared memory. Topics covered include the internal data page format, usage of the shared buffers, locking methods, and various other shared memory data structures.
Lisp Macros in 20 Minutes (Featuring Clojure)Phil Calçado
"We just started holding 20 minutes presentations during lunch time in the ThoughtWorks Sydney office. For the first session I gave a not-that-short talk on Lisp macros using Clojure. The slides are below.
It turns out that 20 minutes is too little time to actually acquire content but I think at least we now have some people interested in how metaprogramming can be more than monkey patching."
http://fragmental.tw/2009/01/20/presentation-slides-macros-in-20-minutes/
Integrando React.js en aplicaciones Symfony (deSymfony 2016)Ignacio Martín
Introducción a React.js + técnicas y conceptos útiles, como aplicaciones universales (isomórficas) o cómo usar json schema para facilitarnos la vida al trabajar con formularios.
by Mahesh Pakal, AWS
PostgreSQL is a powerful, enterprise class open source object-relational database system with an emphasis on extensibility and standards-compliance. PostgreSQL boasts many sophisticated features and runs stored procedures in more than a dozen programming languages. We’ll explore the advantages and limitations of PostgreSQL, examples of where it is best suited for use, and examples of who is using PostgreSQL to power their applications.
This session talks about how unit testing of Spark applications is done, as well as tells the best way to do it. This includes writing unit tests with and without Spark Testing Base package, which is a spark package containing base classes to use when writing tests with Spark.
GeoMesa on Apache Spark SQL with Anthony FoxDatabricks
GeoMesa is an open-source toolkit for processing and analyzing spatio-temporal data, such as IoT and sensor-produced observations, at scale. It provides a consistent API for querying and analyzing data on top of distributed databases (e.g. HBase, Accumulo, Bigtable, Cassandra) and messaging networks (e.g. Kafka) to handle batch analysis of historical archives of data and low-latency processing of data in-stream.
GeoMesa has deep integration with Spark SQL. It has added spatial types (e.g. Point, LineString, Polygons), spatial predicates (st_contains, st_intersects, etc.), and geometry processing functions (e.g. st_buffer, st_convexHull, etc.) to Spark SQL. It also optimizes the processing of these extensions by integrating with the Catalyst SQL optimizer to intercept SQL statements with spatial predicates and provision RDDs based on the underlying spatial index.
This session will describe the implementation of the GeoMesa Spark SQL integration, illustrate its application in production systems and demonstrate spatial aggregations and analytics using map-based visualizations.
Enterprise data is moving into Hadoop, but some data has to stay in operational systems. Apache Calcite (the technology behind Hive’s new cost-based optimizer, formerly known as Optiq) is a query-optimization and data federation technology that allows you to combine data in Hadoop with data in NoSQL systems such as MongoDB and Splunk, and access it all via SQL.
Hyde shows how to quickly build a SQL interface to a NoSQL system using Calcite. He shows how to add rules and operators to Calcite to push down processing to the source system, and how to automatically build materialized data sets in memory for blazing-fast interactive analysis.
Extendiendo Django: Cómo Escribir Tu Propio Backend de Base de Datos - ExasolJavier Abadía
Django permite acceder – mediante su ORM – a distintas bases de datos. De serie, Django soporta PostgreSQL, MySQL, SQLite, Oracle y existen “backends” (es decir drivers) no oficiales para IBM DB2, Microsoft SQL Server , Firebird y bases de datos ODBC.
Pero... ¿qué pasa si nuestros datos están en una base de datos para la que no existe – todavía – un backend? ¿cómo de fácil o difícil es escribir nuestro propio backend para esa base de datos?
En esta charla compartiremos nuestra experiencia escribiendo un backend para una base de datos analítica (EXASol DB): ¿cómo lo hemos hecho? ¿qué documentación o referencias hay disponibles? ¿cómo nos aseguramos de que el acceso a los datos es correcto?
A library for building user interfaces
Designed for View layer
Created by Facebook/Instagram developers
Build reusable & Interactive UI components
Renders your UI and respond to events
Apache Hive is a data warehouse infrastructure built on top of Hadoop for providing data summarization, query, and analysis. While developed by Facebook.
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
Big Data with Hadoop & Spark Training: http://bit.ly/2L4rPmM
This CloudxLab Basics of RDD tutorial helps you to understand Basics of RDD in detail. Below are the topics covered in this tutorial:
1) What is RDD - Resilient Distributed Datasets
2) Creating RDD in Scala
3) RDD Operations - Transformations & Actions
4) RDD Transformations - map() & filter()
5) RDD Actions - take() & saveAsTextFile()
6) Lazy Evaluation & Instant Evaluation
7) Lineage Graph
8) flatMap and Union
9) Scala Transformations - Union
10) Scala Actions - saveAsTextFile(), collect(), take() and count()
11) More Actions - reduce()
12) Can We Use reduce() for Computing Average?
13) Solving Problems with Spark
14) Compute Average and Standard Deviation with Spark
15) Pick Random Samples From a Dataset using Spark
Loom is among the most highly anticipated projects in the Java world. It promises to address concurrency and Java execution model issues by providing virtual threads. Thus, there is no need to write concurrent programs using asynchronous or reactive APIs; it will be possible to use the traditional imperative model and let Loom handle the rest. The JVM will execute the program and leverage non-blocking APIs automatically!
Sounds good, doesn't it? How does it work, though? Are there any hidden costs? What is Loom going to change in modern Java frameworks? We will answer these questions in this talk. Starting with the integration of Loom in Quarkus, we will compare the different approaches we considered, discuss their respective pros and cons, and show how Loom might change the Java world.
In this era of ever growing data, the need for analyzing it for meaningful business insights becomes more and more significant. There are different Big Data processing alternatives like Hadoop, Spark, Storm etc. Spark, however is unique in providing batch as well as streaming capabilities, thus making it a preferred choice for lightening fast Big Data Analysis platforms.
PGTop for Android: Things I learned making this appMark Wong
This is about a weekend he spent slapping together an Android app that talks directly to Postgres using the Postgres JDBC interface. He'll focus more on the specifics of the development environment, how to use JDBC to connect to Postgres, and gotchas
encountered along the way and not so much on general Android application programming.
This session talks about how unit testing of Spark applications is done, as well as tells the best way to do it. This includes writing unit tests with and without Spark Testing Base package, which is a spark package containing base classes to use when writing tests with Spark.
GeoMesa on Apache Spark SQL with Anthony FoxDatabricks
GeoMesa is an open-source toolkit for processing and analyzing spatio-temporal data, such as IoT and sensor-produced observations, at scale. It provides a consistent API for querying and analyzing data on top of distributed databases (e.g. HBase, Accumulo, Bigtable, Cassandra) and messaging networks (e.g. Kafka) to handle batch analysis of historical archives of data and low-latency processing of data in-stream.
GeoMesa has deep integration with Spark SQL. It has added spatial types (e.g. Point, LineString, Polygons), spatial predicates (st_contains, st_intersects, etc.), and geometry processing functions (e.g. st_buffer, st_convexHull, etc.) to Spark SQL. It also optimizes the processing of these extensions by integrating with the Catalyst SQL optimizer to intercept SQL statements with spatial predicates and provision RDDs based on the underlying spatial index.
This session will describe the implementation of the GeoMesa Spark SQL integration, illustrate its application in production systems and demonstrate spatial aggregations and analytics using map-based visualizations.
Enterprise data is moving into Hadoop, but some data has to stay in operational systems. Apache Calcite (the technology behind Hive’s new cost-based optimizer, formerly known as Optiq) is a query-optimization and data federation technology that allows you to combine data in Hadoop with data in NoSQL systems such as MongoDB and Splunk, and access it all via SQL.
Hyde shows how to quickly build a SQL interface to a NoSQL system using Calcite. He shows how to add rules and operators to Calcite to push down processing to the source system, and how to automatically build materialized data sets in memory for blazing-fast interactive analysis.
Extendiendo Django: Cómo Escribir Tu Propio Backend de Base de Datos - ExasolJavier Abadía
Django permite acceder – mediante su ORM – a distintas bases de datos. De serie, Django soporta PostgreSQL, MySQL, SQLite, Oracle y existen “backends” (es decir drivers) no oficiales para IBM DB2, Microsoft SQL Server , Firebird y bases de datos ODBC.
Pero... ¿qué pasa si nuestros datos están en una base de datos para la que no existe – todavía – un backend? ¿cómo de fácil o difícil es escribir nuestro propio backend para esa base de datos?
En esta charla compartiremos nuestra experiencia escribiendo un backend para una base de datos analítica (EXASol DB): ¿cómo lo hemos hecho? ¿qué documentación o referencias hay disponibles? ¿cómo nos aseguramos de que el acceso a los datos es correcto?
A library for building user interfaces
Designed for View layer
Created by Facebook/Instagram developers
Build reusable & Interactive UI components
Renders your UI and respond to events
Apache Hive is a data warehouse infrastructure built on top of Hadoop for providing data summarization, query, and analysis. While developed by Facebook.
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
Big Data with Hadoop & Spark Training: http://bit.ly/2L4rPmM
This CloudxLab Basics of RDD tutorial helps you to understand Basics of RDD in detail. Below are the topics covered in this tutorial:
1) What is RDD - Resilient Distributed Datasets
2) Creating RDD in Scala
3) RDD Operations - Transformations & Actions
4) RDD Transformations - map() & filter()
5) RDD Actions - take() & saveAsTextFile()
6) Lazy Evaluation & Instant Evaluation
7) Lineage Graph
8) flatMap and Union
9) Scala Transformations - Union
10) Scala Actions - saveAsTextFile(), collect(), take() and count()
11) More Actions - reduce()
12) Can We Use reduce() for Computing Average?
13) Solving Problems with Spark
14) Compute Average and Standard Deviation with Spark
15) Pick Random Samples From a Dataset using Spark
Loom is among the most highly anticipated projects in the Java world. It promises to address concurrency and Java execution model issues by providing virtual threads. Thus, there is no need to write concurrent programs using asynchronous or reactive APIs; it will be possible to use the traditional imperative model and let Loom handle the rest. The JVM will execute the program and leverage non-blocking APIs automatically!
Sounds good, doesn't it? How does it work, though? Are there any hidden costs? What is Loom going to change in modern Java frameworks? We will answer these questions in this talk. Starting with the integration of Loom in Quarkus, we will compare the different approaches we considered, discuss their respective pros and cons, and show how Loom might change the Java world.
In this era of ever growing data, the need for analyzing it for meaningful business insights becomes more and more significant. There are different Big Data processing alternatives like Hadoop, Spark, Storm etc. Spark, however is unique in providing batch as well as streaming capabilities, thus making it a preferred choice for lightening fast Big Data Analysis platforms.
PGTop for Android: Things I learned making this appMark Wong
This is about a weekend he spent slapping together an Android app that talks directly to Postgres using the Postgres JDBC interface. He'll focus more on the specifics of the development environment, how to use JDBC to connect to Postgres, and gotchas
encountered along the way and not so much on general Android application programming.
The latest version of my PostgreSQL introduction for IL-TechTalks, a free service to introduce the Israeli hi-tech community to new and interesting technologies. In this talk, I describe the history and licensing of PostgreSQL, its built-in capabilities, and some of the new things that were added in the 9.1 and 9.2 releases which make it an attractive option for many applications.
Optimizing Query is very important to improve the performance of the database. Analyse query using query execution plan, create cluster index and non-cluster index and create indexed views
Три вызова реляционным СУБД и новый PostgreSQL - #PostgreSQLRussia семинар по...Nikolay Samokhvalov
Реляционной модели скоро исполнится полвека – это огромный срок для любой технологической индустрии, не говоря уже об ИТ. За прошедшие годы этой модели было брошено немало вызовов, оказавших немалое влияние на развитие реляционных СУБД. В докладе обсуждаются три главных вызова реляционной модели, включая и NoSQL. На основе многолетнего опыта использования PostgreSQL для создания социальных сетей, объединяющих многомиллионные аудитории, наглядно демонстрируется как эта СУБД реагировала на возникающие вызовы. Речь также пойдет о «трех китах» PostgreSQL, которые не дают этой системе превратиться в монстра и позволяют обогащаться функционалом, необходимым для создания современных высоконагруженных проектов. Особое внимание в докладе уделено новым типам данных, JSON и JSONB — их возможностям, способам индексирования, а также разбору имеющихся недостатков.
My experience with embedding PostgreSQLJignesh Shah
At my current company, we embed PostgreSQL based technologies in various applications shipped as shrink-wrapped software. In this session we talk about the experience of embedding PostgreSQL where it is not directly exposed to end-user and the issues encountered on how they were resolved.
We will talk about business reasons,technical architecture of deployments, upgrades, security processes on how to work with embedded PostgreSQL databases.
In 40 minutes the audience will learn a variety of ways to make postgresql database suddenly go out of memory on a box with half a terabyte of RAM.
Developer's and DBA's best practices for preventing this will also be discussed, as well as a bit of Postgres and Linux memory management internals.
Повышение производительности приложения за счет эффективного разделения чтения и записи данных. Репликация, которая нас устроила
Презентация подготовлена по материалам прошедшего 12 сентября витебского митапа: http://meetup.gorodvitebsk.by/
This slides describes the basic concepts of industrial-strength compiler design. This includes basic concept of static single-assignment form (SSA) and various optimizations such as dead code elimination, global value numbering, constant propagation, etc. This is intend for a 150 minutes undergraduate compiler class.
Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...Databricks
Watch video at: http://youtu.be/Wg2boMqLjCg
Want to learn how to write faster and more efficient programs for Apache Spark? Two Spark experts from Databricks, Vida Ha and Holden Karau, provide some performance tuning and testing tips for your Spark applications
A Deep Dive into Query Execution Engine of Spark SQLDatabricks
Spark SQL enables Spark to perform efficient and fault-tolerant relational query processing with analytics database technologies. The relational queries are compiled to the executable physical plans consisting of transformations and actions on RDDs with the generated Java code. The code is compiled to Java bytecode, executed at runtime by JVM and optimized by JIT to native machine code at runtime. This talk will take a deep dive into Spark SQL execution engine. The talk includes pipelined execution, whole-stage code generation, UDF execution, memory management, vectorized readers, lineage based RDD transformation and action.
The presentation shows major features of the new C++ standard (language and the library). The full list of new things is very broad, so I've categorized them to be easier to understand.
JCConf 2020 - New Java Features Released in 2020Joseph Kuo
In 2020, Java 14 and 15 are released with many great features, including ZGC, Shenandoah GC, helpful NullPointerExceptions, pattern matching for instanceof, switch expressions, text blocks, records, hidden classes, and sealed classes. They not only improve performance of GC and Java applications, but also introduce new syntax to ease our effort to write more readable and efficient code. Let's take a look at those features!
https://cyberjos.blog/java/seminar/jcconf-2020-new-java-features-released-in-2020/
This presentation is primarily focused on how to use collectd (http://collectd.org/) to gather data from the Postgres statistics tables. Examples of how to use collectd with Postgres will be shown. There is some hackery involved to make collectd do a little more and collect more meaningful data from Postgres. These small patches will be explored. A small portion of the discussion will be about how to visualize the data.
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
pg_proctab is a collection of PostgreSQL stored functions that provide access to the operating system process table using SQL. We'll show you which functions are available and where they collect the data, and give examples of their use to collect processor and I/O statistics on SQL queries.
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
pg_proctab is a collection of PostgreSQL stored functions that provide access to the operating system process table using SQL. We'll show you which functions are available and where they collect the data, and give examples of their use to collect processor and I/O statistics on SQL queries. These stored functions currently only work on Linux-based systems.
PostgreSQL Portland Performance Practice Project - Database Test 2 TuningMark Wong
Sixth presentation in a speaker series sponsored by the Portland State University Computer Science Department. The series covers PostgreSQL performance with an OLTP (on-line transaction processing) workload called Database Test 2 (DBT-2). This presentation goes through some experimentation of setting different PostgreSQL global user configuration (GUC) parameters.
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
pc_proctab is a collection of PostgreSQL stored functions that allow you to access the operating system process table using SQL. See examples on how to use these stored functions to collect processor and I/O statistics on SQL statements run against the database.
Filesystem Performance from a Database PerspectiveMark Wong
How do you choose the right filesystem for your database management system?
Administrators have a variety of filesystems to choose from, as well as volume management and hardware or software RAID. This talk will examine how different the performance of filesystems really are, and how do you go about systematically determining which configuration will be the best for your application and hardware.
This talk will present data generated by a group of volunteers running performance tests for database tuning. We were curious if the file systems would really behave like we expected them to, especially when used in conjunction with RAID or volume management.
There is also more to file systems than how fast we can read to or write to them. Reliability is critical for production environments, and proving that is a key part of evaluating performance.
The talk will review and confirm or deny assumptions that many system administrators and developers make about filesystems and databases.
Data shared will include baseline throughput determined with exhaustive fio tests.
PostgreSQL Portland Performance Practice Project - Database Test 2 Filesystem...Mark Wong
Fifth presentation in a speaker series sponsored by the Portland State University Computer Science Department. The series covers PostgreSQL performance with an OLTP (on-line transaction processing) workload called Database Test 2 (DBT-2). This presentation goes through results of different hardware RAID configurations to show why it is important to test your own hardware: it might be performing in way you don't expect.
PostgreSQL Portland Performance Practice Project - Database Test 2 HowtoMark Wong
Fourth presentation in a speaker series sponsored by the Portland State University Computer Science Department. The series covers PostgreSQL performance with an OLTP (on-line transaction processing) workload called Database Test 2 (DBT-2). This presentation is a set of examples to go along with the live presentation given on March 12, 2009.
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...Mark Wong
Third presentation in a speaker series sponsored by the Portland State University Computer Science Department. The series covers PostgreSQL performance with an OLTP (on-line transaction processing) workload called Database Test 2 (DBT-2). This presentation go into detail about what the workload does.
pg_top allows you to monitor PostgreSQL processes to view the currently running SQL statement of a process, the query plan of a currently running SELECT statement, locks held by a process, user table statistics, and user index statistics.
A introduction to using system tools to identify what the system is doing. This will go over using top and iostat to determine what the system is physically doing, and then using tools like ps and querying the PostgreSQL system catalog tables to determine what queries are running, what locks have been acquired, and where the tables and indexes are physically located on the system in order to correlate the physical activity to what the database is doing.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
1. Android & PostgreSQL
Mark Wong
markwkm@postgresql.org
PGCon 2011, University of Ottawa
20 May 2011
2. __ __
/ ~~~/ . o O ( Hello! )
,----( oo )
/ __ __/
/| ( |(
^ /___ / |
|__| |__|-"
Slides available at http://www.sideshare.net/markwkm
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 2 / 37
3. Overview
Two topics, mostly the latter:
• Development environment specific for PostgreSQL JDBC
• Code samples for using the PostgreSQL JDBC driver
Any requests?
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 3 / 37
4. Audience Survey
Are you familiar with:
• Developed an Android application?
• Java?
• JDBC?
• Eclipse?
• SQL?
• PostgreSQL?
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 4 / 37
5. Development Environment
A few details on the following slides about:
• JDK5 or JDK6
• Android SDK
• PostgreSQL JDBC Driver
• Eclipse is optional, current Android SDK r11 requires 3.5 or 3.6
Full system requirement details for Android development:
http://developer.android.com/sdk/requirements.html
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 5 / 37
6. PostgreSQL JDBC Driver
http://jdbc.postgresql.org/
• Distributed under BSD License.
(http://jdbc.postgresql.org/license.html)
• Supports PostgreSQL 7.2 and laster version
• Thread-safe
(http://jdbc.postgresql.org/documentation/head/thread.html)
• JDBC3 vs. JDBC4 (http://jdbc.postgresql.org/download.html)
• If you are using the 1.6 JVM, then you should use the JDBC4 version.
• JDK 1.4, 1.5 - JDBC 3. This contains support for SSL and javax.sql, but does not
require J2EE as it has been added to the J2SE release.
• JDK 1.6 - JDBC4. Support for JDBC4 methods is limited. The driver builds, but
the several of the new methods are stubbed out.
• Todo list http://jdbc.postgresql.org/todo.html
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 6 / 37
7. Using the PostgreSQL JDBC Driver
To add the PostgreSQL JDBC driver for building and packaging edit the
hidden .classpath file at the top level of the project directory with the full
path to the JAR file:
< c l a s s p a t h>
...
< c l a s s p a t h e n t r y k i n d=” l i b ”
p a t h=”/ w o r k s p a c e / p r o j / p o s t g r e s q l −9.0 −801. j d b c 4 . j a r ”/>
...
</ c l a s s p a t h>
Alternate instructions when using Eclipse:
http://developer.android.com/resources/faq/commontasks.html#addexternallibrary
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 7 / 37
8. PostgreSQL JDBC Version Notes
Dave Cramer built a special version of the PostgreSQL JDBC driver that
works on Android 1.5 and later and posted it in a discussion in the PgAndroid
Google Group (this pdf should be built so you can click on the tiny text to
open the link):
http://groups.google.com/group/pgandroid/browse_thread/thread/d8b400f039f66d5f/f77b2e2a99370a36?lnk=raot#f77b2e2a99370a36
At this time, build 801 of the JDBC driver works with Android 2.1 and later.
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 8 / 37
9. PostgreSQL JDBC Code Examples
• Some simple examples for connecting to a PostgreSQL database and
querying some data, and PostgreSQL specific features
• Most examples are variations of those given in the PostgreSQL and
PostgreSQL JDBC documentation
Warning: code formatted to fit better on these slides. . .
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 9 / 37
10. Open a Database Connection
Load the PostgreSQL JDBC driver and open a database connection using SSL:
C l a s s . forName ( ” o r g . p o s t g r e s q l . D r i v e r ” ) ;
String url ;
u r l = ” jdbc : p o s t g r e s q l :// pghost :5432/ pgdatabase ” +
” ? s s l f a c t o r y =o r g . p o s t g r e s q l . s s l . N o n V a l i d a t i n g F a c t o r y ” +
”& s s l =t r u e ” ;
C o n n e c t i o n conn = D r i v e r M a n a g e r . g e t C o n n e c t i o n ( u r l ,
” pguser ” ,
” pgpass ” ) ;
// Don ’ t f o r g e t t o c l o s e t h e c o n n e c t i o n when you ’ r e done .
// conn . c l o s e ( ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 10 / 37
11. Execute a Query
Select the name of all relations from pg class and iterate through every row
returned:
String sql ;
s q l = ”SELECT r e l n a m e FROM p g c l a s s WHERE r e l k i n d = ’ r ’ ; ”
S t a t e m e n t s t = conn . c r e a t e S t a t e m e n t ( ) ;
ResultSet r s = st . executeQuery ( s q l ) ;
while ( r s . next ( ) ) {
// Columns a r e can be r e f e r e n c e d by name .
S t r i n g relname = r s . g e t S t r i n g ( ” relname ” ) ;
}
rs . close ();
st . close ();
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 11 / 37
12. Execute a Query Using a Cursor
Select the name of all table names from pg tables and iterate through them
fetching 10 at a time:
conn . setAutoCommit ( f a l s e ) ;
S t r i n g s q l = ”SELECT t a b l e n a m e FROM p g t a b l e s ; ”
S t a t e m e n t s t = conn . c r e a t e S t a t e m e n t ( ) ;
st . setFetchSize (10);
ResultSet r s = st . executeQuery ( s q l ) ;
while ( r s . next ( ) ) {
// Columns a r e can be r e f e r e n c e d by name .
S t r i n g relname = r s . g e t S t r i n g ( ” relname ” ) ;
}
rs . close ();
st . close ();
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 12 / 37
13. Execute a Query with a Bind Value
Building on the previous slide, select the number of all relations from pg class:
S t r i n g s q l = ”SELECT COUNT( ∗ ) FROM p g c l a s s WHERE r e l k i n d = ? ; ”
P r e p a r e d S t a t e m e n t ps = conn . c r e a t e S t a t e m e n t ( ) ;
// Bind v a r i a b l e s a r e e n u m e r a t e d s t a r t i n g w i t h 1 ;
ps . s e t S t r i n g ( 1 , ” r ” ) ;
R e s u l t S e t r s = ps . e x e c u t e Q u e r y ( s q l ) ;
rs . next ( ) ;
Columns a r e e n u m e r a t e d s t a r t i n g w i t h 1 .
long c o u n t = r s . g e t L o n g ( 1 ) ;
rs . close ();
ps . c l o s e ( ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 13 / 37
15. Create, Modify, or Drop Database Objects
Execute CREATE, ALTER, or DROP SQL statements with the execute() method:
S t a t e m e n t s t = conn . c r e a t e S t a t e m e n t ( ) ;
s t . e x e c u t e ( ”CREATE TABLE f i l m s ( t i t l e VARCHAR ( 4 0 ) ; ” ) ;
st . close ();
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 15 / 37
16. Example for INSERT, UPDATE and DELETE
Executing INSERT, UPDATE, or DELETE SQL statements use the
executeUpdate() as opposed to the executeQuery() method shown previously
with SELECT statements. Also, executeUpdate() returns the number of rows
affected as opposed to a ResultSet, otherwise usage is mostly the same:
PreparedStatement st =
conn . p r e p a r e S t a t e m e n t (
”INSERT INTO f i l m s ( t i t l e ) ” +
”VALUES ( ? ) ; ” ) ;
s t . s e t S t r i n g ( 1 , ”On S t r a n g e r T i d e s ” ) ;
i n t rows = s t . e x e c u t e U p d a t e ( ) ;
st . close ();
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 16 / 37
17. Example for Calling Stored Functions
Call a built-in stored function that returns a value. In this example, call
upper() to change a string to all upper case characters:
CallableStatement upperProc =
conn . p r e p a r e C a l l ( ”{ ? = c a l l u p p e r ( ? ) }” ) ;
u p p e r P r o c . r e g i s t e r O u t P a r a m e t e r ( 1 , Types . VARCHAR ) ;
upperProc . s e t S t r i n g (2 , ” lowercase to uppercase ” ) ;
upperProc . execute ( ) ;
S t r i n g upperCased = upperProc . g e t S t r i n g ( 1 ) ;
upperProc . c l o s e ( ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 17 / 37
19. Starting listening to a channel
Register this session as a listener to the notification channel virtual:
S t a t e m e n t stmt = conn . c r e a t e S t a t e m e n t ( ) ;
stmt . e x e c u t e ( ”LISTEN v i r t u a l ; ” ) ;
stmt . c l o s e ( ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 19 / 37
20. LISTEN: Dummy query
Need to issue a dummy query to contact the PostgreSQL database before any
pending notifications are received:
while ( true ) {
try {
S t a t e m e n t stmt = conn . c r e a t e S t a t e m e n t ( ) ;
R e s u l t S e t r s = stmt . e x e c u t e Q u e r y ( ”SELECT 1 ; ” ) ;
rs . close ();
stmt . c l o s e ( ) ;
...
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 20 / 37
21. LISTEN: Handle notifications
A key limitation of the JDBC driver is that it cannot receive
asynchronous notifications and must poll the backend to check if any
notifications were issued.
...
org . p o s t g r e s q l . PGNotification n o t i f i c a t i o n s [ ] =
pgconn . g e t N o t i f i c a t i o n s ( ) ;
i f ( n o t i f i c a t i o n s != n u l l ) {
f o r ( i n t i =0; i < n o t i f i c a t i o n s . l e n g t h ; i ++) {
// Handle h e r e : n o t i f i c a t i o n s [ i ] . getName ( ) ) ;
}
}
// Wait b e f o r e c h e c k i n g f o r more n o t i f i c a t i o n s .
Thread . s l e e p ( 5 0 0 ) ;
...
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 21 / 37
22. LISTEN: Java Exception Handling
...
} catch ( SQLException s q l e ) {
sqle . printStackTrace ();
} catch ( I n t e r r u p t e d E x c e p t i o n i e ) {
ie . printStackTrace ();
}
}
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 22 / 37
23. Stop listening to a channel
Stop listening to the channel virtual:
S t a t e m e n t stmt = conn . c r e a t e S t a t e m e n t ( ) ;
stmt . e x e c u t e ( ”UNLISTEN v i r t u a l ; ” ) ;
stmt . c l o s e ( ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 23 / 37
24. NOTIFY: Send a notification
Send a notification to the channel virtual:
S t a t e m e n t stmt = conn . c r e a t e S t a t e m e n t ( ) ;
stmt . e x e c u t e ( ”NOTIFY v i r t u a l ; ” ) ;
stmt . c l o s e ( ) ;
Note: Starting with PostgreSQL 9.0, there is the stored function
pg notify(text, text) that can be used.
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 24 / 37
25. Server Prepared Statements
JDBC allows a threshold to be set before the server prepared statement is
used. Recommended to use with PostgreSQL 7.4 and later:
http://jdbc.postgresql.org/documentation/81/server-prepare.html
P r e p a r e d S t a t e m e n t pstmt = conn . p r e p a r e S t a t e m e n t ( ”SELECT ? ; ” ) ;
// C a s t t h e P r e p a r e d S t a t e m e n t t o t h e PostgreSQL s p e c i f i c
// PGStatement .
o r g . p o s t g r e s q l . PGStatement pgstmt =
( o r g . p o s t g r e s q l . PGStatement ) pstmt ;
// Use p r e p a r e d s t a t e m e n t on t h e 2 nd e x e c u t i o n onward .
pgstmt . s e t P r e p a r e T h r e s h o l d ( 2 ) ;
pstmt . s e t I n t ( 1 , 4 2 ) ;
R e s u l t S e t r s = pstmt . e x e c u t e Q u e r y ( ) ;
pstmt . c l o s e ( ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 25 / 37
26. Geometric data types
PostgreSQL data types that include single points, lines, and polygons:
http://jdbc.postgresql.org/documentation/81/geometric.html
Circle example:
stmt . e x e c u t e ( ”CREATE TABLE geo ( m y c i r c c i r c l e ) ; ” ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 26 / 37
27. INSERT a circle
PGpoint c e n t e r = new PGpoint ( 1 , 2 . 5 ) ;
double r a d i u s = 4 ;
P G c i r c l e c i r c l e = new P G c i r c l e ( c e n t e r , r a d i u s ) ;
P r e p a r e d S t a t e m e n t ps = conn . p r e p a r e S t a t e m e n t (
”INSERT INTO g e o m t e s t ( m y c i r c ) VALUES ( ? ) ; ” ) ;
ps . s e t O b j e c t ( 1 , c i r c l e ) ;
ps . e x e c u t e U p d a t e ( ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 27 / 37
28. SELECT a circle
R e s u l t S e t r s = stmt . e x e c u t e Q u e r y (
”SELECT m y c i r c FROM geo ; ” ) ;
rs . next ( ) ;
PGcircle c i r c l e = ( PGcircle ) rs . getObject (1);
PGpoint c e n t e r = c i r c l e . c e n t e r ;
double r a d i u s = c i r c l e . r a d i u s ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 28 / 37
29. JDBC Escapes
A special escape syntax that is JDBC specific and database agnostic:
http://jdbc.postgresql.org/documentation/head/escapes.html
Dates and timestamps:
s t . e x e c u t e Q u e r y ( ”SELECT { f n week ({ d ’2005 −01 −24 ’})}; ” ) ;
st . executeQuery (
”SELECT { f n week ({ t s ’2005−01−24 1 2 : 1 3 : 1 4 . 1 5 ’ } ) } ; ” ) ;
Joins:
st . executeQuery (
”SELECT ∗ FROM { o j a LEFT OUTER JOIN b ON ( a . i = b . i ) } ; ” ) ;
Scalar functions:
s t . e x e c u t e Q u e r y ( ”SELECT { f n a b s ( −1)}; ” ) ;
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 29 / 37
30. Handling binary data
Long examples for using the bytea data type and Large Objects:
http://jdbc.postgresql.org/documentation/head/binary-data.html
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 30 / 37
31. Connection pools
Long examples for using JDBC connection pooling:
http://jdbc.postgresql.org/documentation/head/datasource.html
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 31 / 37
32. Example application
PGTop for Android is a complete application implementing some of the
examples shown here:
• Source code: https://github.com/markwkm/pgtop
• Android Market:
https://market.android.com/details?id=org.postgresql.top
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 32 / 37
33. Android Example Programs
For reference, since not covered in this presentation:
• Hello, World (includes example without using Eclipse)
http://developer.android.com/resources/tutorials/hello-world.html
• More examples without using Eclipse http:
//developer.android.com/guide/developing/other-ide.html
• Even more sample applications
http://developer.android.com/resources/samples/
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 33 / 37
34. Further JDBC Reading
JDBC API Documentation and JDBC Specification
http://jdbc.postgresql.org/documentation/head/reading.html
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 34 / 37
37. License
This work is licensed under a Creative Commons Attribution 3.0 Unported
License. To view a copy of this license, (a) visit
http://creativecommons.org/licenses/by/3.0/us/; or, (b) send a
letter to Creative Commons, 171 2nd Street, Suite 300, San Francisco,
California, 94105, USA.
markwkm (PGCon2011) Android & PostgreSQL 20 May 2011 37 / 37