SlideShare a Scribd company logo
What Is JSON-FP
Ben Lue @ COIMOTION
What Is JSON-FP
Programs are expressed as
JSON objects in a functional
programming style.
Ok. That sounds like something
serious, but what does that
really mean?
Introducing JSON-FP
• JSON-FP uses JSON objects to
describe a computer program.
• If you send a JSON object to JSON-
FP to run, you could get a very
different object in return.
Let’s Start With Something Simple
var expr = {add: 1} ;
jsonfp.apply(1, expr);
var expr = {add: 1} ;
jsonfp.apply(1, expr);
That’s the same as saying 1 + 1
1  {add: 1} === (1 + 1)
Now you know a JSON-FP
expression is as simple as:
{op: option}
Ex: {add: 1}
JSON-FP allows you to replace
‘option’ with another JSON-FP
expression.
That makes things…
interesting.
Changing
{add: 1}
to
{add: {‘<‘: 10}}
The program changes to:
‘If the input is smaller than 10,
add 1 to it.’
Another Example
_.map(list, function(page) {
return _.pick(page, ‘title’);
});
The above code uses
underscore/lodash to remove all
but the ‘title’ property from a list
of pages.
If Done By JSON-FP…
_.map(list, function(page) {
return _.pick(page, ‘title’);
});
vs
{map: {pick: ‘title’}}
So you may notice the JSON-FP
expression can be very concise
and it can help developers to
focus on the problem they want
to solve.
But that’s not the whole point…
Properties/features of JSON-FP:
• Map/Reduce in the
distributed environments.
• Functional programming
• Homoiconic /
metaprogramming
Map/reduce, functional
programming and homoiconic…
Those are too heavy stuff for
this introduction. We’ll cover
them in the coming slides.
But we can talk a little about
map/reduce…
If your application has to query
data repositories in a
heterogeneous environment,
hadoop/spark is NOT a good fit.
Try JSON-FP, life will be much
easier.
Any real world applications?
Well, JSON-FP is less than a month
old. Interesting applications are
coming…
For now, you can check out newsql
(https://github.com/benlue/newsql)
which uses JSON-FP to query
objects.
Our next generation API services
uses JSON-FP, too.
That’s it for now.
For more JSON-FP examples, check
out:
https://github.com/benlue/jsonfp-examples
The JSON-FP is open sourced at
github:
https://github.com/benlue/jsonfp

More Related Content

Viewers also liked

SharePoint Saturday New Hampsire
SharePoint Saturday New HampsireSharePoint Saturday New Hampsire
SharePoint Saturday New Hampsire
Luc Labelle
 
Tudu gem
Tudu gemTudu gem
Tudu gem
tbpgr
 
Debutante cotillion’s tea ppt
Debutante cotillion’s tea pptDebutante cotillion’s tea ppt
Debutante cotillion’s tea pptSyreezy Maurice
 
Assessment in partnership pedagogy
Assessment in partnership pedagogyAssessment in partnership pedagogy
Assessment in partnership pedagogy
Juhi_Misra
 
Unleash the real value of your corporate data with power bi luc labelle
Unleash the real value of your corporate data with power bi   luc labelleUnleash the real value of your corporate data with power bi   luc labelle
Unleash the real value of your corporate data with power bi luc labelle
Luc Labelle
 
gaunxi ties that bind by Peer aakif
gaunxi ties that bind by Peer aakifgaunxi ties that bind by Peer aakif
gaunxi ties that bind by Peer aakifpeeraakif
 
La conference Video
La conference VideoLa conference Video
La conference Video
sumitra22
 
bang chu cai tieng nhat
bang chu cai tieng nhatbang chu cai tieng nhat
bang chu cai tieng nhat
khucxuanvuong-hut
 
Presentation7
Presentation7Presentation7
Presentation7Eng Wageh
 
Montes de Toledo
Montes de ToledoMontes de Toledo
Montes de Toledo
mjuanalcaide
 
Top10 Trends 2015 - GelecekHane
Top10 Trends 2015 - GelecekHaneTop10 Trends 2015 - GelecekHane
Top10 Trends 2015 - GelecekHane
Gelecek Hane
 
PUSAT GROSIR SOLO
PUSAT GROSIR SOLOPUSAT GROSIR SOLO
PUSAT GROSIR SOLO
Afifatullatifah
 
Smoking is injurious to health
Smoking is injurious to healthSmoking is injurious to health
Smoking is injurious to healthMohammed Suhail
 

Viewers also liked (14)

SharePoint Saturday New Hampsire
SharePoint Saturday New HampsireSharePoint Saturday New Hampsire
SharePoint Saturday New Hampsire
 
Tudu gem
Tudu gemTudu gem
Tudu gem
 
Debutante cotillion’s tea ppt
Debutante cotillion’s tea pptDebutante cotillion’s tea ppt
Debutante cotillion’s tea ppt
 
Assessment in partnership pedagogy
Assessment in partnership pedagogyAssessment in partnership pedagogy
Assessment in partnership pedagogy
 
Unleash the real value of your corporate data with power bi luc labelle
Unleash the real value of your corporate data with power bi   luc labelleUnleash the real value of your corporate data with power bi   luc labelle
Unleash the real value of your corporate data with power bi luc labelle
 
gaunxi ties that bind by Peer aakif
gaunxi ties that bind by Peer aakifgaunxi ties that bind by Peer aakif
gaunxi ties that bind by Peer aakif
 
La conference Video
La conference VideoLa conference Video
La conference Video
 
bang chu cai tieng nhat
bang chu cai tieng nhatbang chu cai tieng nhat
bang chu cai tieng nhat
 
SM_PPT_Example
SM_PPT_ExampleSM_PPT_Example
SM_PPT_Example
 
Presentation7
Presentation7Presentation7
Presentation7
 
Montes de Toledo
Montes de ToledoMontes de Toledo
Montes de Toledo
 
Top10 Trends 2015 - GelecekHane
Top10 Trends 2015 - GelecekHaneTop10 Trends 2015 - GelecekHane
Top10 Trends 2015 - GelecekHane
 
PUSAT GROSIR SOLO
PUSAT GROSIR SOLOPUSAT GROSIR SOLO
PUSAT GROSIR SOLO
 
Smoking is injurious to health
Smoking is injurious to healthSmoking is injurious to health
Smoking is injurious to health
 

Similar to What is JSON-FP

JSON Support in Salesforce - winter 12
JSON Support in Salesforce - winter 12JSON Support in Salesforce - winter 12
JSON Support in Salesforce - winter 12
Jitendra Zaa
 
Go Beyond Higher Order Functions: A Journey into Functional Programming
Go Beyond Higher Order Functions: A Journey into Functional ProgrammingGo Beyond Higher Order Functions: A Journey into Functional Programming
Go Beyond Higher Order Functions: A Journey into Functional Programming
Lex Sheehan
 
Monad Fact #6
Monad Fact #6Monad Fact #6
Monad Fact #6
Philip Schwarz
 
Basics of Functional Programming
Basics of Functional ProgrammingBasics of Functional Programming
Basics of Functional Programming
Sartaj Singh
 
Json to json esb transformation
Json to json esb transformationJson to json esb transformation
Json to json esb transformation
Domenico Schiavone
 
OOP and FP
OOP and FPOOP and FP
OOP and FP
Mario Fusco
 
Graphql
GraphqlGraphql
Monad as functor with pair of natural transformations
Monad as functor with pair of natural transformationsMonad as functor with pair of natural transformations
Monad as functor with pair of natural transformations
Philip Schwarz
 
Programming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperProgramming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperShreya Chakrabarti
 
Introduction To Scala
Introduction To ScalaIntroduction To Scala
Introduction To Scala
Innar Made
 
Fp for the oo programmer
Fp for the oo programmerFp for the oo programmer
Fp for the oo programmer
Shawn Button
 
Hipster Oriented Programming
Hipster Oriented ProgrammingHipster Oriented Programming
Hipster Oriented ProgrammingJens Ravens
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course yoavrubin
 
Building with JavaScript - write less by using the right tools
Building with JavaScript -  write less by using the right toolsBuilding with JavaScript -  write less by using the right tools
Building with JavaScript - write less by using the right toolsChristian Heilmann
 
Transformation jsontojsonesb
Transformation jsontojsonesbTransformation jsontojsonesb
Transformation jsontojsonesb
Antonio Pellegrino
 
Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json transformation in mule
Antonio Pellegrino
 
Transformation jsontojsonesb
Transformation jsontojsonesbTransformation jsontojsonesb
Transformation jsontojsonesb
Germano Barba
 
Transformation jsontojsonesb
Transformation jsontojsonesbTransformation jsontojsonesb
Transformation jsontojsonesb
Davide Rapacciuolo
 
JSON_FIles-Py (2).pptx
JSON_FIles-Py (2).pptxJSON_FIles-Py (2).pptx
JSON_FIles-Py (2).pptx
sravanicharugundla1
 

Similar to What is JSON-FP (20)

JSON Support in Salesforce - winter 12
JSON Support in Salesforce - winter 12JSON Support in Salesforce - winter 12
JSON Support in Salesforce - winter 12
 
Go Beyond Higher Order Functions: A Journey into Functional Programming
Go Beyond Higher Order Functions: A Journey into Functional ProgrammingGo Beyond Higher Order Functions: A Journey into Functional Programming
Go Beyond Higher Order Functions: A Journey into Functional Programming
 
Monad Fact #6
Monad Fact #6Monad Fact #6
Monad Fact #6
 
Basics of Functional Programming
Basics of Functional ProgrammingBasics of Functional Programming
Basics of Functional Programming
 
Json to json esb transformation
Json to json esb transformationJson to json esb transformation
Json to json esb transformation
 
OOP and FP
OOP and FPOOP and FP
OOP and FP
 
Graphql
GraphqlGraphql
Graphql
 
Monad as functor with pair of natural transformations
Monad as functor with pair of natural transformationsMonad as functor with pair of natural transformations
Monad as functor with pair of natural transformations
 
Json
JsonJson
Json
 
Programming Languages - Functional Programming Paper
Programming Languages - Functional Programming PaperProgramming Languages - Functional Programming Paper
Programming Languages - Functional Programming Paper
 
Introduction To Scala
Introduction To ScalaIntroduction To Scala
Introduction To Scala
 
Fp for the oo programmer
Fp for the oo programmerFp for the oo programmer
Fp for the oo programmer
 
Hipster Oriented Programming
Hipster Oriented ProgrammingHipster Oriented Programming
Hipster Oriented Programming
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course
 
Building with JavaScript - write less by using the right tools
Building with JavaScript -  write less by using the right toolsBuilding with JavaScript -  write less by using the right tools
Building with JavaScript - write less by using the right tools
 
Transformation jsontojsonesb
Transformation jsontojsonesbTransformation jsontojsonesb
Transformation jsontojsonesb
 
Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json transformation in mule
 
Transformation jsontojsonesb
Transformation jsontojsonesbTransformation jsontojsonesb
Transformation jsontojsonesb
 
Transformation jsontojsonesb
Transformation jsontojsonesbTransformation jsontojsonesb
Transformation jsontojsonesb
 
JSON_FIles-Py (2).pptx
JSON_FIles-Py (2).pptxJSON_FIles-Py (2).pptx
JSON_FIles-Py (2).pptx
 

More from Ben Lue

Introducing coServ
Introducing coServIntroducing coServ
Introducing coServ
Ben Lue
 
Programming can be like circuits drawing -- a JSON-FP perspective
Programming can be like circuits drawing -- a JSON-FP perspectiveProgramming can be like circuits drawing -- a JSON-FP perspective
Programming can be like circuits drawing -- a JSON-FP perspective
Ben Lue
 
Hack & Go! Redefining API @ MOPCON 2014
Hack & Go!  Redefining API @ MOPCON 2014Hack & Go!  Redefining API @ MOPCON 2014
Hack & Go! Redefining API @ MOPCON 2014
Ben Lue
 
學好 node.js 不可不知的事
學好 node.js 不可不知的事學好 node.js 不可不知的事
學好 node.js 不可不知的事
Ben Lue
 
不一樣的 Web Server coServ Part II
不一樣的 Web Server coServ Part II不一樣的 Web Server coServ Part II
不一樣的 Web Server coServ Part II
Ben Lue
 
HTML+COIMOTION 開發跨平台 app
HTML+COIMOTION 開發跨平台 appHTML+COIMOTION 開發跨平台 app
HTML+COIMOTION 開發跨平台 app
Ben Lue
 
不一樣的Web server... coServ
不一樣的Web server... coServ不一樣的Web server... coServ
不一樣的Web server... coServ
Ben Lue
 
以HTML5和COIMOTION打造跨平台App
以HTML5和COIMOTION打造跨平台App以HTML5和COIMOTION打造跨平台App
以HTML5和COIMOTION打造跨平台App
Ben Lue
 
第一次使用COIMOTION就上手
第一次使用COIMOTION就上手第一次使用COIMOTION就上手
第一次使用COIMOTION就上手
Ben Lue
 
COIMOTION概念介紹
COIMOTION概念介紹COIMOTION概念介紹
COIMOTION概念介紹
Ben Lue
 

More from Ben Lue (10)

Introducing coServ
Introducing coServIntroducing coServ
Introducing coServ
 
Programming can be like circuits drawing -- a JSON-FP perspective
Programming can be like circuits drawing -- a JSON-FP perspectiveProgramming can be like circuits drawing -- a JSON-FP perspective
Programming can be like circuits drawing -- a JSON-FP perspective
 
Hack & Go! Redefining API @ MOPCON 2014
Hack & Go!  Redefining API @ MOPCON 2014Hack & Go!  Redefining API @ MOPCON 2014
Hack & Go! Redefining API @ MOPCON 2014
 
學好 node.js 不可不知的事
學好 node.js 不可不知的事學好 node.js 不可不知的事
學好 node.js 不可不知的事
 
不一樣的 Web Server coServ Part II
不一樣的 Web Server coServ Part II不一樣的 Web Server coServ Part II
不一樣的 Web Server coServ Part II
 
HTML+COIMOTION 開發跨平台 app
HTML+COIMOTION 開發跨平台 appHTML+COIMOTION 開發跨平台 app
HTML+COIMOTION 開發跨平台 app
 
不一樣的Web server... coServ
不一樣的Web server... coServ不一樣的Web server... coServ
不一樣的Web server... coServ
 
以HTML5和COIMOTION打造跨平台App
以HTML5和COIMOTION打造跨平台App以HTML5和COIMOTION打造跨平台App
以HTML5和COIMOTION打造跨平台App
 
第一次使用COIMOTION就上手
第一次使用COIMOTION就上手第一次使用COIMOTION就上手
第一次使用COIMOTION就上手
 
COIMOTION概念介紹
COIMOTION概念介紹COIMOTION概念介紹
COIMOTION概念介紹
 

Recently uploaded

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 

Recently uploaded (20)

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 

What is JSON-FP

  • 1. What Is JSON-FP Ben Lue @ COIMOTION
  • 2. What Is JSON-FP Programs are expressed as JSON objects in a functional programming style.
  • 3. Ok. That sounds like something serious, but what does that really mean?
  • 4. Introducing JSON-FP • JSON-FP uses JSON objects to describe a computer program. • If you send a JSON object to JSON- FP to run, you could get a very different object in return.
  • 5. Let’s Start With Something Simple var expr = {add: 1} ; jsonfp.apply(1, expr);
  • 6. var expr = {add: 1} ; jsonfp.apply(1, expr); That’s the same as saying 1 + 1 1  {add: 1} === (1 + 1)
  • 7. Now you know a JSON-FP expression is as simple as: {op: option} Ex: {add: 1}
  • 8. JSON-FP allows you to replace ‘option’ with another JSON-FP expression. That makes things… interesting.
  • 9. Changing {add: 1} to {add: {‘<‘: 10}} The program changes to: ‘If the input is smaller than 10, add 1 to it.’
  • 10. Another Example _.map(list, function(page) { return _.pick(page, ‘title’); }); The above code uses underscore/lodash to remove all but the ‘title’ property from a list of pages.
  • 11. If Done By JSON-FP… _.map(list, function(page) { return _.pick(page, ‘title’); }); vs {map: {pick: ‘title’}}
  • 12. So you may notice the JSON-FP expression can be very concise and it can help developers to focus on the problem they want to solve.
  • 13. But that’s not the whole point…
  • 14. Properties/features of JSON-FP: • Map/Reduce in the distributed environments. • Functional programming • Homoiconic / metaprogramming
  • 15. Map/reduce, functional programming and homoiconic… Those are too heavy stuff for this introduction. We’ll cover them in the coming slides. But we can talk a little about map/reduce…
  • 16. If your application has to query data repositories in a heterogeneous environment, hadoop/spark is NOT a good fit. Try JSON-FP, life will be much easier.
  • 17. Any real world applications?
  • 18. Well, JSON-FP is less than a month old. Interesting applications are coming… For now, you can check out newsql (https://github.com/benlue/newsql) which uses JSON-FP to query objects. Our next generation API services uses JSON-FP, too.
  • 19. That’s it for now. For more JSON-FP examples, check out: https://github.com/benlue/jsonfp-examples The JSON-FP is open sourced at github: https://github.com/benlue/jsonfp