Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence |...
-
Upload
nigel-oliver -
Category
Documents
-
view
214 -
download
2
Transcript of Vision and Goals A flexible data layer for applications in Java, GWT and/or AppEngine. Persistence |...
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
Buzzwords
Cloud
REST
Social
schema less
NoSQL
XMLRDF
json
Access Rights Management
Google AppEngine
HTTP/network
Web apps today
Rich Client
Web Server
Database
Data Access Object
Business Object
Data Transfer Object
Browser-side Business Object
Web apps with Xydra: No data model conversions
Rich Client
Web Server
Database
Xydra model
Xydra model
HTTP/network
• 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
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
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
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
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
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
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
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
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
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
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