SlideShare une entreprise Scribd logo
1  sur  20
Copyright © 2016, Creative Arts & Technologies and others. All rights reserved.
Physikal – JSR 363 and
Kotlin for Clean Energy
Werner Keil
JSR 363 Maintenance Lead
@wernerkeil
October 18, 2017
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
Agenda
1. Introduction
2. Tenkiv Nexus
3. JSR 363
4. Physikal
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
Who am I?
Werner Keil
• Consultant – Coach
• Creative Cosmopolitan
• Open Source Evangelist
• Software Architect
• Spec Lead – JSR363
• Individual JCP Executive Committee Member
[www.linkedin.com/in/catmedia]
Twitter @wernerkeil
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
Save Water
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
Water Crisis
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
The Globe
2.5 billion people across the globe
lack access to clean water.
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
Developing Nations
In places like Afghanistan,
lack of access to water sanitation leads to a
1 in 5 child mortality rate.
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
California
98% of California is experiencing
severe drought, placing major stress
on our water infrastructure.
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
What is Tenkiv Nexus?
The Tenkiv Nexus is a fully modular renewable energy system. It uses heat
from the sun in order to power anything for 1/13th the cost of existing solar
panels and 1/5th the cost of fossil fuels without any subsidies. It’s the
breakthrough the world’s been waiting for that finally enables us to truly
utilize the most abundant source of power available on earth: the sun.
Tenkiv started deployment of the Tenkiv Nexus for water purification, but
over time will replace more and more of the world's dying energy
infrastructure with this new, more powerful, cost-effective, and completely
clean energy nexus.
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
Tenkiv Nexus
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
What is JSR-363?
5,999 miles
A Quantity
A Unit
Brussels
São Paulo
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
Why do we need JSR-363?
There are no specifications or standards for handling units in Java.
The current solution is to use primitives, that don’t provide any Type
Safety.
The errors are difficult to find using unit testing:
Interface and Internationalization (e.g. radian/degree, meters/feet);
Arithmetic operations (e.g. overflow);
Conversion between units (e.g. from same domain);
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
5,999 miles
A Quantity
A Unit
What is the problem, in code?
int distance = 5999; //in miles
float speed = airplane.getSpeed(); //in km/h
System.out.println(“ETA: “ + (distance/speed) + “ h”);
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
What is JSR-363, in code?
Quantity<Length> distance = Quantities.getQuantity(5999,
US.MILE);
Quantity<Speed> airplaneSpeed = getAirplaneSpeed();
Quantity<Time> eta =
(Quantity<Time>)distance.divide(airplaneSpeed);
System.out.println(“ETA: “ + eta.to(Units.HOUR));
ETA: 10.216345960256564 h
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
What is Physikal?
Library providing Kotlin extensions and ease of use functions for Java
Units of Measurement libraries based on JSR-363.
Contains
• Core - Basic Metric units.
• SI-Units - SI units.
• Complete-Units - All units including US or Imperial.
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
What is Physikal, in code?
Create Units
val added = 10.metre + 1.kilo.metre
>> 1010.0 m
val small = 10.metre
val large = 10.kilo.metre
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
What is Physikal, in more code?
Includes all operators
val added = 10.metre + 1.kilo.metre
>> 1010.0 m
val speed = added/10.minute
>> 101 m/min
var aFewSeconds = 5.second
aFewSeconds++
>> 6.0 s
10.peta.watt > 2.watt
>> true
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
What is Physikal, in more code?
Using different units (SI units & other units)
5.gram + 2.pound
>> 912.18474 g
(13.kilo.gram + 20.pound) convertTo STONE
>> 3.47572100600243466674378 st
© 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI
Links
Public JSR-363 mailing list(s) and/or forum(s)
Units-Dev on Google Groups
Units-Users on Google Groups
JSR-363 page: https://jcp.org/en/jsr/detail?id=363…
Project Website: http://unitsofmeasurement.github.io on GitHub
Tenkiv: https://tenkiv.com
Physikal: https://github.com/Tenkiv/Physikal
@YourTwitterHandle#DVXFR14{session hashtag} © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI

Contenu connexe

Tendances

Public Lecture Presentation Slides (4.5.2013)
Public Lecture Presentation Slides (4.5.2013)Public Lecture Presentation Slides (4.5.2013)
Public Lecture Presentation Slides (4.5.2013)
Institute of Contemporary Asian Studies (ICAS) at TUJ
 
DCSF 19 Towards Reproducable Climate Research
DCSF 19 Towards Reproducable Climate ResearchDCSF 19 Towards Reproducable Climate Research
DCSF 19 Towards Reproducable Climate Research
Docker, Inc.
 

Tendances (18)

Status of Geothermal Development in Latin America & Caribbean
Status of Geothermal Development in Latin America & CaribbeanStatus of Geothermal Development in Latin America & Caribbean
Status of Geothermal Development in Latin America & Caribbean
 
Hydrodynamic Simulations and Time-dependent Photoionization Modeling of Starb...
Hydrodynamic Simulations and Time-dependent Photoionization Modeling of Starb...Hydrodynamic Simulations and Time-dependent Photoionization Modeling of Starb...
Hydrodynamic Simulations and Time-dependent Photoionization Modeling of Starb...
 
nuclear power plant
nuclear power plantnuclear power plant
nuclear power plant
 
Introduction of Post-K development
Introduction of Post-K development	Introduction of Post-K development
Introduction of Post-K development
 
Keynote presentation at GEORG Geothermal Workshop, Nov. 24, 2016
Keynote presentation at GEORG Geothermal Workshop, Nov. 24, 2016Keynote presentation at GEORG Geothermal Workshop, Nov. 24, 2016
Keynote presentation at GEORG Geothermal Workshop, Nov. 24, 2016
 
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
How JSR 385 could have Saved the Mars Climate Orbiter - JFokus 2020
 
Non-equilibrium Photoionization and Hydrodynamic Simulations of Starburst-dri...
Non-equilibrium Photoionization and Hydrodynamic Simulations of Starburst-dri...Non-equilibrium Photoionization and Hydrodynamic Simulations of Starburst-dri...
Non-equilibrium Photoionization and Hydrodynamic Simulations of Starburst-dri...
 
Rob Best - Decision Support for Integrated Urban Infrastructure Planning
Rob Best - Decision Support for Integrated Urban Infrastructure PlanningRob Best - Decision Support for Integrated Urban Infrastructure Planning
Rob Best - Decision Support for Integrated Urban Infrastructure Planning
 
Carl Zeiss
Carl ZeissCarl Zeiss
Carl Zeiss
 
Clean Sky Projects on the More Electric Aircraft
Clean Sky Projects on the More Electric AircraftClean Sky Projects on the More Electric Aircraft
Clean Sky Projects on the More Electric Aircraft
 
Phillips Ch10 Ppt 1
Phillips Ch10 Ppt 1Phillips Ch10 Ppt 1
Phillips Ch10 Ppt 1
 
IRJET - A Review on Gravity based Power Generation System
IRJET - A Review on Gravity based Power Generation SystemIRJET - A Review on Gravity based Power Generation System
IRJET - A Review on Gravity based Power Generation System
 
Genome-scale Big Data Pipelines
Genome-scale Big Data PipelinesGenome-scale Big Data Pipelines
Genome-scale Big Data Pipelines
 
VariantSpark - a Spark library for genomics
VariantSpark - a Spark library for genomicsVariantSpark - a Spark library for genomics
VariantSpark - a Spark library for genomics
 
Near realtime wildfire simulation using big data platforms
Near realtime wildfire simulation using big data platformsNear realtime wildfire simulation using big data platforms
Near realtime wildfire simulation using big data platforms
 
Public Lecture Presentation Slides (4.5.2013)
Public Lecture Presentation Slides (4.5.2013)Public Lecture Presentation Slides (4.5.2013)
Public Lecture Presentation Slides (4.5.2013)
 
01 groundwork clean-powerresearch_sandia_2017-05-09
01 groundwork clean-powerresearch_sandia_2017-05-0901 groundwork clean-powerresearch_sandia_2017-05-09
01 groundwork clean-powerresearch_sandia_2017-05-09
 
DCSF 19 Towards Reproducable Climate Research
DCSF 19 Towards Reproducable Climate ResearchDCSF 19 Towards Reproducable Climate Research
DCSF 19 Towards Reproducable Climate Research
 

Similaire à Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017

Scientific Software: Sustainability, Skills & Sociology
Scientific Software: Sustainability, Skills & SociologyScientific Software: Sustainability, Skills & Sociology
Scientific Software: Sustainability, Skills & Sociology
Neil Chue Hong
 
JSR 363 - The Answer to Life Science and the Internet of Everything
JSR 363 - The Answer to Life Science and the Internet of EverythingJSR 363 - The Answer to Life Science and the Internet of Everything
JSR 363 - The Answer to Life Science and the Internet of Everything
Werner Keil
 
NASA Advanced Computing Environment for Science & Engineering
NASA Advanced Computing Environment for Science & EngineeringNASA Advanced Computing Environment for Science & Engineering
NASA Advanced Computing Environment for Science & Engineering
inside-BigData.com
 
IGBC2014 - Stephen Selkowitz, Lawrence Berkeley National Laboratory
IGBC2014 - Stephen Selkowitz, Lawrence Berkeley National LaboratoryIGBC2014 - Stephen Selkowitz, Lawrence Berkeley National Laboratory
IGBC2014 - Stephen Selkowitz, Lawrence Berkeley National Laboratory
International Green Building Conference (IGBC)
 

Similaire à Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017 (20)

Physikal - Using Kotlin for Clean Energy - KUG Munich
Physikal - Using Kotlin for Clean Energy - KUG MunichPhysikal - Using Kotlin for Clean Energy - KUG Munich
Physikal - Using Kotlin for Clean Energy - KUG Munich
 
HPC Cluster Computing from 64 to 156,000 Cores 
HPC Cluster Computing from 64 to 156,000 Cores HPC Cluster Computing from 64 to 156,000 Cores 
HPC Cluster Computing from 64 to 156,000 Cores 
 
Cycle Computing Record-breaking Petascale HPC Run
Cycle Computing Record-breaking Petascale HPC RunCycle Computing Record-breaking Petascale HPC Run
Cycle Computing Record-breaking Petascale HPC Run
 
Scientific Software: Sustainability, Skills & Sociology
Scientific Software: Sustainability, Skills & SociologyScientific Software: Sustainability, Skills & Sociology
Scientific Software: Sustainability, Skills & Sociology
 
The First IoT JSR: Units of Measurement - DevoXX BE 2015
The First IoT JSR: Units of Measurement - DevoXX BE 2015The First IoT JSR: Units of Measurement - DevoXX BE 2015
The First IoT JSR: Units of Measurement - DevoXX BE 2015
 
Agile Systems Engineering & Agile at SKA Scale
Agile Systems Engineering & Agile at SKA ScaleAgile Systems Engineering & Agile at SKA Scale
Agile Systems Engineering & Agile at SKA Scale
 
The Salmon Algorithm Spawning with Kubernetes
The Salmon Algorithm Spawning with KubernetesThe Salmon Algorithm Spawning with Kubernetes
The Salmon Algorithm Spawning with Kubernetes
 
Panel: Building the NRP Ecosystem with the Regional Networks on their Campuses;
Panel: Building the NRP Ecosystem with the Regional Networks on their Campuses;Panel: Building the NRP Ecosystem with the Regional Networks on their Campuses;
Panel: Building the NRP Ecosystem with the Regional Networks on their Campuses;
 
Scilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the CommunityScilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the Community
 
JSR 363 - The Answer to Life Science and the Internet of Everything
JSR 363 - The Answer to Life Science and the Internet of EverythingJSR 363 - The Answer to Life Science and the Internet of Everything
JSR 363 - The Answer to Life Science and the Internet of Everything
 
NASA Advanced Computing Environment for Science & Engineering
NASA Advanced Computing Environment for Science & EngineeringNASA Advanced Computing Environment for Science & Engineering
NASA Advanced Computing Environment for Science & Engineering
 
The ECP Exascale Computing Project
The ECP Exascale Computing ProjectThe ECP Exascale Computing Project
The ECP Exascale Computing Project
 
Cse new graduate_students2011
Cse new graduate_students2011Cse new graduate_students2011
Cse new graduate_students2011
 
Accelerating Time to Science: Transforming Research in the Cloud
Accelerating Time to Science: Transforming Research in the CloudAccelerating Time to Science: Transforming Research in the Cloud
Accelerating Time to Science: Transforming Research in the Cloud
 
Valencia EMEA Java User Group Summit
Valencia EMEA Java User Group SummitValencia EMEA Java User Group Summit
Valencia EMEA Java User Group Summit
 
Structural Biology in the Clouds: A Success Story of 10 years
Structural Biology in the Clouds: A Success Story of 10 yearsStructural Biology in the Clouds: A Success Story of 10 years
Structural Biology in the Clouds: A Success Story of 10 years
 
IGBC2014 - Stephen Selkowitz, Lawrence Berkeley National Laboratory
IGBC2014 - Stephen Selkowitz, Lawrence Berkeley National LaboratoryIGBC2014 - Stephen Selkowitz, Lawrence Berkeley National Laboratory
IGBC2014 - Stephen Selkowitz, Lawrence Berkeley National Laboratory
 
Frank Würthwein - NRP and the Path forward
Frank Würthwein - NRP and the Path forwardFrank Würthwein - NRP and the Path forward
Frank Würthwein - NRP and the Path forward
 
Available HPC resources at CSUC
Available HPC resources at CSUCAvailable HPC resources at CSUC
Available HPC resources at CSUC
 
Software Sustainability: Better Software Better Science
Software Sustainability: Better Software Better ScienceSoftware Sustainability: Better Software Better Science
Software Sustainability: Better Software Better Science
 

Plus de Werner Keil

Plus de Werner Keil (20)

Securing eHealth, eGovernment and eBanking with Java - DWX '21
Securing eHealth, eGovernment and eBanking with Java - DWX '21Securing eHealth, eGovernment and eBanking with Java - DWX '21
Securing eHealth, eGovernment and eBanking with Java - DWX '21
 
OpenDDR and Jakarta MVC - JavaLand 2021
OpenDDR and Jakarta MVC - JavaLand 2021OpenDDR and Jakarta MVC - JavaLand 2021
OpenDDR and Jakarta MVC - JavaLand 2021
 
How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021
How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021
How JSR 385 could have Saved the Mars Climate Orbiter - Zurich IoT Day 2021
 
OpenDDR and Jakarta MVC - Java2Days 2020 Virtual
OpenDDR and Jakarta MVC - Java2Days 2020 VirtualOpenDDR and Jakarta MVC - Java2Days 2020 Virtual
OpenDDR and Jakarta MVC - Java2Days 2020 Virtual
 
NoSQL Endgame - Java2Days 2020 Virtual
NoSQL Endgame - Java2Days 2020 VirtualNoSQL Endgame - Java2Days 2020 Virtual
NoSQL Endgame - Java2Days 2020 Virtual
 
JCON 2020: Mobile Java Web Applications with MVC and OpenDDR
JCON 2020: Mobile Java Web Applications with MVC and OpenDDRJCON 2020: Mobile Java Web Applications with MVC and OpenDDR
JCON 2020: Mobile Java Web Applications with MVC and OpenDDR
 
Money, Money, Money, can be funny with JSR 354 (Devoxx BE)
Money, Money, Money, can be funny with JSR 354 (Devoxx BE)Money, Money, Money, can be funny with JSR 354 (Devoxx BE)
Money, Money, Money, can be funny with JSR 354 (Devoxx BE)
 
Money, Money, Money, can be funny with JSR 354 (DWX 2019)
Money, Money, Money, can be funny with JSR 354 (DWX 2019)Money, Money, Money, can be funny with JSR 354 (DWX 2019)
Money, Money, Money, can be funny with JSR 354 (DWX 2019)
 
NoSQL: The first New Jakarta EE Specification (DWX 2019)
NoSQL: The first New Jakarta EE Specification (DWX 2019)NoSQL: The first New Jakarta EE Specification (DWX 2019)
NoSQL: The first New Jakarta EE Specification (DWX 2019)
 
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR DayHow JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
How JSR 385 could have Saved the Mars Climate Orbiter - Adopt-a-JSR Day
 
JNoSQL: The Definitive Solution for Java and NoSQL Databases
JNoSQL: The Definitive Solution for Java and NoSQL DatabasesJNoSQL: The Definitive Solution for Java and NoSQL Databases
JNoSQL: The Definitive Solution for Java and NoSQL Databases
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Databases
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL DatabasesEclipse JNoSQL: The Definitive Solution for Java and NoSQL Databases
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Databases
 
Performance Monitoring for the Cloud - Java2Days 2017
Performance Monitoring for the Cloud - Java2Days 2017Performance Monitoring for the Cloud - Java2Days 2017
Performance Monitoring for the Cloud - Java2Days 2017
 
Java2Days - Security for JavaEE and the Cloud
Java2Days - Security for JavaEE and the CloudJava2Days - Security for JavaEE and the Cloud
Java2Days - Security for JavaEE and the Cloud
 
Apache DeviceMap - Web-Dev-BBQ Stuttgart
Apache DeviceMap - Web-Dev-BBQ StuttgartApache DeviceMap - Web-Dev-BBQ Stuttgart
Apache DeviceMap - Web-Dev-BBQ Stuttgart
 
The First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
The First IoT JSR: Units of Measurement - JUG Berlin-BrandenburgThe First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
The First IoT JSR: Units of Measurement - JUG Berlin-Brandenburg
 
JSR 354: Money and Currency API - Short Overview
JSR 354: Money and Currency API - Short OverviewJSR 354: Money and Currency API - Short Overview
JSR 354: Money and Currency API - Short Overview
 
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit AgoravaJavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
 
Enterprise 2.0 with Open Source Frameworks like Agorava
Enterprise 2.0 with Open Source Frameworks like AgoravaEnterprise 2.0 with Open Source Frameworks like Agorava
Enterprise 2.0 with Open Source Frameworks like Agorava
 
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

Physikal - JSR 363 and Kotlin for Clean Energy - Java2Days 2017

  • 1. Copyright © 2016, Creative Arts & Technologies and others. All rights reserved. Physikal – JSR 363 and Kotlin for Clean Energy Werner Keil JSR 363 Maintenance Lead @wernerkeil October 18, 2017
  • 2. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI Agenda 1. Introduction 2. Tenkiv Nexus 3. JSR 363 4. Physikal
  • 3. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI Who am I? Werner Keil • Consultant – Coach • Creative Cosmopolitan • Open Source Evangelist • Software Architect • Spec Lead – JSR363 • Individual JCP Executive Committee Member [www.linkedin.com/in/catmedia] Twitter @wernerkeil
  • 4. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI Save Water
  • 5. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI Water Crisis
  • 6. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI The Globe 2.5 billion people across the globe lack access to clean water.
  • 7. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI Developing Nations In places like Afghanistan, lack of access to water sanitation leads to a 1 in 5 child mortality rate.
  • 8. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI California 98% of California is experiencing severe drought, placing major stress on our water infrastructure.
  • 9. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI What is Tenkiv Nexus? The Tenkiv Nexus is a fully modular renewable energy system. It uses heat from the sun in order to power anything for 1/13th the cost of existing solar panels and 1/5th the cost of fossil fuels without any subsidies. It’s the breakthrough the world’s been waiting for that finally enables us to truly utilize the most abundant source of power available on earth: the sun. Tenkiv started deployment of the Tenkiv Nexus for water purification, but over time will replace more and more of the world's dying energy infrastructure with this new, more powerful, cost-effective, and completely clean energy nexus.
  • 10. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI Tenkiv Nexus
  • 11. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI What is JSR-363? 5,999 miles A Quantity A Unit Brussels São Paulo
  • 12. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI Why do we need JSR-363? There are no specifications or standards for handling units in Java. The current solution is to use primitives, that don’t provide any Type Safety. The errors are difficult to find using unit testing: Interface and Internationalization (e.g. radian/degree, meters/feet); Arithmetic operations (e.g. overflow); Conversion between units (e.g. from same domain);
  • 13. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI 5,999 miles A Quantity A Unit What is the problem, in code? int distance = 5999; //in miles float speed = airplane.getSpeed(); //in km/h System.out.println(“ETA: “ + (distance/speed) + “ h”);
  • 14. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI What is JSR-363, in code? Quantity<Length> distance = Quantities.getQuantity(5999, US.MILE); Quantity<Speed> airplaneSpeed = getAirplaneSpeed(); Quantity<Time> eta = (Quantity<Time>)distance.divide(airplaneSpeed); System.out.println(“ETA: “ + eta.to(Units.HOUR)); ETA: 10.216345960256564 h
  • 15. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI What is Physikal? Library providing Kotlin extensions and ease of use functions for Java Units of Measurement libraries based on JSR-363. Contains • Core - Basic Metric units. • SI-Units - SI units. • Complete-Units - All units including US or Imperial.
  • 16. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI What is Physikal, in code? Create Units val added = 10.metre + 1.kilo.metre >> 1010.0 m val small = 10.metre val large = 10.kilo.metre
  • 17. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI What is Physikal, in more code? Includes all operators val added = 10.metre + 1.kilo.metre >> 1010.0 m val speed = added/10.minute >> 101 m/min var aFewSeconds = 5.second aFewSeconds++ >> 6.0 s 10.peta.watt > 2.watt >> true
  • 18. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI What is Physikal, in more code? Using different units (SI units & other units) 5.gram + 2.pound >> 912.18474 g (13.kilo.gram + 20.pound) convertTo STONE >> 3.47572100600243466674378 st
  • 19. © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI Links Public JSR-363 mailing list(s) and/or forum(s) Units-Dev on Google Groups Units-Users on Google Groups JSR-363 page: https://jcp.org/en/jsr/detail?id=363… Project Website: http://unitsofmeasurement.github.io on GitHub Tenkiv: https://tenkiv.com Physikal: https://github.com/Tenkiv/Physikal
  • 20. @YourTwitterHandle#DVXFR14{session hashtag} © 2017 Creative Arts & Technologies and others. All rights reserved.#Physikal @UnitAPI