Building Flexible Systems

Size: px
Start display at page:

Download "Building Flexible Systems"

Transcription

1 Building Flexible Systems with Clojure and Datomic Stuart Sierra Cognitect

2 We don t want to paint ourselves into a corner

3

4

5 Clojure

6 Flexible Systems Fact-based Context-free Non-exclusive Observable

7 Fact Based

8 Fact Based Fact = statement about the world Cannot be invalidated

9 public class Person { private List<Person> friends; public void addfriend(person newfriend);

10 mutable? public class Person { private List<Person> friends; public void addfriend(person newfriend) { if (friends.length() < 500) friends.add(newfriend); else... race condition?

11

12 Universal Data Collection: Set #{ } Ordered: Vector ["Alice" "Bob"] Command or stack: List (println user) Structured: Map {:name "Bob" :age 42} Associative: Map {412 "a" 114 "b"}

13 map {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]} vector of maps

14 (defn add-friend [person new-friend] (if (< (count (:friends person)) 500) (update person :friends conj new-friend) {:error :too-friendly}))

15 define function name parameters (defn add-friend [person new-friend] list symbol vector

16 condition (if (< (count (:friends person)) 500)

17 condition (if (< (count (:friends person)) 500) (update person :friends conj new-friend) then

18 {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]} navigation (update person :friends conj new-friend)

19 [{:name "Alice"} {:name "Bob"}] conjoin vector conj new-friend) [{:name "Alice"} {:name "Bob"} {:name "Claire"}]}

20 {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]} update map (update person :friends conj new-friend) {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"} {:name "Claire"}]}

21 {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]} universal data structures (update person :friends conj new-friend) universal operations {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"} {:name "Claire"}]}

22 {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]} (add-friend person {:name "Claire"}) domain rule in terms of universal data and operations {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"} {:name "Claire"}]}

23 (A Few) Universal Operations nth get map concat keys filter cycle union vals remove interleave difference assoc reduce interpose intersection assoc-in replace distinct select update some flatten subset? update-in sort group-by superset? dissoc shuffle partition join merge reverse split-at project merge-with take split-with index select-keys drop frequencies rename

24 Immutable Values (defn add-friend [person new-friend] (if (< (count (:friends person)) 500) no race condition (update person :friends conj new-friend)...)) immutable value

25 value function value

26 value function value function value Time

27 identity value function value function value Time

28 stable live identity value function value function value Time

29 (let [current-user (atom {:name "Kelly Q." :friends [{:name "Alice" :name "Bob"}]})] current-user {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]}

30 dereference (let [friends (html [:p "Your " (count friends) " friends"] [:ul (for [friend friends] [:li (:name friend)])])) current-user {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]}

31 dereference (let [friends (html [:p "Your " (count friends) " friends"] [:ul (for [friend friends] [:li (:name friend)])])) immutable value {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]}

32 identity (swap! current-user add-friend {:name "Claire"}) change state pure function {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"}]} current-user add-friend {:name "Kelly Q." :friends [{:name "Alice"} {:name "Bob"} {:name "Claire"}]}

33 connection storage service

34 (db connection) connection database value storage service

35 database value (let [db (db connection)] (query db...) (query db...) (query db...)

36 connection database value transact database value transact database value Time

37 Universal Data Entity Attribute Value kelly :name "Kelly Q." kelly :friends alice kelly :friends bob

38 Universal Data in Time Entity Attribute Value Op Tx kelly :name "Kelly Q." add 1000 kelly :friends alice add 1000 kelly :friends bob add 1000

39 Universal Data in Time Entity Attribute Value Op Tx kelly :name "Kelly Q." add 1000 kelly :friends alice add 1000 kelly :friends bob add 1000 kelly :friends bob retract 1023 kelly :friends claire add 1023

40 Current State Entity Attribute Value Op Tx kelly :name "Kelly Q." add 1000 kelly :friends alice add 1000 {:name "Kelly Q." kelly :friends bob add 1000 :friends [{:name "Alice"} {:name "Claire"}]} kelly :friends bob retract 1023 kelly :friends claire add 1023

41 State as-of Last Week Entity Attribute Value Op Tx kelly :name "Kelly Q." add 1000 kelly :friends alice add 1000 kelly :friends bob add 1000 {:name "Kelly Q." kelly :friends bob retract 1023 :friends [{:name "Alice"} {:name "Bob"}]} kelly :friends claire add 1023

42 (swap! current-user add-friend...) change state identity pure function (transact connection [[:add-friend...]])

43 stable live identity database value transact database value transact database value Time

44 Fact Based Fact = statement about the world Cannot be invalidated Immutable values Using uniform data structures Incorporating time

45 Context Free

46 Context Free Values are complete and self-describing No out-of-band knowledge required to handle correctly

47 {:id "1234abcd" :name "T.J."} {:id "abcd" :balance 42.00} {:id 7980 :region "AUS"}

48 {:customer/id "1234abcd" :customer/name "T.J."} {:billing.customer/id "abcd" :billing.customer/balance 42.00} {:widgetco.customer/id 7980 :widgetco/region "AUS"} namespaced keywords

49 (merge customer billing-customer widgetco-customer) {:customer/id "1234abcd" :customer/name "T.J." :billing.customer/id "abcd" :billing.customer/balance :widgetco.customer/id 7980 :widgetco/region "AUS"}

50 clojure.spec (s/def :customer/id (s/and string? #(re-matches #"[0-9a-e]{8}" %))) (s/def :customer/name (s/and string? #(not (str/blank? %)))) (s/def ::Customer (s/keys :req [:customer/id] :opt [:customer/name]]))

51 (let [user {:customer/name ""}] (s/explain ::Customer user)) val: {:customer/name ""} fails spec: ::Customer predicate: (contains? % :customer/id) In: [:customer/name] val: "" fails spec: :customer/name at: [:customer/name] predicate: (not (blank? %))

52 (pull db [:customer/name :customer/start-date {:customer/account [:account/id :account/balance]}] customer) {:customer/name "T.J." :customer/start-date #inst" " :customer/account {:account/id :account/balance 4200}}

53 (defui UserWidget static om/iquery om.next (query [this] [:user/name {:user/friends [:user/name]}]) Object (render [this] (let [friends (:user/friends (om/props this))] (html [:p "Your " (count friends) " friends"] [:ul (for [friend friends] [:li (:user/name friend)])]))))

54 Context Free Values are complete and self-describing No out-of-band knowledge required to handle correctly Use namespaces for globally-unique labels Let consumers control interactions

55

56 Non-exclusive

57 Non-exclusive Do not obstruct data evolution Continue correct operation in the presence of unexpected input

58 input function input output

59 input function input extra extra output extra extra

60 condition (defn gold-status [customer] (if (< 100 (:customer/orders customer)) then: augment and return (assoc customer :loyalty/tier :gold) customer)) else: return unchanged

61 clojure.spec (s/fdef gold-status :args (s/cat :customer (s/keys :req [:customer/id :customer/orders]))) minimal required keys

62 (gold-status {:customer/id "abcd1234" :customer/balance 4200}) ExceptionInfo Call to #'user/gold-status did not conform to spec: In: [0] val: {:customer/id "abcd1234", :customer/balance 4200} fails at: [:args :customer] predicate: (contains? % :customer/orders)

63 (gold-status {:customer/id "abcd1234" :customer/orders 123 :customer/balance 4200}) {:customer/id "abcd1234" :customer/orders 123 :customer/balance 4200 :status :gold} extra data passed through

64 Non-exclusive Do not obstruct data evolution Continue correct operation in the presence of unexpected input Enforce only minimum input requirements Ignore and pass through extra input

65

66 <?xml version="1.0" encoding="utf-8"?> <description xmlns=" targetnamespace= " xmlns:tns= " xmlns:ghns = " xmlns:wsoap= " xmlns:soap=" xmlns:wsdlx= " <types> <xs:schema xmlns:xs=" targetnamespace=" ressvc" xmlns=" <xs:element name="checkavailability" type="tcheckavailability <xs:complextype name="tcheckavailability"> <xs:sequence> <xs:element name="checkindate" type="xs:date"/> <xs:element name="checkoutdate" type="xs:date"/> <xs:element name="roomtype" type="xs:string"/> </xs:sequence>

67 Observable

68 Observable Internal state of the system can be recreated at any point Output of the system is sufficient to recover its state

69 Internal state

70 value function

71 current state new state function new input output

72 (defn handle [state request] ;; compute new state ;; decide how to respond (-> (update state...) (assoc :response...))

73 current state new state function new input output log

74 {:uri "datomic:ddb:us-east-1..." :t 12345}

75 state {:uri "datomic:ddb:us-east-1..." :t 12345} input {:method :post :path "/users" :params {:name "Leslie"}} (let [conn (connect uri) db (as-of (db conn) t)] (handle db request))

76 {:request-id :method :post :path "/users" :query-params {:name "Leslie"}} [[:db/add user :user/name "Leslie"] [:db/add tx :tx/request-id ]]

77 Observable Internal state of the system can be recreated at any point Output of the system is sufficient to recover its state Minimize necessary information to completely describe internal state Store inputs at boundaries

78

79 Flexible Systems Fact-based Immutable values, in domain terms, with time Context-free Namespaces; consumer control Non-exclusive Enforce minimum, pass-through extra Observable Log input, point-in-time state, provenance

80 The New Normal blog series, Mike Nygard Case Studies: cognitect.com, datomic.com clojure.org ClojureTV on YouTube stuartsierra.com

Java, with a Clojure

Java, with a Clojure Java, with a Clojure mindset @DanLebrero www.akvo.org (((((( ((((((())))))) )))))) Clojure Functional Hosted Dynamic Strongly typed Lisp Give 10$ free cash if client makes 1000 bets in less than

More information

2 12 th March Web Science th March Service Science th March Web Services (WSDL, SOAP, UDDI, XML)

2 12 th March Web Science th March Service Science th March Web Services (WSDL, SOAP, UDDI, XML) www.sti-innsbruck.at Where are we? # Date Title 1 5 th March Introduction 2 12 th March Web Science 3 19 th March Service Science Semantic Web Services Web Service Technologies Lecture IV 26 th March 2009

More information

INFOH509 XML & Web Technologies Lecture 11 BIGWS-* WEB SERVICES

INFOH509 XML & Web Technologies Lecture 11 BIGWS-* WEB SERVICES INFOH509 XML & Web Technologies Lecture 11 BIGWS-* WEB SERVICES SERVICES Two competing technology stacks Big Web Services (WS-*) Various (complex) protocols on top of HTTP (SOAP, UDDI, WSDL, WS-Addressing,

More information

Clojure for OOP folks Stefan innoq

Clojure for OOP folks Stefan innoq Clojure for OOP folks Stefan Tilkov @stilkov innoq 1 Motivation 2 Syntax Idioms 3 OOP Thinking model domains with classes & interfaces encapsulate data in objects prefer specific over generic solutions

More information

SOAP / WSDL INTRODUCTION TO SOAP, WSDL AND UDDI, THE COMBO FOR BIG WEB SERVICES SOAP - WSDL - UDDI. PETER R. EGLI peteregli.net. peteregli.

SOAP / WSDL INTRODUCTION TO SOAP, WSDL AND UDDI, THE COMBO FOR BIG WEB SERVICES SOAP - WSDL - UDDI. PETER R. EGLI peteregli.net. peteregli. / WSDL INTRODUCTION TO, WSDL AND UDDI, THE COMBO FOR BIG WEB SERVICES PETER R. EGLI 1/31 Contents 1. What is a web service? 2. Web service architecture 3. Web service versus conventional object middleware

More information

CPL 2016, week 10. Clojure functional core. Oleg Batrashev. April 11, Institute of Computer Science, Tartu, Estonia

CPL 2016, week 10. Clojure functional core. Oleg Batrashev. April 11, Institute of Computer Science, Tartu, Estonia CPL 2016, week 10 Clojure functional core Oleg Batrashev Institute of Computer Science, Tartu, Estonia April 11, 2016 Overview Today Clojure language core Next weeks Immutable data structures Clojure simple

More information

June 27, 2014 EuroClojure 2014 Krakow, Poland. Components. Just Enough

June 27, 2014 EuroClojure 2014 Krakow, Poland. Components. Just Enough June 27, 2014 EuroClojure 2014 Krakow, Poland Components Just Enough Structure @stuartsierra Presentation Business Logic DB SMS Email Presentation Thread Pool Business Logic Queues Public API Private API

More information

Clojure: Enemy of the State

Clojure: Enemy of the State Clojure: Enemy of the State * * Not actually an enemy of the state, or state in general. :) Alex Miller @puredanger Roadmap Values vs objects Collections Sequences Generic data interfaces Identity and

More information

Final Review. May 9, 2017

Final Review. May 9, 2017 Final Review May 9, 2017 1 SQL 2 A Basic SQL Query (optional) keyword indicating that the answer should not contain duplicates SELECT [DISTINCT] target-list A list of attributes of relations in relation-list

More information

Final Review. May 9, 2018 May 11, 2018

Final Review. May 9, 2018 May 11, 2018 Final Review May 9, 2018 May 11, 2018 1 SQL 2 A Basic SQL Query (optional) keyword indicating that the answer should not contain duplicates SELECT [DISTINCT] target-list A list of attributes of relations

More information

MEP SSDL Protocol Framework

MEP SSDL Protocol Framework Abstract MEP SSDL Protocol Framework Savas Parastatidis 1, Jim Webber 2 Savas@Parastatidis.name, Jim@Webber.name The Message Exchange Patterns (MEP) SSDL Protocol Framework defines a collection of XML

More information

Tool-assisted spec development

Tool-assisted spec development Typed Clojure Tool-assisted spec development Ambrose Bonnaire-Sergeant Sam Tobin-Hochstadt Spec is awesome Expressive specification language Runtime instrumentation Generative testing Documentation Parsing

More information

Clojure Concurrency Constructs. CSCI 5828: Foundations of Software Engineering Lecture 12 10/02/2014

Clojure Concurrency Constructs. CSCI 5828: Foundations of Software Engineering Lecture 12 10/02/2014 Clojure Concurrency Constructs CSCI 5828: Foundations of Software Engineering Lecture 12 10/02/2014 1 Goals Cover the material presented in Chapters 3 & 4 of our concurrency textbook! Books examples from

More information

This tutorial is designed for all those software professionals who are keen on learning the basics of Clojure and how to put it into practice.

This tutorial is designed for all those software professionals who are keen on learning the basics of Clojure and how to put it into practice. About the Tutorial Clojure is a high level, dynamic functional programming language. It is designed, based on the LISP programming language, and has compilers that makes it possible to be run on both Java

More information

XML and Semantic Web Technologies. II. XML / 6. XML Query Language (XQuery)

XML and Semantic Web Technologies. II. XML / 6. XML Query Language (XQuery) XML and Semantic Web Technologies XML and Semantic Web Technologies II. XML / 6. XML Query Language (XQuery) Prof. Dr. Dr. Lars Schmidt-Thieme Information Systems and Machine Learning Lab (ISMLL) Institute

More information

Stuart

Stuart Clojure Time Stuart Halloway stu@clojure.com @stuarthalloway Copyright 2007-2010 Relevance, Inc. This presentation is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United

More information

Functional Programming. Pure Functional Programming

Functional Programming. Pure Functional Programming Functional Programming Pure Functional Programming Computation is largely performed by applying functions to values. The value of an expression depends only on the values of its sub-expressions (if any).

More information

Solution Sheet 5 XML Data Models and XQuery

Solution Sheet 5 XML Data Models and XQuery The Systems Group at ETH Zurich Big Data Fall Semester 2012 Prof. Dr. Donald Kossmann Prof. Dr. Nesime Tatbul Assistants: Martin Kaufmann Besmira Nushi 07.12.2012 Solution Sheet 5 XML Data Models and XQuery

More information

Reagent. a ClojureScript interface to React. React Amsterdam Meetup 12 Feb. 2015

Reagent. a ClojureScript interface to React. React Amsterdam Meetup 12 Feb. 2015 Reagent a ClojureScript interface to React React Amsterdam Meetup 12 Feb. 2015 Michiel Borkent Twitter: @borkdude Email: michielborkent@gmail.com Clojure(Script) developer at Clojure since 2009 Former

More information

Lecture 12: Transactions. Monday, March 2, 2015

Lecture 12: Transactions. Monday, March 2, 2015 Lecture 12: Transactions Monday, March 2, 2015 Agenda Review HW #3 Introduce transactions Work on class project (Checkpoints #1 and #2) Review Questions: SQL Design How would you represent in SQL: 1-the

More information

Introduction Basics Concurrency Conclusion. Clojure. Marcel Klinzing. December 13, M. Klinzing Clojure 1/18

Introduction Basics Concurrency Conclusion. Clojure. Marcel Klinzing. December 13, M. Klinzing Clojure 1/18 Clojure Marcel Klinzing December 13, 2012 M. Klinzing Clojure 1/18 Overview/History Functional programming language Lisp dialect Compiles to Java Bytecode Implemented in Java Created by Rich Hickey Version

More information

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: 20762C Developing SQL 2016 Databases Module 1: An Introduction to Database Development Introduction to the

More information

SYNDICATING HIERARCHIES EFFECTIVELY

SYNDICATING HIERARCHIES EFFECTIVELY SDN Contribution SYNDICATING HIERARCHIES EFFECTIVELY Applies to: SAP MDM 5.5 Summary This document introduces hierarchy tables and a method of effectively sending out data stored in hierarchy tables. Created

More information

IBM. IBM i2 Analyze Data Acquisition Guide. Version 4 Release 0

IBM. IBM i2 Analyze Data Acquisition Guide. Version 4 Release 0 IBM IBM i2 Analyze Data Acquisition Guide Version 4 Release 0 Note Before using this information and the product it supports, read the information in Notices on page 29. This edition applies to version

More information

Clojure Lisp for the Real #clojure

Clojure Lisp for the Real #clojure Clojure Lisp for the Real World @stuartsierra #clojure 1 Bullet Points Values Code is data Generic data access Concurrency 2 Stuart Sierra Relevance, Inc. Clojure/core Clojure contributor 3 Values 4 Values

More information

XEP-0298: Delivering Conference Information to Jingle Participants (Coin)

XEP-0298: Delivering Conference Information to Jingle Participants (Coin) XEP-0298: Delivering Conference Information to Jingle Participants (Coin) Emil Ivov mailto:emcho@jitsi.org xmpp:emcho@jit.si Enrico Marocco mailto:enrico.marocco@telecomitalia.it xmpp:enrico@tilab.com

More information

Network Configuration Protocol

Network Configuration Protocol The (NETCONF) defines a simple mechanism through which a network device can be managed, configuration data can be retrieved, and new configuration data can be uploaded and manipulated. NETCONF uses Extensible

More information

What if Type Systems were more like Linters?

What if Type Systems were more like Linters? Typed Clojure An optional type system for Clojure What if Type Systems were more like Linters? Ambrose Bonnaire-Sergeant Me A Practical Optional Type System for Clojure (2012) Typed Clojure Indiegogo Campaign

More information

Applied Information and Communication Technology

Applied Information and Communication Technology Applied Information and Communication Technology Unit 7: Using Database Software Summer 2010 Example Solution and Principal Examiner Advice and Guidance Activity 1...3 Activity 2...6 Activity 3...12 Activity

More information

Pig A language for data processing in Hadoop

Pig A language for data processing in Hadoop Pig A language for data processing in Hadoop Antonino Virgillito THE CONTRACTOR IS ACTING UNDER A FRAMEWORK CONTRACT CONCLUDED WITH THE COMMISSION Apache Pig: Introduction Tool for querying data on Hadoop

More information

XEP-0033: Extended Stanza Addressing

XEP-0033: Extended Stanza Addressing XEP-0033: Extended Stanza Addressing Joe Hildebrand mailto:jhildebr@cisco.com xmpp:hildjj@jabber.org Peter Saint-Andre mailto:xsf@stpeter.im xmpp:peter@jabber.org http://stpeter.im/ 2017-01-11 Version

More information

Introduction to Spatial Database Systems

Introduction to Spatial Database Systems Introduction to Spatial Database Systems by Cyrus Shahabi from Ralf Hart Hartmut Guting s VLDB Journal v3, n4, October 1994 Data Structures & Algorithms 1. Implementation of spatial algebra in an integrated

More information

* * DFDL Introduction For Beginners. Lesson 2: DFDL Language Basics. DFDL and XML Schema

* * DFDL Introduction For Beginners. Lesson 2: DFDL Language Basics. DFDL and XML Schema DFDL Introduction For Beginners Lesson 2: DFDL Language Basics Version Author Date Change 1 S Hanson 2011-01-24 Created 2 S Hanson 2011-01-24 Updated 3 S Hanson 2011-03-30 Improved 4 S Hanson 2012-02-29

More information

CONIKS: Bringing Key Transparency to End Users

CONIKS: Bringing Key Transparency to End Users CONIKS: Bringing Key Transparency to End Users Morris Yau 1 Introduction Public keys must be distributed securely even in the presence of attackers. This is known as the Public Key Infrastructure problem

More information

Database System Concepts, 5 th Ed.! Silberschatz, Korth and Sudarshan See for conditions on re-use "

Database System Concepts, 5 th Ed.! Silberschatz, Korth and Sudarshan See   for conditions on re-use Database System Concepts, 5 th Ed.! Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use " Structure of Relational Databases! Fundamental Relational-Algebra-Operations! Additional

More information

extensible Markup Language

extensible Markup Language What is XML? The acronym means extensible Markup Language It is used to describe data in a way which is simple, structured and (usually) readable also by humans Developed at the end of the ninenties by

More information

Complexity. Out of the Tar Pit Moseley and Marks (2006) Complexity caused by state and control Close the loop - process

Complexity. Out of the Tar Pit Moseley and Marks (2006) Complexity caused by state and control Close the loop - process Rich Hickey What is Datomic? A new database Bringing data power into the application A sound model of information, with time Enabled by architectural and capacity advances Complexity Out of the Tar Pit

More information

Web Computing. Revision Notes

Web Computing. Revision Notes Web Computing Revision Notes Exam Format The format of the exam is standard: Answer TWO OUT OF THREE questions Candidates should answer ONLY TWO questions The time allowed is TWO hours Notes: You will

More information

RELATIONAL OPERATORS #1

RELATIONAL OPERATORS #1 RELATIONAL OPERATORS #1 CS 564- Spring 2018 ACKs: Jeff Naughton, Jignesh Patel, AnHai Doan WHAT IS THIS LECTURE ABOUT? Algorithms for relational operators: select project 2 ARCHITECTURE OF A DBMS query

More information

Clojure. A (not-so-pure) functional approach to concurrency. Paolo Baldan Linguaggi per il Global Computing AA 2016/2017

Clojure. A (not-so-pure) functional approach to concurrency. Paolo Baldan Linguaggi per il Global Computing AA 2016/2017 Clojure A (not-so-pure) functional approach to concurrency Paolo Baldan Linguaggi per il Global Computing AA 2016/2017 In the words of the inventor Functional programming (rooted in Lisp, from 60s old

More information

Python I. Some material adapted from Upenn cmpe391 slides and other sources

Python I. Some material adapted from Upenn cmpe391 slides and other sources Python I Some material adapted from Upenn cmpe391 slides and other sources Overview Names & Assignment Data types Sequences types: Lists, Tuples, and Strings Mutability Understanding Reference Semantics

More information

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML

Introduction Syntax and Usage XML Databases Java Tutorial XML. November 5, 2008 XML Introduction Syntax and Usage Databases Java Tutorial November 5, 2008 Introduction Syntax and Usage Databases Java Tutorial Outline 1 Introduction 2 Syntax and Usage Syntax Well Formed and Valid Displaying

More information

Complex type. This subset is enough to model the logical structure of all kinds of non-xml data.

Complex type. This subset is enough to model the logical structure of all kinds of non-xml data. DFDL Introduction For Beginners Lesson 2: DFDL language basics We have seen in lesson 1 how DFDL is not an entirely new language. Its foundation is XML Schema 1.0. Although XML Schema was created as a

More information

01 INTRODUCTION TO SEMANTIC WEB

01 INTRODUCTION TO SEMANTIC WEB SEMANTIC WEB 01 INTRODUCTION TO SEMANTIC WEB FROM WEB 1.0 TO WEB 3.0 IMRAN IHSAN ASSISTANT PROFESSOR, AIR UNIVERSITY, ISLAMABAD WWW.IMRANIHSAN.COM QUESTIONS What is the Semantic Web? Why do we want it?

More information

Framing how values are extracted from the data stream. Includes properties for alignment, length, and delimiters.

Framing how values are extracted from the data stream. Includes properties for alignment, length, and delimiters. DFDL Introduction For Beginners Lesson 3: DFDL properties Version Author Date Change 1 S Hanson 2011-01-24 Created 2 S Hanson 2011-03-30 Updated 3 S Hanson 2012-09-21 Corrections for errata 4 S Hanson

More information

Evaluation of Relational Operations: Other Techniques

Evaluation of Relational Operations: Other Techniques Evaluation of Relational Operations: Other Techniques Chapter 14, Part B Database Management Systems 3ed, R. Ramakrishnan and Johannes Gehrke 1 Using an Index for Selections Cost depends on #qualifying

More information

Oracle Utilities Opower Energy Efficiency Web Portal - Classic Single Sign-On

Oracle Utilities Opower Energy Efficiency Web Portal - Classic Single Sign-On Oracle Utilities Opower Energy Efficiency Web Portal - Classic Single Sign-On Configuration Guide E84772-01 Last Update: Monday, October 09, 2017 Oracle Utilities Opower Energy Efficiency Web Portal -

More information

Fall, 2005 CIS 550. Database and Information Systems Homework 5 Solutions

Fall, 2005 CIS 550. Database and Information Systems Homework 5 Solutions Fall, 2005 CIS 550 Database and Information Systems Homework 5 Solutions November 15, 2005; Due November 22, 2005 at 1:30 pm For this homework, you should test your answers using Galax., the same XQuery

More information

Overview of Query Evaluation. Chapter 12

Overview of Query Evaluation. Chapter 12 Overview of Query Evaluation Chapter 12 1 Outline Query Optimization Overview Algorithm for Relational Operations 2 Overview of Query Evaluation DBMS keeps descriptive data in system catalogs. SQL queries

More information

Framing how values are extracted from the data stream. Includes properties for alignment, length, and delimiters.

Framing how values are extracted from the data stream. Includes properties for alignment, length, and delimiters. DFDL Introduction For Beginners Lesson 3: DFDL properties In lesson 2 we learned that in the DFDL language, XML Schema conveys the basic structure of the data format being modeled, and DFDL properties

More information

Lecture 4, 04/08/2015. Scribed by Eric Lax, Andreas Santucci, Charles Zheng.

Lecture 4, 04/08/2015. Scribed by Eric Lax, Andreas Santucci, Charles Zheng. CME 323: Distributed Algorithms and Optimization, Spring 2015 http://stanford.edu/~rezab/dao. Instructor: Reza Zadeh, Databricks and Stanford. Lecture 4, 04/08/2015. Scribed by Eric Lax, Andreas Santucci,

More information

Implementing Relational Operators: Selection, Projection, Join. Database Management Systems, R. Ramakrishnan and J. Gehrke 1

Implementing Relational Operators: Selection, Projection, Join. Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Implementing Relational Operators: Selection, Projection, Join Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Readings [RG] Sec. 14.1-14.4 Database Management Systems, R. Ramakrishnan and

More information

+ Today. Lecture 26: Concurrency 3/31/14. n Reading. n Objectives. n Announcements. n P&C Section 7. n Race conditions.

+ Today. Lecture 26: Concurrency 3/31/14. n Reading. n Objectives. n Announcements. n P&C Section 7. n Race conditions. + Lecture 26: Concurrency Slides adapted from Dan Grossman + Today n Reading n P&C Section 7 n Objectives n Race conditions n Announcements n Quiz on Friday 1 + This week s programming assignment n Answer

More information

BBPS API SPECIFICATIONS

BBPS API SPECIFICATIONS BBPS API SPECIFICATIONS Version 12.0 Date: 07.02.2018 Abstract This document contains information pertaining to different APIs used in BBPS and some considerations which will be beneficial while designing

More information

Big Data 9. Data Models

Big Data 9. Data Models Ghislain Fourny Big Data 9. Data Models pinkyone / 123RF Stock Photo 1 Syntax vs. Data Models Physical view Syntax this is text. 2 Syntax vs. Data Models a Logical view

More information

NAMESPACES IN C++ You can refer the Programming with ANSI C++ by Bhushan Trivedi for Understanding Namespaces Better(Chapter 14)

NAMESPACES IN C++ You can refer the Programming with ANSI C++ by Bhushan Trivedi for Understanding Namespaces Better(Chapter 14) NAMESPACES IN C++ You can refer the Programming with ANSI C++ by Bhushan Trivedi for Understanding Namespaces Better(Chapter 14) Some Material for your reference: Consider following C++ program. // A program

More information

Cache Coherence and Atomic Operations in Hardware

Cache Coherence and Atomic Operations in Hardware Cache Coherence and Atomic Operations in Hardware Previously, we introduced multi-core parallelism. Today we ll look at 2 things: 1. Cache coherence 2. Instruction support for synchronization. And some

More information

NULLs & Outer Joins. Objectives of the Lecture :

NULLs & Outer Joins. Objectives of the Lecture : Slide 1 NULLs & Outer Joins Objectives of the Lecture : To consider the use of NULLs in SQL. To consider Outer Join Operations, and their implementation in SQL. Slide 2 Missing Values : Possible Strategies

More information

Identity, State and Values

Identity, State and Values Identity, State and Values Clojure s approach to concurrency Rich Hickey Agenda Functions and processes Identity, State, and Values Persistent Data Structures Clojure s Managed References Q&A Functions

More information

ClojureScript. as a compilation target to JS. Michiel Vijay FP AMS October 16th 2014

ClojureScript. as a compilation target to JS. Michiel Vijay FP AMS October 16th 2014 ClojureScript as a compilation target to JS Michiel Borkent @borkdude Vijay Kiran @vijaykiran FP AMS October 16th 2014 This work is licensed under a Creative Commons Attribution 4.0 International License.

More information

Invitation to a New Kind of Database. Sheer El Showk Cofounder, Lore Ai We re Hiring!

Invitation to a New Kind of Database. Sheer El Showk Cofounder, Lore Ai   We re Hiring! Invitation to a New Kind of Database Sheer El Showk Cofounder, Lore Ai www.lore.ai We re Hiring! Overview 1. Problem statement (~2 minute) 2. (Proprietary) Solution: Datomics (~10 minutes) 3. Proposed

More information

Data Structures in Functional Languages

Data Structures in Functional Languages Data Structures in Functional Languages Performance Better than log Binary trees provide lg n performance B-trees provide log t n performance Can the performance be better than that? High branching factor

More information

BUILDING DECLARATIVE GUIS WITH CLOJURE, JAVAFX AND FN-FX DR. NILS BLUM-OESTE

BUILDING DECLARATIVE GUIS WITH CLOJURE, JAVAFX AND FN-FX DR. NILS BLUM-OESTE BUILDING DECLARATIVE GUIS WITH CLOJURE, JAVAFX AND FN-FX DR. NILS BLUM-OESTE 08.02.2017 INTRODUCTION AND WHY? Reasons to build a desktop app with JavaFX WHY DO I NEED A SOLUTION FOR DESKTOP GUIS? Working

More information

A Metadata Framework for Scientific Data Integration. Li Jianhui Computer Network Information Center Chinese Academy of Sciences

A Metadata Framework for Scientific Data Integration. Li Jianhui Computer Network Information Center Chinese Academy of Sciences A Metadata Framework for Scientific Data Integration Li Jianhui Computer Network Information Center Chinese Academy of Sciences Outline SDB Background Metadata Requirements Analysis Issues Considered Framework

More information

CLIENT-SIDE XML SCHEMA VALIDATION

CLIENT-SIDE XML SCHEMA VALIDATION Factonomy Ltd The University of Edinburgh Aleksejs Goremikins Henry S. Thompson CLIENT-SIDE XML SCHEMA VALIDATION Edinburgh 2011 Motivation Key gap in the integration of XML into the global Web infrastructure

More information

Clojure. The Revenge of Data. by Vjeran Marcinko Kapsch CarrierCom

Clojure. The Revenge of Data. by Vjeran Marcinko Kapsch CarrierCom Clojure The Revenge of Data by Vjeran Marcinko Kapsch CarrierCom Data Processing is what we do Most programs receive, transform, search, and send data Data is raw, immutable information In its essence,

More information

Request for Comments: Tail-f Systems December Partial Lock Remote Procedure Call (RPC) for NETCONF

Request for Comments: Tail-f Systems December Partial Lock Remote Procedure Call (RPC) for NETCONF Network Working Group Request for Comments: 5717 Category: Standards Track B. Lengyel Ericsson M. Bjorklund Tail-f Systems December 2009 Partial Lock Remote Procedure Call (RPC) for NETCONF Abstract The

More information

The following is a sample XML code from the HCSProductCatalog.wsdl file.

The following is a sample XML code from the HCSProductCatalog.wsdl file. APPENDIXA This appendix contains sample WSDL and XSD files. It includes the following sections: HCSProductCatalog.wsdl File, page A-1 HCSProvision.xsd File, page A-27 HCSProvisionAsyncResponse.wsdl File,

More information

extensible Markup Language

extensible Markup Language What is XML? The acronym means extensible Markup Language It is used to describe data in a way which is simple, structured and (usually) readable also by humans Developed at the end of the ninenties by

More information

Internet Engineering Task Force (IETF) Request for Comments: March 2015

Internet Engineering Task Force (IETF) Request for Comments: March 2015 Internet Engineering Task Force (IETF) Request for Comments: 7463 Updates: 3261, 4235 Category: Standards Track ISSN: 2070-1721 A. Johnston, Ed. Avaya M. Soroushnejad, Ed. V. Venkataramanan Sylantro Systems

More information

POETRY OF PROGRAMMING CODE READING EXERCISES IN CLOJURE V

POETRY OF PROGRAMMING CODE READING EXERCISES IN CLOJURE V POETRY OF PROGRAMMING CODE READING EXERCISES IN CLOJURE V2018.6.6 Contents 1. Introduction 1 1.1. Why do we need to read code? 1 1.2. Instructions 2 1.3. Recommended method 2 2. Function composition first

More information

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201 Query Studio Training Guide Cognos 8 February 2010 DRAFT Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201 2 Table of Contents Accessing Cognos Query Studio... 5

More information

Scheme Extension: Chapter 2. bool:chop

Scheme Extension: Chapter 2. bool:chop Chapter 2. Scheme Extensions Topic: Ignore Scheme is a public domain programming language, based on the LISP language, that uses an interpreter to run commands. ACIS provides extensions (written in C++)

More information

Database Instance And Relational Schema Design A Fact Oriented Approach

Database Instance And Relational Schema Design A Fact Oriented Approach Database Instance And Relational Schema Design A Fact Oriented Approach File-oriented approaches create problems for organizations because of d) how master files maintain facts used by certain application

More information

Applied Unified Ownership. Capabilities for Sharing Across Threads

Applied Unified Ownership. Capabilities for Sharing Across Threads Applied Unified Ownership or Capabilities for Sharing Across Threads Elias Castegren Tobias Wrigstad DRF transfer parallel programming AppliedUnified Ownership memory management placement in pools (previous

More information

Sorting Algorithms. + Analysis of the Sorting Algorithms

Sorting Algorithms. + Analysis of the Sorting Algorithms Sorting Algorithms + Analysis of the Sorting Algorithms Insertion Sort What if first k elements of array are already sorted? 4, 7, 12, 5, 19, 16 We can shift the tail of the sorted elements list down and

More information

Web Science & Technologies University of Koblenz Landau, Germany RDF. Steffen Staab. Semantic Web

Web Science & Technologies University of Koblenz Landau, Germany RDF. Steffen Staab. Semantic Web Web Science & Technologies University of Koblenz Landau, Germany RDF RDF Model Resources (Subject, Object) connected by Predicates (relationships) Subject predicate Object 2 RDF model Resources A resource

More information

Declarative concurrency. March 3, 2014

Declarative concurrency. March 3, 2014 March 3, 2014 (DP) what is declarativeness lists, trees iterative comutation recursive computation (DC) DP and DC in Haskell and other languages 2 / 32 Some quotes What is declarativeness? ness is important

More information

:38:00 1 / 14

:38:00 1 / 14 In this course you will be using XML Editor version 12.3 (oxygen for short from now on) for XML related work. The work includes writing XML Schema files with corresponding XML files, writing

More information

CS /29/18. Paul Krzyzanowski 1. Question 1 (Bigtable) Distributed Systems 2018 Pre-exam 3 review Selected questions from past exams

CS /29/18. Paul Krzyzanowski 1. Question 1 (Bigtable) Distributed Systems 2018 Pre-exam 3 review Selected questions from past exams Question 1 (Bigtable) What is an SSTable in Bigtable? Distributed Systems 2018 Pre-exam 3 review Selected questions from past exams It is the internal file format used to store Bigtable data. It maps keys

More information

ActiveVOS Fundamentals

ActiveVOS Fundamentals Lab #12 Page 1 of 9 - ActiveVOS Fundamentals ActiveVOS Fundamentals Lab #12 Adding a People Activity to the Process Lab #12 Page 2 of 9 - ActiveVOS Fundamentals Lab Plan In this lab we will add a Human

More information

The Curious Clojureist

The Curious Clojureist The Curious Clojureist NEAL FORD director / software architect meme wrangler ThoughtWorks nford@thoughtworks.com 2002 Summit Boulevard, Atlanta, GA 30319 nealford.com thoughtworks.com memeagora.blogspot.com

More information

Notes. Any feedback/suggestions? IS 651: Distributed Systems

Notes. Any feedback/suggestions? IS 651: Distributed Systems Notes Grading statistics Midterm1: average 10.60 out of 15 with stdev 2.22 Total: average 15.46 out of 21 with stdev 2.80 A range: [18.26, 23] B range: [12.66, 18.26) C or worse range: [0, 12.66) The curve

More information

Distributed Systems Pre-exam 3 review Selected questions from past exams. David Domingo Paul Krzyzanowski Rutgers University Fall 2018

Distributed Systems Pre-exam 3 review Selected questions from past exams. David Domingo Paul Krzyzanowski Rutgers University Fall 2018 Distributed Systems 2018 Pre-exam 3 review Selected questions from past exams David Domingo Paul Krzyzanowski Rutgers University Fall 2018 November 28, 2018 1 Question 1 (Bigtable) What is an SSTable in

More information

Database System Concepts

Database System Concepts s Slides (fortemente) baseados nos slides oficiais do livro c Silberschatz, Korth and Sudarshan. Chapter 2: Model Departamento de Engenharia Informática Instituto Superior Técnico 1 st Semester 2009/2010

More information

The second section will give example T- SQL and Queries to:

The second section will give example T- SQL and Queries to: Overview This document will explain the key SalesJunction.com table relations. The following tables will be explained: CRDACCOUNT CRDCONT ACT CRDOPP CRDCASE CRDACTIVITIES CRDNOTE User Defined fields are

More information

Computer Science 425 Fall 2006 Second Take-home Exam Out: 2:50PM Wednesday Dec. 6, 2006 Due: 5:00PM SHARP Friday Dec. 8, 2006

Computer Science 425 Fall 2006 Second Take-home Exam Out: 2:50PM Wednesday Dec. 6, 2006 Due: 5:00PM SHARP Friday Dec. 8, 2006 Computer Science 425 Fall 2006 Second Take-home Exam Out: 2:50PM Wednesday Dec. 6, 2006 Due: 5:00PM SHARP Friday Dec. 8, 2006 Instructions: This exam must be entirely your own work. Do not consult with

More information

CSE 544 Principles of Database Management Systems

CSE 544 Principles of Database Management Systems CSE 544 Principles of Database Management Systems Alvin Cheung Fall 2015 Lecture 6 Lifecycle of a Query Plan 1 Announcements HW1 is due Thursday Projects proposals are due on Wednesday Office hour canceled

More information

Table Basics. The structure of an table

Table Basics. The structure of an table TABLE -FRAMESET Table Basics A table is a grid of rows and columns that intersect to form cells. Two different types of cells exist: Table cell that contains data, is created with the A cell that

More information

Michiel DomCode, May 26th 2015

Michiel DomCode, May 26th 2015 ClojureScript ReactJS Michiel Borkent @borkdude DomCode, May 26th 2015 Michiel Borkent (@borkdude) Clojure(Script) developer at Clojure since 2009 Former lecturer, taught Clojure Agenda Part 1: ClojureScript

More information

Page 1. Goals for Today" What is a Database " Key Concept: Structured Data" CS162 Operating Systems and Systems Programming Lecture 13.

Page 1. Goals for Today What is a Database  Key Concept: Structured Data CS162 Operating Systems and Systems Programming Lecture 13. Goals for Today" CS162 Operating Systems and Systems Programming Lecture 13 Transactions" What is a database? Transactions Conflict serializability October 12, 2011 Anthony D. Joseph and Ion Stoica http://inst.eecs.berkeley.edu/~cs162

More information

CMSC424: Database Design. Instructor: Amol Deshpande

CMSC424: Database Design. Instructor: Amol Deshpande CMSC424: Database Design Instructor: Amol Deshpande amol@cs.umd.edu Databases Data Models Conceptual representa1on of the data Data Retrieval How to ask ques1ons of the database How to answer those ques1ons

More information

Bloom: Big Systems, Small Programs. Neil Conway UC Berkeley

Bloom: Big Systems, Small Programs. Neil Conway UC Berkeley Bloom: Big Systems, Small Programs Neil Conway UC Berkeley Distributed Computing Programming Languages Data prefetching Register allocation Loop unrolling Function inlining Optimization Global coordination,

More information

Multi-core Parallelization in Clojure - a Case Study

Multi-core Parallelization in Clojure - a Case Study Multi-core Parallelization in Clojure - a Case Study Johann M. Kraus and Hans A. Kestler AG Bioinformatics and Systems Biology Institute of Neural Information Processing University of Ulm 29.06.2009 Outline

More information

Webgurukul Programming Language Course

Webgurukul Programming Language Course Webgurukul Programming Language Course Take One step towards IT profession with us Python Syllabus Python Training Overview > What are the Python Course Pre-requisites > Objectives of the Course > Who

More information

XEP-0357: Push Notifications

XEP-0357: Push Notifications XEP-0357: Push Notifications Kevin Smith mailto:kevin@kismith.co.uk xmpp:kevin@doomsong.co.uk Lance Stout mailto:lance@andyet.com xmpp:lance@lance.im 2017-08-24 Version 0.3 Status Type Short Name Experimental

More information

Lecture 7: Data Abstractions

Lecture 7: Data Abstractions Lecture 7: Data Abstractions Abstract Data Types Data Abstractions How to define them Implementation issues Abstraction functions and invariants Adequacy (and some requirements analysis) Towards Object

More information

[MS-TMPLDISC]: Template Discovery Web Service Protocol. Intellectual Property Rights Notice for Open Specifications Documentation

[MS-TMPLDISC]: Template Discovery Web Service Protocol. Intellectual Property Rights Notice for Open Specifications Documentation [MS-TMPLDISC]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,

More information

BEAWebLogic. Integration. Transforming Data Using XQuery Mapper

BEAWebLogic. Integration. Transforming Data Using XQuery Mapper BEAWebLogic Integration Transforming Data Using XQuery Mapper Version: 10.2 Document Revised: March 2008 Contents Introduction Overview of XQuery Mapper.............................................. 1-1

More information