Funabol Connector Development Roadmap


Published on

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Funabol Connector Development Roadmap

  1. 1. Connector Development Roadmap Gilberto Migliavacca
  2. 2. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  3. 3. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  4. 4. DS Server <ul><li>The DS-Server is SyncML server that receives SyncML requests from many remote devices, updates their remote data with local modifications and updates their local data with remote modifications </li></ul><ul><li>The DS-Server is data format independent; it doesn't care about the nature of the item. it considers just the Id of the items. </li></ul>
  5. 5. DS Server <ul><li>It keeps a mapping table between the client’s Local Unique ids (LUID) and the server’s Global Unique Ids (GUID) </li></ul>
  6. 6. DS Server <ul><li>A DS Server common purpose is to keep in sync a syncML Device (e.g. Mobile Phone) with a Back-End System (e.g. Enterprise Information System) </li></ul>
  7. 7. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  8. 8. Extending DS Server <ul><li>The DS Server can be extended in many areas in order to integrate Funambol into existing systems. </li></ul><ul><li>The DS Server extension is called “Module” </li></ul><ul><li>Extensions are distributed and deployed as Funambol Modules </li></ul>
  9. 9. Extending DS Server <ul><li>Module : it's a container for anything related to a server extensions which are used by the DS Server engine to communicate and integrate with external systems. </li></ul><ul><li>Connector : when the main purpose is to connect to an external data source, the module is called connector. </li></ul>
  10. 10. Extending DS Server <ul><li>SyncSource : the connector must provide a SyncSource component. The SyncSource knows and manages a specific data format . </li></ul><ul><li>- FileSystemSyncSource is used by the ds server engine to synchronize data stored in the file system. </li></ul><ul><li>- ContactSyncSource is used to synchronize Contact object (e.g. Vcard) </li></ul><ul><li>- HomerSyncSource is used to synchronize </li></ul><ul><li>Homer Object 1.0 </li></ul>
  11. 11. Extending DS Server <ul><li>A Module should contains: </li></ul><ul><li>- Officer: link to an external authentication/authorization service </li></ul><ul><li>- SyncSource: link to an external data source </li></ul><ul><li>- WS Admin Panel: link for an external management tool </li></ul>
  12. 12. Extending DS Server <ul><li>Moreover a Module </li></ul><ul><li>should contains: </li></ul><ul><li>- XML configuration files </li></ul><ul><li>- Installation instructions </li></ul><ul><li>- SQL scripts </li></ul>
  13. 13. Extending DS Server <ul><li>XML </li></ul><ul><li>configuration </li></ul><ul><li>files </li></ul><ul><li>(SyncSource) </li></ul>
  14. 14. Extending DS Server <ul><li>SQL scripts </li></ul><ul><li>- fnbl_module : for module information </li></ul><ul><li>- fnbl_connector : for connector information </li></ul><ul><li>- fnbl_module_connector : for module-connector association </li></ul><ul><li>- fnbl_sync_source_type : for SyncSource type information </li></ul><ul><li>- fnbl_connector_source_type : for connector-SyncSource type associations </li></ul>
  15. 15. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  16. 16. SyncSource <ul><li>The SyncSource identifies the remote database that will be synchronized with the client database; </li></ul><ul><li>Any type of data (files, calendar events, Homer Object , etc.) can be synchronized, but there must be a proper SyncSource for each type, capable of extracting and storing the data for a real data store. </li></ul>
  17. 17. SyncSource <ul><li>SyncSource Interface Methods: </li></ul><ul><li>- Begin Sync / End Sync : used to start and to end a sync. </li></ul><ul><li>- Get All Sync Item Keys : get all the keys for the items in the server. </li></ul><ul><li>- Get Deleted Sync Item Keys : get all the keys of the deleted items since a specified time. </li></ul><ul><li>- Get Updated Sync Item Keys : get all the keys of the updated items since a specified time. </li></ul><ul><li>- Get New Sync Item Keys : get all the keys of the new items since a specified time. </li></ul>
  18. 18. SyncSource <ul><li>- Get Sync Item From Id : get the item associated with a specific key. </li></ul><ul><li>- Get Sync Item Keys From Twin : search equivalent items for a specified item. </li></ul><ul><li>- Remove Sync Item : remove the item with a specific key. </li></ul><ul><li>- Add Sync Item : insert a specified item in the server and return the item key. </li></ul><ul><li>- Update Sync Item : update a specified item in the server for a specific key. </li></ul><ul><li>- setOperationStatus : the system can perform some actions on the exchanged items based on the client answer. The operations are executed just before the endSync method. </li></ul>
  19. 19. SyncSource <ul><li>Funambol provides two subtypes of </li></ul><ul><li>the SyncSource interface </li></ul><ul><li>- Mergeable : used when the data synchronized supports the merge operation. The merge is performed when a conflict is detected in order to avoid a loss of whatever information. For instance, synchronizing the contacts, we can have the same contact updated on the server (we suppose a new address has been added) and on the client (we suppose a new phone has been added); in this case, we can merge the server contact and the client contact keeping the new address and the new phone </li></ul><ul><li>- Filterable: this interface should be used when the SyncSource supports the Filter (SyncML 1.2) </li></ul>
  20. 20. SyncSource <ul><li>Mergeable </li></ul><ul><li>- mergeSyncItems : Called by the engine to merge the server item with a specific key with the content obtained from the client. This method must return true if the content has been changed. Moreover the item, resulting from the merge, will be sent back to the client. </li></ul>
  21. 21. SyncSource <ul><li>Filterable </li></ul><ul><li>- isSyncItemInFilterClause : detects if the given item matches the filter clause. Called to know if an item satisfies the filter </li></ul><ul><li>- isSyncItemInFilterClause : detects if the item linked to the key matches the filter clause. Called to know if the item specified with the given key satisfies the filter </li></ul><ul><li>- getSyncItemStateFromId : Get the “status” of the given item. This method is required because the server is not able to know the status of an item not inside the filter criteria </li></ul>
  22. 22. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  23. 23. Configuration Panel <ul><li>A Connector and the included SyncSource can be managed by the Administration Tool provided by Funambol. </li></ul><ul><li>The Administration tool uses the WS Admin Interface so that the Module should contain a subset of classes that implement the WS Interface. </li></ul><ul><li>These classes compose the Configuration Panels. </li></ul>
  24. 24. Configuration Panel <ul><li>The Connector Config Panel </li></ul><ul><li>- extends the ConnectorManagementPanel class </li></ul><ul><li>- keeps common settings for all module components/syncsources </li></ul><ul><li>The SyncSource Config Panel </li></ul><ul><li>- extends the SourceManagementPanel class </li></ul><ul><li>- keeps specific settings for a given object ( files, contacts, calendar events and so on) </li></ul>
  25. 25. Configuration Panel <ul><li>Configuration Panels Layout </li></ul>
  26. 26. Configuration Panel <ul><li>.. what's the Homer Object 3.0 </li></ul><ul><li>Homer 3.0 </li></ul><ul><li>Homer 3.0 – drunk </li></ul>
  27. 27. Configuration Panel <ul><li>The Configuration Panels use as a storage system the XML files on the File System. </li></ul><ul><li>Path: Foundation Connector </li></ul><ul><li>/opt/Funambol/config/foundation/.../*.xml </li></ul>
  28. 28. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  29. 29. Officer <ul><li>Component responsible for authenticating and authorizing users to access the server or a particular resource </li></ul><ul><li>A user is represented by its credentials (e.g. login/password pair ) </li></ul><ul><li>A resource can be a SyncML database, a SyncML item or whatever else must be protected by the authorized access. </li></ul><ul><li>An officer is a java class that implements the interface </li></ul>
  30. 30. Officer <ul><li>Officer Interface Methods: </li></ul><ul><li>- boolean authenticate(Credential credential) : Is the user valid? The authentication is valid for an entire SyncML session. </li></ul><ul><li>- boolean authorize(java.lang.String resource, Credential credential) : Is the user authorized to access the given resource? </li></ul><ul><li>- void unAuthenticate(Credential credential) : Used to invalidate the given credential for the current session. </li></ul><ul><li>- getClientAuth() : returns the authentication type that the client must send </li></ul><ul><li>- getServerAuth() : returns the authentication type that the server must send </li></ul>
  31. 31. Officer <ul><li>The Officer has a configuration file </li></ul><ul><li>path: </li></ul><ul><li>opt/Funambol/config/com/funambol/server/security/*.xml </li></ul>
  32. 32. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  33. 33. Hands-on <ul><li>Has the back-end database the fields: “status” and “last_update” for the interested entity? </li></ul><ul><li>e.g. Contact table fields: </li></ul>
  34. 34. Hands-on <ul><li>If the back-end system doesn't provide this feature the Connector must have a local cache in order to idetify: </li></ul><ul><li>- new items (“ getNew ”) </li></ul><ul><li>- updated items (“ getUpdated ”) </li></ul><ul><li>- deleted items (“ getDeleted ”) </li></ul><ul><li>between two SyncML sessions </li></ul>
  35. 35. Hands-on <ul><li>is the communication between the DS Server and the Back-End system fast? </li></ul><ul><li>e.g. HTTP communication </li></ul>
  36. 36. Hands-on <ul><li>If the communication is slow we can optimize the HTTP request for the “ getTwin ” Method. </li></ul><ul><li>The Connector can perform a single “getAll” with just the fields required by the search criteria. </li></ul><ul><li>Then the Connector can save this list of information in the session and execute a local search for all the “ getTwin ” calls. </li></ul>
  37. 37. Hands-on <ul><li>is the appointment and task in the same client database? </li></ul><ul><li>e.g. Nokia </li></ul><ul><li>Phone </li></ul>
  38. 38. Hands-on <ul><li>The Calendar SyncSource must be able to manage a nested object like the ical/vcal. </li></ul><ul><li>Every method should be able to understand if the item is an Event or a Task (Todo) </li></ul><ul><li>Usually we use the following GUID format </li></ul><ul><li>- event: E-121231 </li></ul><ul><li>- task : T-43242 </li></ul><ul><li>in this way the “ getItem ” method can understand if it's handling an Event or a Task. </li></ul>
  39. 39. Hands-on <ul><li>A SyncSource (e.g. PIM SyncSource) can be developed using a three layer architecture </li></ul>The SyncSource layer implements all methods prescribed by the SyncSource interface. It manages the SyncItem/SyncItemKey objects and converts them into “Foundation PIM objects” The Manager layer wraps/unwraps the “Foundation PIM objects” with additional backend-oriented data. The DAO layer manages the operations on the BackEnd
  40. 40. Hands-on <ul><li>The schema </li></ul><ul><li>of the </li></ul><ul><li>OX Connector </li></ul>
  41. 41. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  42. 42. Listener Service <ul><li>The “listener” service is a java process and is not deployed in the DS Server container (i.e. Tomcat) </li></ul>
  43. 43. Listener Service <ul><li>The “listener” enables the PUSH feature of the Funambol platform. </li></ul><ul><li>The “listener” component is not a part of the Module, but can complete the feature of a Connector included in the Module </li></ul><ul><li>- PIM Listener: the PIM sync process do not dependes on this component </li></ul><ul><li>- INBOX Listener: the EMAIL sync process depends on this component </li></ul>
  44. 44. Listener Service <ul><li>Listening systems: </li></ul><ul><li>- polling system: the listener polls the back-end system with a given period in order to check the changes of the status of the sync'ed entity. </li></ul><ul><li>- notifiable system: the listener waiting for a massage from the back-end system when the status of the sync'ed entity changes. </li></ul>
  45. 45. Listener Service <ul><li>.. so the “listener” monitors when the status changes. </li></ul>notification
  46. 46. Listener Service <ul><li>The “listener” uses the “Push framework” developed by Funambol. </li></ul><ul><li>This is out of scope of this presentation, but remember to take a look at that component if you want to implement a good “listener” </li></ul>
  47. 47. Index <ul><li>DS Server </li></ul><ul><li>Extending the DS Server </li></ul><ul><li>SyncSource </li></ul><ul><li>Configuration Panels </li></ul><ul><li>Officer </li></ul><ul><li>Hands-on </li></ul><ul><li>Listener Service </li></ul><ul><li>Conclusion </li></ul>
  48. 48. Conclusions <ul><li>Connector </li></ul><ul><li>- SyncSource (Files, PIM, Email, ... ) </li></ul><ul><li>- Configuration Panel (Connector and SyncSource) </li></ul><ul><li>- Officer </li></ul><ul><li>Listener </li></ul><ul><li>- polling </li></ul><ul><li>- notifiable </li></ul>
  49. 49. Conclusions <ul><li>.. and now Happy Hour </li></ul><ul><li>After sniper session (sigh) </li></ul>
  50. 50. The End