Introduction to our web-scale tools for "rest-full app development" and "bigdata store and search" (lily)
Slides presented at devoxx-2010
http://devoxx.com/display/Devoxx2K10/Scalable+and+RESTful+web+applications++at+the+crossroads+of+Kauri+and+Lily
Take control of your SAP testing with UiPath Test Suite
Devoxx 2010 | Tools In Action : Kauri and Lily
1. 1IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Scalable and RestFul Web Apps
At the xroads of Kauri and Lily
&
2. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Speaker Context
Marc Portier, ±14 years of Java, XML based web
development. Co-founder of Outerthought.
• Outerthought?
– Innovative Content Management system that follows
ReST principles: “DaisyCMS”
– New ReST supporting development framework:
“Kauri project”
– Scalable Search and Store: “Lily Project”
3. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Looking for You!
• User, Contributor of
our Open Source
Projects
• Teacher, University,
School
• Student
• Talented worker
– Job openings!
4. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
The Wonderful
Web Machine
6. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
How does it keep up?
• Diversity / Compatibility
• Amount of Servers
• Amount of Users
• Amount of resources
• Response Times / Latency
Wouldn't you want to do that too?
7. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
In woodworking it's important
to work with the grain
of the wood.
The Web, too, has a grain, and
a RESTful web service is
one that works with it.
- Leonard Richardson
and Sam Ruby
RestFull Web Services
8. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Meeting high expectations
• Current web-experiences are spoiling us
– Google Maps
– Mash-ups
– Atom
– Amazon S3
• It all looks so simple (and mostly works)
• General customer feeling:
“How hard could it be?””
9. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Riding the
Web Project Wave
10. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
kauriproject.org
• Resource Oriented WebDevelopment PlatForm
• Spans WebServices (headless)
• and WebApplications (human consumer)
• Leverages modern and popular techniques and
systems
(+Jax-RS )
• Currently 0.4-RC2 – ( 0.4 upcoming )
14. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Perfection is achieved,
not when there is
nothing more to add,
but when there is
nothing more to remove.
- Antoine de Saint-Exupery
17. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Kauri Component Model: Modules
• Unit of reuse
• Maven managed JAR
• Service Interfaces
– Java aspect
– REST aspect
• Maps to One Spring
Container
• Has own classloading
scope
19. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Kauri Attitude
• No Servlet container
– (Although Kauri Apps can be deployed to...)
– Servlets miss out on REST and IO threading
• Own Application Container
– Spring Based
• Enhanced with own injection directives
• Wrapped in managed classloading hierarchy
• Allows wiring between modules
– Maven Repository Based
– Required support for the REST aspect
– Advanced configuration
20. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Module vs. war
• war != jar
– Different layout
– =deployment unit != reuse/component unit
– Too high level for dependency shielding
• Deployment Strategy:
– conf/kauri/wiring.xml: deployment descriptor
– Reuse maven repository layout
– Different targets:
• Standalone, rpm, war,...
21. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Kauri Routing and Representations
• MVC-Split (Inspiration: Spring webmvc)
• Routing
– Groovy syntax support (builder @ init time)
– Request time: Java performance
– JaxRS support
• Separate Representation Builder
– Similar groovy syntax (again builder)
– Produces Representation
– Handle (presentation of) error conditions centrally
26. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Continuous Prototyping
• -p prototype mode
– Possibility to blend and match production stuff with
new try-out stuff
• Pages router
– Invite in design-aware HTML/CSS/JS client hacker
with feeling for programming & FS based toolchain
• -s module-source.properties
– fast roundtrip mode directly mounted in the source
27. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Kauri Templating
• XML (tag) Based
– Conditionals, repeat, ...
– Security – protect,
• ${placeholder} replacement
– through el or groovy
– + Specific functions (i18n, config, publicUri, ...)
• + Add your own
• Noteworthy
– Page inheritance
– Local service loading
30. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Kauri Forms
• Browser-based Data Value Interaction System
• RIA approach
• jQuery Based
– UI effects & Controls
• Adds
– Standard rest-full ajax logic
– Validation (local and remote)
– Formatting
31. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Kauri Forms Sample
var fconf = {
createURI: "${publicUri('service:/data/contact/')}",
type: {
members: {
name: "string",
email: {
base: "string",
"+validators": { isEmail: {} },
label: "e-mail"
},
birthday: {
base: "date",
yearRange: "-100:+0",
label: "What is your date of birth?"
},
}
}};
Json Form-config:
HTML:
<form id=”myform” />
32. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Kauri Form Controls
• Simple
– Basic data-types
– Classic validations
– HTML basics
• Aggregates
– Collection
– Composite
– Choice
• + Add your own
• Specific
– GoogleMaps-Location
– Ajax based file-upload
– ...
33. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
More Kauri
• I18n support
• XML & HTML loading (and cleaning)
• Unified Configuration
• Unified Security
– Spring Security (ACEGI)
– Support for various mehanisms
• Basic, digest, https, form, ...
• Belgian e-ID
• Database resources (JPA)
• ...
34. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Future Kauri
• State management through temporary
resources
• More Advanced controls
• Functional Modules
35. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Kauri Goals
How
• All team members
• All project stages
• Efficiency
– Prototype as a design
mode
– Enhance, not throw
away
What
• ROA & RIA
• Modules
• Templates
• Data Interaction
36. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Observing the Obvious
• REST-full stateless
approach in web-
access layer pretends
“Ready for scale out”
• Shifting the problem
towards “Storage”
• ie. Indexed Storage
37. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Scalable Store and
Search
38. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
lilyproject.org
• Scalable Store AND Search
– Massively distributed searchable data store
• Blended HBASE with SOLR (shard), adding
– Schema with support for
• versioning, varianting and Blob handling
– 2ndary indices
– Rowlog/Queue for sync & async updates
– M/R batch re-indexing
• 0.2 since October 2010,
1.0 expected March 2011
39. IIC » TECHNOLOGIEPARK 3 » B-9052 ZWIJNAARDE (GENT) » www.outerthought.org
Scale on all ends