Mysql Connector/J in the Making of Modern Applications
Total Page:16
File Type:pdf, Size:1020Kb
Copyright © 2019 Oracle and/or its affiliates. MySQL Connector/J in the Making of Modern Applications Filipe Silva Connector/J Developer and Team Lead MySQL Middleware and Clients September 17, 2019 Copyright © 2019 Oracle and/or its affiliates. Safe Harbor The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Copyright © 2019 Oracle and/or its affiliates. Filipe Silva Connector/J Developer and Team Lead MySQL Middleware and Clients September 17, 2019 [email protected] Copyright © 2019 Oracle and/or its affiliates. What Developers Want? MySQL Provides! {“topic”: 1} Modern Applications Architecture {“topic”: 5} MySQL Document Store {“topic”: 2} How Data Flows and Looks Like? {“topic”: 6} What is the X DevAPI? {“topic”: 3} JSON, the Binding Glue {“topic”: 7} Connector/J with X DevAPI {“topic”: 4} NoSQL to the Rescue {“topic”: 8} Closing Comments, Q & A Copyright © 2019 Oracle and/or its affiliates. What Developers Want? Developers demand challenging, interesting projects. In a quest for learning something new, developers are more than willing to explore new tools, technologies or processes. The ultimate goal is to do more with less. Copyright © 2019 Oracle and/or its affiliates. Modern Applications Architecture Ever-growing demand for containerized microservices Extreme scalability, extreme decoupling and extreme agility In isolation, a single microservice could be seen almost as an independent, lightweight, minimalist 3-tier architecture Except that they usually are stateless and pipeline-ready Copyright © 2019 Oracle and/or its affiliates. Microservices Architecture Microservice Microservice Data Store User Microservice Interface Microservice Data Store Microservice Microservice Data Store Copyright © 2019 Oracle and/or its affiliates. 3-Tier Architecture Presentation Logic Data Web/Application User Interface Database Servers Servers Workflow Relational and UI JavaScript Systems & NoSQL Frameworks Business Logic Databases Copyright © 2019 Oracle and/or its affiliates. How Data Flows? Client requests data or operation JSON Server Client receives the renders the client response JSON request JSON Server builds Sever and replies a processes Data Store response operation JSON Copyright © 2019 Oracle and/or its affiliates. How Data Looks Like? From a DBA perspective From a developer perspective { "_id": "5bc1195b6f36a842a4f65b24", "age": 21, "name": { "first": "Vicky", "last": "Leonard" }, "company": "CodeONE", "email": "[email protected]", "phone": "+1 (864) 428-3897", "address": "506 Broadway, Jeff, Ohio, 2249", "tags": ["java", "development", "database“] } Copyright © 2019 Oracle and/or its affiliates. JSON, the Binding Glue JSON: “JavaScript Object Notation” Name/value pairs, array data and other serializable types Cross-platform serialization format Widely used in web services and microservices Standardized as ECMA-404 and RFC 8259 Natively supported by MySQL Specific data type and multiple functions to operate on JSON values and columns Copyright © 2019 Oracle and/or its affiliates. NoSQL to the Rescue NoSQL: “Not Only SQL” Many types of NoSQL Developers don’t like SQL systems, little uniformity among them NoSQL promises to scale and Key-Value Database make applications agile Oracle NoSQL Database, Redis, Riak, Memcached Document-oriented Database “Schema-free”/“Schema-less” Apache CouchDB, MongoDB, Couchbase built on distributed systems Wide Column Store Bigtable, Apache Cassandra, Apache HBase Relaxed ACID principles Graph Neo4j, JanusGraph, AllegroGraph Copyright © 2019 Oracle and/or its affiliates. MySQL Provides! We hear our customers. Always evolving, sometimes re-inventing itself, MySQL keeps pace with the trends and drives for success of its users. Either improving existing features or providing new ones, either increasing its impressive toolset or stepping into the Cloud, MySQL provides! Copyright © 2019 Oracle and/or its affiliates. What If… Schema and schema-less co-existed together in the same technology stack? Developers Operations Business Owners Simultaneous Comprehensive Don’t lose my data Schema-less and tooling ecosystem ACID compliant schema based Performance Capture all my data development management Extensible, Scalable Rapid prototyping Robust replication, Products on backup and restore Document based schedule Affordable time to model Simpler application market schema upgrades Transactions Fast development Copyright © 2019 Oracle and/or its affiliates. NoSQL SQL + SQL = NoSQL Copyright © 2019 Oracle and/or its affiliates. MySQL Document Store An easy, straightforward way of working with JSON documents in MySQL Copyright © 2019 Oracle and/or its affiliates. MySQL Document Store Store unstructured data using a MySQL database No explicit schemas and data types Data lives in JSON columns… That are abstracted away from the user, which only deals with documents CRUD operations… SQL not mandatory but available Consistency and data integrity… Fully ACID compliant MySQL RDBMS and InnoDB engine in the background Documents and relational tables mixed together Copyright © 2019 Oracle and/or its affiliates. MySQL Document Store Client Application MySQL Server MySQL Router X DevAPI X Plugin (Connector) MySQL Protocol X Protocol Copyright © 2019 Oracle and/or its affiliates. X DevAPI High-level database API to Available in many popular develop CRUD-based programming languages and in applications with off-the-shelf the MySQL Shell. Documents NoSQL document operations. and relational tables in one single place. Provides many expert-level Empowered by clustered features, including raw SQL, MySQL setups seamlessly transactions, locking, prepared integrated with InnoDB statements and more. clusters and MySQL Router. Copyright © 2019 Oracle and/or its affiliates. MySQL Router MySQL Router is A standalone, Provides high an integral part of lightweight, availability and the InnoDB cluster, middleware for scalability to client a solution for high transparent applications and is availability that routing between available for Linux, relies on MySQL applications and MacOS and Group Replication. MySQL Servers. Windows. Copyright © 2019 Oracle and/or its affiliates. X Plugin The MySQL server Document storage Implements a plugin that layer on existing MySQL installations new client-server supports the entire by enabling the protocol – the X MySQL Document bridge between the Protocol. Store solution on X DevAPI and the the server side. core MySQL engine. Copyright © 2019 Oracle and/or its affiliates. X Protocol A new client-server Simple packets with Security baked-in protocol based on structured content. SQL replaced by CRUD with TLS enabled Google Protocol operation trees with by default. No Buffers. Uses embedded parameter information leaks improved data binding. Messages can out to non- streaming technics be pipelined and such as Vectored wrapped by conditional authenticated I/O or Pipelining. expectations. users. Copyright © 2019 Oracle and/or its affiliates. Protocol Buffer Message Sample Mysqlx.Crud.Find { collection { name: "collection_name", schema: “schema_name" } data_model: DOCUMENT criteria { type: OPERATOR operator { name: "==" param { type: IDENT, identifier { name: "_id" } } param { type: LITERAL, literal { type: V_STRING, v_string: { value: "some_string" } } } } } } Copyright © 2019 Oracle and/or its affiliates. What is the X DevAPI? MySQL’s cross-platform, language agnostic, API for clients connecting to MySQL servers as a Document Store and classic RDBMS Copyright © 2019 Oracle and/or its affiliates. Key Features Enables MySQL Document Store Synchronous and Asynchronous to client applications operation executions Offers schema-less data storage Secure by default (TLS+SHA2) development Transactions, save points and row-locking Fluent API Programming language agnostic Auto-magic prepared Intuitive CRUD methods statements Raw SQL also available Connection pooling and fail- Domain specific expression over language Integrated in the MySQL Shell Copyright © 2019 Oracle and/or its affiliates. Schema-less Documents Documents are JSON structures Open standard, language-independent file format Human-readable text Uniquely identified by one attribute – "_id" – that exists in all documents Copyright © 2019 Oracle and/or its affiliates. Schema-less Collections Collections are containers of Documents The Document structure within