ݺߣ

ݺߣShare a Scribd company logo
APACHE SLING & FRIENDS TECH MEETUP
BERLIN, 23-25 SEPTEMBER 2013
“RESTful transactions” with Apache Sling
Şenol Taş
About
adaptTo() 2013 2
§  My Name is Şenol Taş
§  Senior Computer Scientist
§  Adobe in Basel, Switzerland
@thelabertasch
adaptTo() 2013 3
Why such a boring Topic?
Because websites are…
adaptTo() 2013 4
§  No longer simple advertisement
platforms
§  Not only “online Business cards”
§  Not a “nice to have” medium
§  Not a “Playground”
§  …..
Because websites are…
adaptTo() 2013 5
§  Serious business
§  Make $$$
§  Complex
§  MUST have
§  “Real” Applications
adaptTo() 2013 6
Your Website IS THE Application
Let’s….
adaptTo() 2013 7
§  Find out “what is a transaction?”
§  Quick reminder about REST
§  How do this two concepts work
together?
adaptTo() 2013 8
What are Transactions?
What are Transactions?
adaptTo() 2013 9
adaptTo() 2012 10
“An input message to a computer system
that must be dealt with
as a single unit of work”
What are Transactions?
adaptTo() 2013 11
§  begin transaction
§  debit checking account
§  credit savings account
§  update history log
§  commit transaction
What are Transactions?
adaptTo() 2013 12
§  Late 70s: Jim Gray defined the
semantic of reliable transactions
§  Early 80s: Andreas Reuter and Theo
Härder defined the acronym “ACID” in
their paper “Principles of Transaction-
Oriented Database Recovery”
ACID
adaptTo() 2013 13
§  Atomicity
§  Consistency
§  Isolation
§  Durability
How do tools like hybernate help?
adaptTo() 2013 14
adaptTo() 2013 15
What is REST?
What is REST?
adaptTo() 2013 16
§  Representational State Transfer
§  Stateless
§  Client-server
§  Cachable
§  Scalable
§  …..
What is REST?
adaptTo() 2013 17
§  So? How does this work together with
transactions?
adaptTo() 2013 18
REST and transaction is a oxymoron
REST and transactions
adaptTo() 2013 19
§  Atomicity
§  Consistency
§  Isolation
§  Durability
What are the challenges?
adaptTo() 2013 20
§  HTTP REQUEST – RESPONSE
PATTERN
§  STATELESS
§  …..?
Change your mindset…
adaptTo() 2013 21
§  Not everything has to be done in one
request
§  If you are using POST.jsp or similar in
Sling, most likely something is wrong
§  Events and Observations are your
friends
§  Use the full power of the Sling Default
Post and GET Servlet
Remember the cheat sheet from Lars?
adaptTo() 2013 22
Example
adaptTo() 2013 23
§  Resource: /home/senol/profile
§  Begin transaction
§  change interests
§  Commit transaction
Begin Transaction
adaptTo() 2013 24
§  Copy the node /home/senol/profile to
/home/senol/transactions/profile/*
Change interests
adaptTo() 2013 25
§  Update with regular post request
Commit transaction
adaptTo() 2012 26
§  With observation or events
§  Directly
Things of interest
adaptTo() 2012 27
§  Communicating with services layer
§  Distributed transactions
§  Nested transactions
§  Locking…
§  Using Adobe CQ?
§  Have a look at the Workflow Launcher!
adaptTo() 2013 28
Thank you and have a RESTful Day!
Ad

Recommended

Atomic Transactions for the REST of us
Atomic Transactions for the REST of us
Cesare Pautasso
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
Senol Tas
Adobe Sneak Peak - Introducing HTL @ Evovle'13
Adobe Sneak Peak - Introducing HTL @ Evovle'13
Senol Tas
Performance monitoring and call tracing in microservice environments
Performance monitoring and call tracing in microservice environments
Martin Gutenbrunner
Rest Vs Soap Yawn2289
Rest Vs Soap Yawn2289
Kalyan Vijay Kumar Pasumarthi
ReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... Yawn
ozten
Ijirsm ashok-kumar-ps-compulsiveness-of-res tful-web-services
Ijirsm ashok-kumar-ps-compulsiveness-of-res tful-web-services
IJIR JOURNALS IJIRUSA
Representational State Transfer (REST)
Representational State Transfer (REST)
David Krmpotic
RESTful services
RESTful services
Pedram Bashiri
RESTful Web Services
RESTful Web Services
adeppathondur
Rest
Rest
Prabhat gangwar
Rest surekha
Rest surekha
Surekha Achanta
The Internet as Web Services: introduction to ReST
The Internet as Web Services: introduction to ReST
Bruno Kessler Foundation
REST & RESTful Web Services
REST & RESTful Web Services
Halil Burak Cetinkaya
Research Topics in Machine Hypermedia
Research Topics in Machine Hypermedia
Michael Koster
Have Some Rest Building Web2.0 Apps And Services
Have Some Rest Building Web2.0 Apps And Services
Nenad Nikolic
REST e Resource Oriented Architectures
REST e Resource Oriented Architectures
GrUSP
Resource Oriented Architectures
Resource Oriented Architectures
Gabriele Lana
A Distributed Transaction Model for Read-Write Linked Data Applications
A Distributed Transaction Model for Read-Write Linked Data Applications
Nandana Mihindukulasooriya
Drupal As A RESTful Backend For Client Side Applications
Drupal As A RESTful Backend For Client Side Applications
Myplanet Digital
Oak, the Architecture of the new Repository
Oak, the Architecture of the new Repository
Michael Dürig
Applications of the REST Principle
Applications of the REST Principle
elliando dias
Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutions
Masoud Kalali
Unerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIs
SocialDevCamp Chicago
Rest ful security
Rest ful security
Truong Truong
BeJUG JAX-RS Event
BeJUG JAX-RS Event
Stephan Janssen
REST in short
REST in short
Akshay Ballarpure
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Pete Morano
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays

More Related Content

Similar to Developing “RESTful transactions” with Apache Sling (20)

RESTful services
RESTful services
Pedram Bashiri
RESTful Web Services
RESTful Web Services
adeppathondur
Rest
Rest
Prabhat gangwar
Rest surekha
Rest surekha
Surekha Achanta
The Internet as Web Services: introduction to ReST
The Internet as Web Services: introduction to ReST
Bruno Kessler Foundation
REST & RESTful Web Services
REST & RESTful Web Services
Halil Burak Cetinkaya
Research Topics in Machine Hypermedia
Research Topics in Machine Hypermedia
Michael Koster
Have Some Rest Building Web2.0 Apps And Services
Have Some Rest Building Web2.0 Apps And Services
Nenad Nikolic
REST e Resource Oriented Architectures
REST e Resource Oriented Architectures
GrUSP
Resource Oriented Architectures
Resource Oriented Architectures
Gabriele Lana
A Distributed Transaction Model for Read-Write Linked Data Applications
A Distributed Transaction Model for Read-Write Linked Data Applications
Nandana Mihindukulasooriya
Drupal As A RESTful Backend For Client Side Applications
Drupal As A RESTful Backend For Client Side Applications
Myplanet Digital
Oak, the Architecture of the new Repository
Oak, the Architecture of the new Repository
Michael Dürig
Applications of the REST Principle
Applications of the REST Principle
elliando dias
Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutions
Masoud Kalali
Unerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIs
SocialDevCamp Chicago
Rest ful security
Rest ful security
Truong Truong
BeJUG JAX-RS Event
BeJUG JAX-RS Event
Stephan Janssen
REST in short
REST in short
Akshay Ballarpure
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Pete Morano
The Internet as Web Services: introduction to ReST
The Internet as Web Services: introduction to ReST
Bruno Kessler Foundation
Research Topics in Machine Hypermedia
Research Topics in Machine Hypermedia
Michael Koster
Have Some Rest Building Web2.0 Apps And Services
Have Some Rest Building Web2.0 Apps And Services
Nenad Nikolic
REST e Resource Oriented Architectures
REST e Resource Oriented Architectures
GrUSP
Resource Oriented Architectures
Resource Oriented Architectures
Gabriele Lana
A Distributed Transaction Model for Read-Write Linked Data Applications
A Distributed Transaction Model for Read-Write Linked Data Applications
Nandana Mihindukulasooriya
Drupal As A RESTful Backend For Client Side Applications
Drupal As A RESTful Backend For Client Side Applications
Myplanet Digital
Oak, the Architecture of the new Repository
Oak, the Architecture of the new Repository
Michael Dürig
Applications of the REST Principle
Applications of the REST Principle
elliando dias
Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutions
Masoud Kalali
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Pete Morano

Recently uploaded (20)

War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
June Patch Tuesday
June Patch Tuesday
Ivanti
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
Turning the Page – How AI is Exponentially Increasing Speed, Accuracy, and Ef...
Turning the Page – How AI is Exponentially Increasing Speed, Accuracy, and Ef...
Impelsys Inc.
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Safe Software
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
June Patch Tuesday
June Patch Tuesday
Ivanti
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
Connecting Data and Intelligence: The Role of FME in Machine Learning
Connecting Data and Intelligence: The Role of FME in Machine Learning
Safe Software
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
Turning the Page – How AI is Exponentially Increasing Speed, Accuracy, and Ef...
Turning the Page – How AI is Exponentially Increasing Speed, Accuracy, and Ef...
Impelsys Inc.
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Safe Software
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
Ad

Developing “RESTful transactions” with Apache Sling