If you can't read please download the document
Upload
brad-mcevoy
View
985
Download
2
Embed Size (px)
Citation preview
Webdav, Milton and OBM
http://milton.io
2007: It all started with baby photos...
Yes I could have just used FTP, but that would be too easy!
A Little About Me
Freelance software developer
Commercial vendor for Milton since 2012
Lives in New Zealand
No customers in my own country!
Also have a startup business FuseLMS.com
About Milton
Started in 2007 as small webdav servlet
Now best in the world at what it does only library to support webdav,caldav and carddav
Corporate clients include: Google, HP, Novell
EU firms: Lukkien, 5Point, QualityOnline, Careweb, Idiada, SSP Europe
FOSS projects: ExistDB, BaseX, CouchDB
github.com/miltonio/milton2
About Webdav
Network protocol, like FTP and Samba
But extensible
Its just HTTP, plus a few extras
Supports structured data as well as binary content
Built in with all major Operating Systems
Supported by most major apps, like MS Office, Adobe, etc
Dav Protocols
HTTP 1.1WebDavACLCarddavCaldavQuotaSearchSync
The Awesome-ness of Dav
Scalability! Stateless protocols allow high performance, high availability clusters
Network integration: No hassles with firewalls, its just http
Security: Simple, well understood protocols makes it easy for sys admins to secure
Integration: Just incremental additions to existing web applications, for close integration
Industry support
Broad support from industry working groups, ongoing protocol development
Early leadership from Microsoft
Then Apple led charge with MobileMe and iCloud
Google sees Dav as strategic to making its calendar and contact services ubiquitous
Productivity Models
ModelWhere is my software?Where is my content?Exemplors
1LocalLocalMicrosoft
2RemoteRemoteGoogle, Facebook
3LocalRemoteApple
3bLocalLocal synced to RemoteDropbox
Webdav is useful when local applications need access to remote content
There is a war being waged between local software vendors (Apple,MS) and remote software vendors (Google,Facebook).
Which model is winning?
Webdav for files
Network drives. First use of Webdav
Built into all desktop operating systems: Mac, Windows, Linux
Built into Office (MS+OO) and other productivity apps
Locking, to prevent conflicts
MS Word 2010 even supports co-editing!
But can be slow over WAN's
How to build webdav apps?
Create annotated methods that work with your domain objects
@Root public Repository getRoot() { return findRootRepository(); } @ChildrenOf public List getRootFolders(Repository root) { return root.getFolders(); } @ChildrenOf public List getRootFolders(DirectoryNode root) { return root.getFolders(); } @Get public void getFileContent(FileNode fileNode, OutputStream out){ fileNode.writeContent(out); } @PutChild public FileNode createFile(DirectoryNode dir, String newName, InputStream in) { DataSession.FileNode newFileNode = parent.addFile(newName); newFileNode.setContent(inputStream); return newFileNode; }
How to implement security?
Implement authentication and an access control
list:@Authenticate
public Boolean checkPasswordBasic(Profile user, String password)
{
return passwordManager.verifyPassword(user, password);
} @Authenticate
public Boolean checkPasswordDigest(Profile user, DigestResponse d)
{
return passwordManager.verifyDigest(d, user);
}@AccessControlList
public List getPrivs(target, Profile user) {
if( currentUser == null ) {
return AccessControlledResource.NONE;
} else {
// business rules
}
}
Competitors to webdav for files
Dropbox!! (and other sync apps)
Most users prefer sync'd files to remote access
Webdav-sync protocol exists, but not widely implemented
Ideally support both webdav and sync
Milton has components to support sync
Caldav: Webdav for calendars
Dav is well suited, given the mix of structured data and unstructured content
Probably most widely used Dav protocol
Coming to Windows Phone 8, just announced this week!
So probably available on Window desktop in near future
Very well supported on Mac and iOS devices
How to build Caldav apps?
Start with a webdav app and add calendar capabilities
@ChildrenOf public CalendarsHome getCalendarsHome(Profile user) { return new CalendarsHome(user); // Place holder object } @ChildrenOf @Calendars public List getCalendars(CalendarsHome cals, @Principal Profile profile) { return cals.user.getCalendars(); } @Get @ICalData public void getEventIcal(CalEvent event, Calendar calendar, OutputStream out) { String s = calendarService.getCalendar(event); out.write(s.getBytes(StringUtils.UTF8)); } } @PutChild public CalEvent createEvent(Calendar calendar, final String newName, InputStream in) { CalEvent newEvent = calendarService.createEvent(calendar, newName, in); return newEvent; }
Carddav: for contacts
Milton was deployed to Google Contacts end of 2012
Google has deprecated ActiveSync, forcing iOS users to move to Carddav millions of users!
No built in support for Thunderbird, but SOGO connector is ok
Very well supported on Mac and iOS devices
How to build Carddav apps?
You guessed it easy!
@ChildrenOf
@AddressBooks
public MusicianAddressBook getAddressBook(AddressBooksHome m)
{
...}@ContactData
@Get
public byte[] getContactData(MyContact c) {...}
Milton as a Web Framework
Annotations support modelled on Spring MVC
Templating, forms, ajax, data binding and xDav work seamlessly in a single url namespace
Automatically has navigable REST API includes properties!
Eg:
@Post(bindData=true) public Profile saveProfile(Profile profile) { profile.setModifiedDate(new Date()); return profile; }
@Getpublic ModelAndView showUserPag(Profile p) { return new ModelAndView("profile", p, "profPage"); }
What next for Webdav
Expect wider adoption of Oauth2 by client and server vendors
Ubiquitous support for Caldav + Carddav for service vendors and client vendors will be a game changer
Increasing support for webdav sync ? Maybe
What next for Milton?
Ongoing: co-ordination with client-side developers to provide server-side capabilities
Next protocols: webdav-sync + dav search
File sync
Server-to-server sync eg sync OBM calendars with Google calendars
Server application development simple file,calendars and contacts server for small business
What next for OBM and Milton?
An ideal partnership
First calendars...
Then contacts...
Then files ? Hopefully!