Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence |...
-
Upload
nigel-oliver -
Category
Documents
-
view
215 -
download
2
Transcript of Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence |...
![Page 1: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/1.jpg)
Vision and Goals
A flexible data layer for applications in Java, GWT and/or AppEngine.
Persistence | Access Rights | Synchronisation over network | REST | Versioning | Transactions | Event Listeners
ydra.orgX
![Page 2: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/2.jpg)
Buzzwords
Cloud
REST
Social
schema less
NoSQL
XMLRDF
json
Access Rights Management
Google AppEngine
![Page 3: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/3.jpg)
HTTP/network
Web apps today
Rich Client
Web Server
Database
Data Access Object
Business Object
Data Transfer Object
Browser-side Business Object
![Page 4: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/4.jpg)
Web apps with Xydra: No data model conversions
Rich Client
Web Server
Database
Xydra model
Xydra model
HTTP/network
![Page 5: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/5.jpg)
• Easy to use API• Same data model runs in server (Java or AppEngine) and client
(Java or GWT/Javascript)
No more data model conversions• Domain-free model (NoSQL)• Web 2.0 ready: REST web-API• Ready for social apps:– Access rights management– Versioning
• Scalable (Cloud-size!)• Ready for rich clients:– Sophisticated synchronisation of state
Xydra Goals
![Page 6: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/6.jpg)
Typical usage I: Server - Client
Java Client I
Xydra
Used as an embedded NoSQL data base
Xydra solves • data serialisation,• synchronisation,• versioning,• access rights, • transactions,• change event listener …
AJAX or Java method calls
Java Client II
May this user see or write this data? What did this data look
like in version 13?
What happened on the server since I last sync‘ed?
Tell me if this value changes
Please execute these 5 changes in one atomic transaction
HTTP/network
![Page 7: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/7.jpg)
Google AppEngine
Typical usage II: Cloud – Web server
Web Server
E.g. rendering data with templates
Xydra
Used as an embedded NoSQL data base
Xydra solves • cloud persistence,• synchronisation,• versioning,• access rights, • transactions…
Web Page
Simple static web page
HTML, CSS
HTTP/network
![Page 8: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/8.jpg)
Typical usage I: Webserver – Rich Client with AJAX
Rich Client
Written in GWT, compiled to JavaScript
Web Server
Xydra
Used as an embedded NoSQL data base
AJAX: XML or JSON over HTTP
Another usersRich Client
Maybe working on the same data
Xydra solves • data serialisation,• synchronisation,• versioning,• access rights, …
HTTP/network
![Page 9: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/9.jpg)
Trends in Application Hosting
Infrastructure: Less freedom Less problems to solve
Dedicated server in your basement
Dedicated server in hosting center
Shared server in hosting center
Virtual server in hosting center
Hosted Java Virtual Machine
Hosted servlet container (Tomcat)
PaaS: Google AppEngine
Xydra (Also runs on non-cloud Java)
Cloud of virtual servers:Amazon EC2, Microsoft Azure
Scale
Cluster in your basement
![Page 10: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/10.jpg)
XRepository
XModel
XObject
XField XValue
XField XValue
XField XValue…
XObject
XField XValueXModel
XObject
XField XValue
…
…
XValueXID XID XID XID
XBooleanListValue, XBooleanValue, XByteListValue, XCollectionValue<E>, XDoubleListValue, XDoubleValue, XID, XIDListValue, XidOrVariable, XIDSetValue, XIDSortedSetValue, XIntegerListValue, XIntegerValue, XListValue<E>, XLongListValue, XLongValue, XNumberListValue<T>, XNumberValue, XSetValue<E>, XStringListValue, XStringSetValue, XStringValue,
XAddress
main
phonebook
john
phone 123-456
main/phonebook/john/phone
A flexible data layer
![Page 11: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/11.jpg)
XRepository
XModel
XObject
XField XValue
main
phonebook
john
phone 123-456
Xydra and the Semantic Web
NamedGraph
Subject Property Object
Semantic Web Xydra
URI Xaddress (external references) / XID (internal references)BlankNode --LanguageTaggedLiteral --DatatypedLiteral Xydra values (BooleanValue, LongValue, StringValue, ..)PlainLiteral StringValue
Xydra is well-suited to store and manage RDF data
![Page 12: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/12.jpg)
XRepository
XModel
XObject
XField XValue
main
john
phone 123-456
Xydra and XML
<?xml version="1.0" encoding="UTF-8"?><main>
<phonebook><john>
<phone><long>123-456</long>
</phone></john>
</phonebook></main>
phonebook
XID naming rules ensure strings can be used as valid XML element names
Values are serialised in a self-describing and extensible form
![Page 13: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/13.jpg)
XModel
XChangeLog
Syncable 2
Store 1
Syncable 1XModel
XChangeLog
XModel
XChangeLog
• 4 local events not yet committed
• 3 events in sync from store
• 2 local events not yet committed
• 4 events in sync from store
• 5 events in history• Store has no knowledge
who synced what
Store 2
Advanced Synchronisation: One client with several persistent stores
Synchronisation
![Page 14: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/14.jpg)
Sync
OK
What can happen with an application command issues to the Async Store API?
Error Handling
SafeCommandFailede.g. for a SafeCommand the revision numbers dont match expectations
CommandFailede.g. operation on deleted entity
Forbiddeni.e. actor has no permission to do this
TimeoutNo response. Network down? Server gone?
IllegalArgumentThe request from the client is ill-formed
RuntimeErrore.g. the database just crashed, AppEngine ran out of quota
Access
Network
Client
Error source
Server
![Page 15: Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence | Access Rights | Synchronisation over network | REST.](https://reader031.fdocuments.us/reader031/viewer/2022032606/56649eb75503460f94bc15dc/html5/thumbnails/15.jpg)
Xydra Async Store APICommand/Event/SnapshotGroup/Member/Access
GaeStorePersistence on GAE data storeParallel transaction management via ChangeEntitesSnapshots via memcache/data storeCustom access persistence on data store
HTML5-Store (planned)Persistence via HTML5 or Google Gears or SQLite
Memory-StorePersistence only in memory
CsvFile-Store (planned)Persistence in CSV file(s)
Implementations for different Platforms
AppEngine (GAE)
Browser/JavaScript (GWT)
Desktop Java Desktop Java