Web Architecture: Structured Formats (DOM, JSON/YAML)

Total Page:16

File Type:pdf, Size:1020Kb

Web Architecture: Structured Formats (DOM, JSON/YAML) INFO/CS 4302 Web Informaon Systems FT 2012 Week 5: Web Architecture: StructureD Formats – Part 4 (DOM, JSON/YAML) (Lecture 9) Theresa Velden Haslhofer & Velden COURSE PROJECTS Q&A Example Web Informaon System Architecture User Interface REST / Linked Data API Web Application Raw combine, (Relational) Database / Dataset(s), clean, In-memory store / refine Web API(s) File-based store RECAP XML & RelateD Technologies overview Purpose Structured Define Document Access Transform content Structure Document Document Items XML XML Schema XPath XSLT JSON RELAX NG DOM YAML DTD XSLT • A transformaon in the XSLT language is expresseD in the form of an XSL stylesheet – root element: <xsl:stylesheet> – an xml Document using the XSLT namespace, i.e. tags are in the namespace h_p://www.w3.org/1999/XSL/Transform • The body is a set of templates or rules – The ‘match’ aribute specifies an XPath of elements in source tree – BoDy of template specifies contribu6on of source elements to result tree • You neeD an XSLT processor to apply the style sheet to a source XML Document XSLT – In-class Exercise Recap • Example 1 (empty stylesheet – Default behavior) • Example 2 (output format text, local_name()) • Example 3 (pulll moDel, one template only) • Example 4 (push moDel, moDular Design) XSLT: ConDi6onal Instruc6ons • Programming languages typically proviDe ‘if- then, else’ constructs • XSLT proviDes – If-then: <xsl:If> – If-then-(elif-then)*-else: <xsl:choose> XML Source Document xsl:if xsl:if ? xsl:if <html> <boDy> <h2>Movies</h2> <h4>The Others (English 6tle)</h4> </boDy> </html> HTML Result Document xsl:choose xsl:choose <html> <boDy> <h2>Movies</h2> <h4>The Others (English 6tle)</h4> <h4>Les Autres (French 6tle)</h4> </boDy> </html> HTML Result Document xsl:choose xsl:choose <html> <boDy> <h2>Movies</h2> <h4>The Others (en.)</h4> <h4>Les Autres (fr.)</h4> </boDy> </html> HTML Result Document DOM Well-formeD XML Documents • If an xml Document is well-formed it can be transformeD Determinis6cally (parseD) to a single infoset (DOM) DOM – Document Object MoDel • API for manipulang Document tree – Language inDepenDent; implementeD in lots of languages – Suitable for XML anD other Document formats – Core no6on of a node – Using DOM for a programming language requires Defini6on of interfaces anD classes (“language binDings” that proviDe a DOM conformant API) • W3C Specificaons – Level 1: func6onality anD navigaon within a Document – Level 2: moDules anD op6ons for specific content moDels (XML, HTML, CSS) – Level 3: further content moDel facili6es (e.g. XML valiDaon hanDlers) DOM (Core) Level 1 DOM Node Objects • Root must be Document • Root chilDren: one noDe anD op6onally Processing Instruc6ons, DocumentType, Comment, Text • ChilDren of element must be either element, comment or text • A_ributes are proper6es of elements (not their chilDren), anD are not member of the DOM tree • ChilDren of aribute must be text W3C DOM NoDe Types W3C DOM NoDe Types View of DOM Architecture h_p://www.w3.org/TR/DOM-Level-3-Core/introDuc6on.html DOM Architecture anD Conformance • The Core moDule, which contains the funDamental interfaces that must be implementeD by all DOM conformant implementaons, is associateD with the feature name "Core"; • The XML moDule, which contains the interfaces that must be implementeD by all conformant XML 1.0 [XML 1.0] (anD higher) DOM implementaons, is associateD with the feature name "XML". Parsing XML Document MoDel (DOM) • Complete in-memory representaon of en6re tree h_p://Docstore.mik.ua/orelly/xml/jxml/ch05_01.htm Java, Python & DOM • JDOM – Basic navigaon func6onality • Parent • ChilD (all, specific, filtereD) • DescenDants • A_ributes (all, specific, filtereD) – Basic tree manipulaon • ADDing, replacing, removing contents anD aributes) • Text moDificaon • Maintains well-formedness • Python: h_p://Docs.python.org/library/ xml.Dom.miniDom.html Alternave Support for Parsing of XML • SAX (open source sopware) – Event Driven, sequen6al – Mostly hierarchical, no’ sibling’ concept – More memory efficient – GooD for quick, less intensive parsing that Does not require easy-to-use, clean interface h_p://Docstore.mik.ua/orelly/xml/jxml/ch05_01.htm Simple SAX Example Document Events startDocument() <?xml version=“1.0” encoDing=“UTF-8”?> startElement(“books”) startElement(“book”) <books> characters(“War anD Peace”) <book>War anD Peace</book> enDElement(“book”) </book> enDElement(“books”) enDDocument()interface Lagoze Fall 2012) JSON/YAML Document/Data Formats JSON • “JavaScript Object Nota9on (JSON) is a lightweight, text- based, language-independent data interchange format. […] JSON defines a small set of formang rules for the portable representa9on of structured data.” [RFC 4627 h_p://tools.iey.org/html/rfc4627] • popularizaon anD formal specificaon DefineD by Douglas CrockforD (senior JavaScript architect at PayPal) • JSON Homepage: hp://www.json.org/ JSON - an open standard for data interchange • text-baseD & human { readable "firstName": "Nicole", "lastName": "KiDman", "phoneNumber": [ • machine readable anD { easy to parse "type": "home", "number": "212 555-1234" }, • not a mark-up language { but 'self-Descrip6ve' "type": "fax", "number": "646-555-4567" } • not extensible (Different ]} from XML) JSON = JavaScript Object Notation • programming language inDepenDent • maps to two universal structures: 1) An unordereD collec6on of name value pairs: {"firstName": "Nicole","lastName": "KiDman"} in other languages: object, recorD, struct, Dic6onary, hash table, keyeD list, or associave array 2) An orDereD list of values: ["MonDay", "TuesDay", "WeDnesDay"] in other languages: array, vector, list, or sequence JSON Syntax • Primi6ve types: 1. Strings 2. Numbers 3. Booleans (true/false) 4. Null • StructureD Types 1. Objects 2. Array JSON Syntax a collection of string value pairs an ordered list of values hp://www.json.org/ JSON Syntax hp://www.json.org/ JSON Syntax hp://www.json.org/ JSON Syntax hp://www.json.org/ JSON Example: De-constructed { "firstName": "Julia", "lastName": "Chen", "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646-555-4567" } ]} JSON Example: De-constructed { an object with three string "firstName": "Julia", "lastName": value pairs "Chen", "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646-555-4567" } ]} JSON Example: De-constructed { an object with three string "firstName": "Julia", "lastName": value pairs "Chen", "phoneNumber": [ { "type": "home", the value of the thirD pair is "number": "212 555-1234" }, an array { "type": "fax", "number": "646-555-4567" } ]} JSON Example: De-constructed { an object with three string "firstName": "Julia", "lastName": value pairs "Chen", "phoneNumber": [ { "type": "home", the value of the thirD pair is "number": "212 555-1234" }, an array { "type": "fax", holDing two objects, each "number": "646-555-4567" } with two string value pairs ]} JSON formatting and syntax rules h_p://www.freeformaer.com/json-formaer.html Syntax rules such as: • "Objects are encapsulateD within opening anD closing brackets { } • An empty object can be representeD by { } • Arrays are encapsulateD within opening anD closing square brackets [ ] • An empty array can be representeD by [ ] • A member is representeD by a key-value pair • The key of a member shoulD be containeD in Double quotes. (JavaScript Does not require this. JavaScript anD some parsers will tolerate single- quotes) [...]" JSON to XML comparison From: "JSON: The fat free alternave to XML" h_p:// www.json.org/xml.html "JSON is a beLer data exchange format. XML is a beLer document exchange format. Use the right tool for the right job." • JSON mime type: applicaon/json • formally DefineD in RFC 4627 JSON Schema • Defines structure of JSON Data • a contract what JSON Data to proviDe for an applicaon anD how to interact with it • mime-type: applicaon/schema+json • Expired IETF Dra: h_p://tools.iey.org/html/Dra-zyp-json-schema-03 • rarely useD anD lack of tool support JSON data & JSON Schema { schema excerpt: "catalogue": [ e.g. an object has a name (the string) anD { proper6es Defining the value part of the "movie": { object that can incluDe further objects… "ID": 24, "6tle": "Star Wars EpisoDe VI:", {"name": "movie", "actors": [ "properOes":{ { "ID": 10, "ID":{ "name": "Mark Hamill", "type": "number", "birth_date": "09-25-1951" "descripon": "movie iDenfier", }, "requireD": true { "ID": 12, }, "name": "Anthony Daniels", … "birth_date": "02-21-1946" “actors”:{ } “type”: “object”, … ]}}]} } } JSON & AJAX Using the XMLHpRequest API in Javascript var my_JSON_object = {}; var h_p_request = new XMLHpRequest(); returns data in h_p_request.open("GET", url, true); JSON format h_p_request.onreadystatechange = funcon () { from server and var done = 4, ok = 200; evaluates it on if (h_p_request.readyState == done && the client side as h_p_request.status == ok) { a JavaScript my_JSON_object = JSON.pars(h_p_request.responseText); object }}; h_p_request.send(null); [source: h_p://en.wikipeDia.org/wiki/JSON#Schema] Same origin policy: the URL replying to the request must resiDe within the same DNS Domain as the server that hosts the page containing the request; neeD to use JSONP (JSON with padDing) to request objects from Different servers, see h_p://en.wikipeDia.org/wiki/JSONP Writing JSON in Python JSON result file: {"catalogue": {"movies": [{"movie": [{"6tle": "The Others"}, {"actors": [{"actor": {"name": "Nicole Mary KiDman"}}, {"actor": {"name": "Elaine CassiDy"}}, {"actor": {"name": "Christopher Eccleston"}},
Recommended publications
  • Semantic FAIR Data Web Me
    SNOMED CT Research Webinar Today’ Presenter WELCOME! *We will begin shortly* Dr. Ronald Cornet UPCOMING WEBINARS: RESEARCH WEB SERIES CLINICAL WEB SERIES Save the Date! August TBA soon! August 19, 2020 Time: TBA https://www.snomed.org/news-and-events/events/web-series Dr Hyeoun-Ae Park Emeritus Dean & Professor Seoul National University Past President International Medical Informatics Association Research Reference Group Join our SNOMED Research Reference Group! Be notified of upcoming Research Webinars and other SNOMED CT research-related news. Email Suzy ([email protected]) to Join. SNOMED CT Research Webinar: SNOMED CT – OWL in a FAIR web of data Dr. Ronald Cornet SNOMED CT – OWL in a FAIR web of data Ronald Cornet Me SNOMED Use case CT Semantic FAIR data web Me • Associate professor at Amsterdam UMC, Amsterdam Public Health Research Institute, department of Medical Informatics • Research on knowledge representation; ontology auditing; SNOMED CT; reusable healthcare data; FAIR data Conflicts of Interest • 10+ years involvement with SNOMED International (Quality Assurance Committee, Technical Committee, Implementation SIG, Modeling Advisory Group) • Chair of the GO-FAIR Executive board • Funding from European Union (Horizon 2020) Me SNOMED Use case CT Semantic FAIR data web FAIR Guiding Principles https://go-fair.org/ FAIR Principles – concise • Findable • Metadata and data should be easy to find for both humans and computers • Accessible • The user needs to know how data can be accessed, possibly including authentication and authorization
    [Show full text]
  • SHACL Satisfiability and Containment
    SHACL Satisfiability and Containment Paolo Pareti1 , George Konstantinidis1 , Fabio Mogavero2 , and Timothy J. Norman1 1 University of Southampton, Southampton, United Kingdom {pp1v17,g.konstantinidis,t.j.norman}@soton.ac.uk 2 Università degli Studi di Napoli Federico II, Napoli, Italy [email protected] Abstract. The Shapes Constraint Language (SHACL) is a recent W3C recom- mendation language for validating RDF data. Specifically, SHACL documents are collections of constraints that enforce particular shapes on an RDF graph. Previous work on the topic has provided theoretical and practical results for the validation problem, but did not consider the standard decision problems of satisfiability and containment, which are crucial for verifying the feasibility of the constraints and important for design and optimization purposes. In this paper, we undertake a thorough study of different features of non-recursive SHACL by providing a translation to a new first-order language, called SCL, that precisely captures the semantics of SHACL w.r.t. satisfiability and containment. We study the interaction of SHACL features in this logic and provide the detailed map of decidability and complexity results of the aforementioned decision problems for different SHACL sublanguages. Notably, we prove that both problems are undecidable for the full language, but we present decidable combinations of interesting features. 1 Introduction The Shapes Constraint Language (SHACL) has been recently introduced as a W3C recommendation language for the validation of RDF graphs, and it has already been adopted by mainstream tools and triplestores. A SHACL document is a collection of shapes which define particular constraints and specify which nodes in a graph should be validated against these constraints.
    [Show full text]
  • D2.2: Research Data Exchange Solution
    H2020-ICT-2018-2 /ICT-28-2018-CSA SOMA: Social Observatory for Disinformation and Social Media Analysis D2.2: Research data exchange solution Project Reference No SOMA [825469] Deliverable D2.2: Research Data exchange (and transparency) solution with platforms Work package WP2: Methods and Analysis for disinformation modeling Type Report Dissemination Level Public Date 30/08/2019 Status Final Authors Lynge Asbjørn Møller, DATALAB, Aarhus University Anja Bechmann, DATALAB, Aarhus University Contributor(s) See fact-checking interviews and meetings in appendix 7.2 Reviewers Noemi Trino, LUISS Datalab, LUISS University Stefano Guarino, LUISS Datalab, LUISS University Document description This deliverable compiles the findings and recommended solutions and actions needed in order to construct a sustainable data exchange model for stakeholders, focusing on a differentiated perspective, one for journalists and the broader community, and one for university-based academic researchers. SOMA-825469 D2.2: Research data exchange solution Document Revision History Version Date Modifications Introduced Modification Reason Modified by v0.1 28/08/2019 Consolidation of first DATALAB, Aarhus draft University v0.2 29/08/2019 Review LUISS Datalab, LUISS University v0.3 30/08/2019 Proofread DATALAB, Aarhus University v1.0 30/08/2019 Final version DATALAB, Aarhus University 30/08/2019 Page | 1 SOMA-825469 D2.2: Research data exchange solution Executive Summary This report provides an evaluation of current solutions for data transparency and exchange with social media platforms, an account of the historic obstacles and developments within the subject and a prioritized list of future scenarios and solutions for data access with social media platforms. The evaluation of current solutions and the historic accounts are based primarily on a systematic review of academic literature on the subject, expanded by an account on the most recent developments and solutions.
    [Show full text]
  • R Markdown Cheat Sheet I
    1. Workflow R Markdown is a format for writing reproducible, dynamic reports with R. Use it to embed R code and results into slideshows, pdfs, html documents, Word files and more. To make a report: R Markdown Cheat Sheet i. Open - Open a file that ii. Write - Write content with the iii. Embed - Embed R code that iv. Render - Replace R code with its output and transform learn more at rmarkdown.rstudio.com uses the .Rmd extension. easy to use R Markdown syntax creates output to include in the report the report into a slideshow, pdf, html or ms Word file. rmarkdown 0.2.50 Updated: 8/14 A report. A report. A report. A report. A plot: A plot: A plot: A plot: Microsoft .Rmd Word ```{r} ```{r} ```{r} = = hist(co2) hist(co2) hist(co2) ``` ``` Reveal.js ``` ioslides, Beamer 2. Open File Start by saving a text file with the extension .Rmd, or open 3. Markdown Next, write your report in plain text. Use markdown syntax to an RStudio Rmd template describe how to format text in the final report. syntax becomes • In the menu bar, click Plain text File ▶ New File ▶ R Markdown… End a line with two spaces to start a new paragraph. *italics* and _italics_ • A window will open. Select the class of output **bold** and __bold__ you would like to make with your .Rmd file superscript^2^ ~~strikethrough~~ • Select the specific type of output to make [link](www.rstudio.com) with the radio buttons (you can change this later) # Header 1 • Click OK ## Header 2 ### Header 3 #### Header 4 ##### Header 5 ###### Header 6 4.
    [Show full text]
  • Definition of Data Exchange Standard for Railway Applications
    PRACE NAUKOWE POLITECHNIKI WARSZAWSKIEJ z. 113 Transport 2016 6/*!1 Uniwersytet Technologiczno-:]! w Radomiu, (,? DEFINITION OF DATA EXCHANGE STANDARD FOR RAILWAY APPLICATIONS The manuscript delivered: March 2016 Abstract: Railway similar to the other branches of economy commonly uses information technologies in its business. This includes, inter alia, issues such as railway traffic management, rolling stock management, stacking timetables, information for passengers, booking and selling tickets. Variety aspects of railway operations as well as a large number of companies operating in the railway market causes that currently we use a lot of independent systems that often should work together. The lack of standards for data structures and protocols causes the need to design and maintain multiple interfaces. This approach is inefficient, time consuming and expensive. Therefore, the initiative to develop an open standard for the exchange of data for railway application was established. This new standard was named railML. The railML is based on Extensible Markup Language (XML) and uses XML Schema to define a new data exchange format and structures for data interoperability of railway applications. In this paper the current state of railML specification and the trend of development were discussed. Keywords: railway traffic control systems, railML, XML 1. INTRODUCTION It is hard to imagine the functioning of the modern world without information technologies. It is a result of numerous advantages of the modern IT solutions. One of the most important arguments for using IT systems is cost optimisation [1, 3, 6]. Variety aspects of railway operations as well as a large number of companies operating in the railway market causes that currently we use a lot of independent systems that often should cooperate.
    [Show full text]
  • JSON Application Programming Interface for Discrete Event Simulation Data Exchange
    JSON Application Programming Interface for Discrete Event Simulation data exchange Ioannis Papagiannopoulos Enterprise Research Centre Faculty of Science and Engineering Design and Manufacturing Technology University of Limerick Submitted to the University of Limerick for the degree of Master of Engineering 2015 1. Supervisor: Prof. Cathal Heavey Enterprise Research Centre University of Limerick Ireland ii Abstract This research is conducted as part of a project that has the overall aim to develop an open source discrete event simulation (DES) platform that is expandable, and modular aiming to support the use of DES at multi-levels of manufacturing com- panies. The current work focuses on DES data exchange within this platform. The goal of this thesis is to develop a DES exchange interface between three different modules: (i) ManPy an open source discrete event simulation engine developed in Python on the SimPy library; (ii) A Knowledge Extraction (KE) tool used to populate the ManPy simulation engine from shop-floor data stored within an Enterprise Requirements Planning (ERP) or a Manufacturing Execution System (MES) to allow the potential for real-time simulation. The development of the tool is based on R scripting language, and different Python libraries; (iii) A Graphical User Interface (GUI) developed in JavaScript used to provide an interface in a similar manner to Commercial off-the-shelf (COTS) DES tools. In the literature review the main standards that could be used are reviewed. Based on this review and the requirements above, the data exchange format standard JavaScript Object Notation (JSON) was selected. The proposed solution accom- plishes interoperability between different modules using an open source, expand- able, and easy to adopt and maintain, in an all inclusive JSON file.
    [Show full text]
  • Rmarkdown : : CHEAT SHEET RENDERED OUTPUT File Path to Output Document SOURCE EDITOR What Is Rmarkdown? 1
    rmarkdown : : CHEAT SHEET RENDERED OUTPUT file path to output document SOURCE EDITOR What is rmarkdown? 1. New File Write with 5. Save and Render 6. Share find in document .Rmd files · Develop your code and publish to Markdown ideas side-by-side in a single rpubs.com, document. Run code as individual shinyapps.io, The syntax on the lef renders as the output on the right. chunks or as an entire document. set insert go to run code RStudio Connect Rmd preview code code chunk(s) Plain text. Plain text. Dynamic Documents · Knit together location chunk chunk show End a line with two spaces to End a line with two spaces to plots, tables, and results with outline start a new paragraph. start a new paragraph. narrative text. Render to a variety of 4. Set Output Format(s) Also end with a backslash\ Also end with a backslash formats like HTML, PDF, MS Word, or and Options reload document to make a new line. to make a new line. MS Powerpoint. *italics* and **bold** italics and bold Reproducible Research · Upload, link superscript^2^/subscript~2~ superscript2/subscript2 to, or attach your report to share. ~~strikethrough~~ strikethrough Anyone can read or run your code to 3. Write Text run all escaped: \* \_ \\ escaped: * _ \ reproduce your work. previous modify chunks endash: --, emdash: --- endash: –, emdash: — chunk run options current # Header 1 Header 1 chunk ## Header 2 Workflow ... Header 2 2. Embed Code ... 11. Open a new .Rmd file in the RStudio IDE by ###### Header 6 Header 6 going to File > New File > R Markdown.
    [Show full text]
  • Conda-Build Documentation Release 3.21.5+15.G174ed200.Dirty
    conda-build Documentation Release 3.21.5+15.g174ed200.dirty Anaconda, Inc. Sep 27, 2021 CONTENTS 1 Installing and updating conda-build3 2 Concepts 5 3 User guide 17 4 Resources 49 5 Release notes 115 Index 127 i ii conda-build Documentation, Release 3.21.5+15.g174ed200.dirty Conda-build contains commands and tools to use conda to build your own packages. It also provides helpful tools to constrain or pin versions in recipes. Building a conda package requires installing conda-build and creating a conda recipe. You then use the conda build command to build the conda package from the conda recipe. You can build conda packages from a variety of source code projects, most notably Python. For help packing a Python project, see the Setuptools documentation. OPTIONAL: If you are planning to upload your packages to Anaconda Cloud, you will need an Anaconda Cloud account and client. CONTENTS 1 conda-build Documentation, Release 3.21.5+15.g174ed200.dirty 2 CONTENTS CHAPTER ONE INSTALLING AND UPDATING CONDA-BUILD To enable building conda packages: • install conda • install conda-build • update conda and conda-build 1.1 Installing conda-build To install conda-build, in your terminal window or an Anaconda Prompt, run: conda install conda-build 1.2 Updating conda and conda-build Keep your versions of conda and conda-build up to date to take advantage of bug fixes and new features. To update conda and conda-build, in your terminal window or an Anaconda Prompt, run: conda update conda conda update conda-build For release notes, see the conda-build GitHub page.
    [Show full text]
  • Strategic Directions for Sakai and Data Interoperability Charles Severance ([email protected]), Joseph Hardin ([email protected])
    Strategic Directions for Sakai and Data Interoperability Charles Severance ([email protected]), Joseph Hardin ([email protected]) Sakai is emerging as the leading open source enterprise-class collaboration and learning environment. Sakai's initial purpose was to produce a single application but increasingly, Sakai will need to operate with other applications both within and across enterprises. This document is intended to propose a roadmap as to where Sakai should go in terms of data interoperability both amongst applications running within Sakai and with applications interacting with Sakai. There will be other aspects of future Sakai development that are not covered here. This document takes a long-term view on the evolution of Sakai - it is complementary to the Sakai Requirements process, which captures short to medium term priorities. The tasks discussed in this document should not be seen as the "most important" tasks for Sakai. The document only covers data exchange aspects of Sakai. Nothing in this document is set in stone - since Sakai is a community effort, everyone is a volunteer. However, by publishing this overview we hope to facilitate consensus and alignment of goals within the community over the longer- term future of Sakai. Sakai is currently a Service-Oriented-Architecture. This work maintains and enhances the Service-Oriented aspects of Sakai and adds the ability to use Sakai as an set of objects. This work move be both Service Oriented and Object- Oriented. Making Sakai Web 2.0 While "Web 2.0" is a vastly overused term, in some ways, this effort can be likened to building the Web 2.0 version of Sakai.
    [Show full text]
  • Healing the Fragmentation to Realise the Full Potential of The
    HealingHealing thethe fragmentationfragmentation toto realiserealise thethe fullfull potentialpotential of thethe IoTIoT Dr.Dr. DaveDave Raggett,Raggett, W3C/ERCIMW3C/ERCIM email:email: [email protected]@w3.org 2525 JuneJune 20202020 ThisThis talktalk isis supportedsupported byby thethe CreateCreate--IoTIoT CoordinationCoordination andand SupportSupport ActionAction withwith fundingfunding fromfrom thethe EuropeanEuropean CommissionCommission Investments in IoT are at risk! Eric Siow, Director, Open Web Platform Standards and Ecosystem Strategies at Intel: • IoT is a little over 10 years old • Hype has been much greater than present reality • IoT is “biting off more that it can chew” • Trying to address too many markets • Involves too many and mostly uncoordinated SDOs and SIGs 2/14 Key IoT Challenges Facing Smart Cities • Lack of coalescence around a set of complementary standards • Hinders scalability, interoperability and evolution • Need to simplify: prioritise and define requirements • Regional regulatory differences adding to the confusion • Diverse requirements impede scalability of the market • Need regulatory agencies to participate and help with standardisation requirements • Lack of interoperability wastes up to 40% of IoT value1 • Cities and technology partners may waste up to $321 billion by 20252 1. https://www.mckinsey.com/business-functions/digital-mckinsey/our-insights/the-internet-of-things-the-value-of-digitizing-the-physical-world 2. https://machinaresearch.com/news/smart-cities-could-waste-usd341-billion-by-2025-on-non-standardized-iot-deployments/
    [Show full text]
  • A Package for Developing Machine Learning-Based Chemically Accurate Energy and Density Functional Models
    DeePKS-kit: a package for developing machine learning-based chemically accurate energy and density functional models Yixiao Chena, Linfeng Zhanga, Han Wangb, Weinan Ea,c aProgram in Applied and Computational Mathematics, Princeton University, Princeton, NJ, USA bLaboratory of Computational Physics, Institute of Applied Physics and Computational Mathematics, Huayuan Road 6, Beijing 100088, People’s Republic of China cDepartment of Mathematics, Princeton University, Princeton, NJ, USA Abstract We introduce DeePKS-kit, an open-source software package for developing machine learning based energy and density functional models. DeePKS-kit is interfaced with PyTorch, an open-source machine learning library, and PySCF, an ab initio computational chemistry program that provides simple and customized tools for developing quantum chemistry codes. It supports the DeePHF and DeePKS methods. In addition to explaining the details in the methodology and the software, we also provide an example of developing a chemically accurate model for water clusters. Keywords: Electronic structure, Density functional theory, Exchange-correlation functional, Deep learning PROGRAM SUMMARY reached great accuracy in specific applications[4]. However, Program Title: DeePKS-kit in general, chemical accuracy cannot be easily achieved for Developer’s repository link: these methods, and the design of xc-functionals can take a https://github.com/deepmodeling/deepks-kit lot of efforts. Licensing provisions: LGPL Recent advances in machine learning is changing the Programming language: Python state of affairs. Significant progress has been made by Nature of problem: using machine learning methods to represent a wide range Modeling the energy and density functional in electronic struc- of quantities directly as functions of atomic positions and ture problems with high accuracy by neural network models.
    [Show full text]
  • Semantics and Validation of Recursive SHACL
    Semantics and Validation of Recursive SHACL Julien Corman1, Juan L. Reutter2, and Ognjen Savkovic´1 1 Free University of Bozen-Bolzano, Bolzano, Italy 2 PUC Chile and IMFD Chile Abstract. With the popularity of RDF as an independent data model came the need for specifying constraints on RDF graphs, and for mechanisms to detect violations of such constraints. One of the most promising schema languages for RDF is SHACL, a recent W3C recommendation. Unfortunately, the specification of SHACL leaves open the problem of validation against recursive constraints. This omission is important because SHACL by design favors constraints that reference other ones, which in practice may easily yield reference cycles. In this paper, we propose a concise formal semantics for the so-called “core constraint components” of SHACL. This semantics handles arbitrary recursion, while being compliant with the current standard. Graph validation is based on the existence of an assignment of SHACL “shapes” to nodes in the graph under validation, stating which shapes are verified or violated, while verifying the targets of the validation process. We show in particular that the design of SHACL forces us to consider cases in which these assignments are partial, or, in other words, where the truth value of a constraint at some nodes of a graph may be left unknown. Dealing with recursion also comes at a price, as validating an RDF graph against SHACL constraints is NP-hard in the size of the graph, and this lower bound still holds for constraints with stratified negation. Therefore we also propose a tractable approximation to the validation problem.
    [Show full text]