• Home
  • About
  • Sample Apps
  • Videos
  • Jazoon ‘09: Offline Hibernate

    Session title: Convenient Disconnected Mode for your Rich Java Application
    Speakers: David Bernhard und Philipp Oser, ELCA

    Szenario: Rich Java Client and app on app server -> work offline without the app on the server. Offline with part of data and syncronize

    Working offline is wished for in a lot of client – server applications. This talk presents a possilbe solution for this problem.

    The hibernate offliner needs a local database and a local persistence framework (here hibernate, but not necessarily) on the client. On the server side two additional db tables are needed to store the mapping information for the remote and local objects.

    Basically the hibernate offliner works as follows:
    To start working offline, the user extracts some part of the data from the database and transfers it to the local database on the client.

    In this process the mapping information is stored on the remote database. It consists of the remote key and the local key.
    After working offline and going online again this data needs to be synchronized. That’s done by fetching the original remote key with the local key and then insert the data remotely. So for the remote db it’s the same thing as working without offliner.

    Object graphs are a bit more complicated they use a graphwalker to make sure that a parent can only be offlined if all of its children are correctly processed.

    Offliner does this by first checking the changes on the client side and insert them into the real database. Then it checks for changes on the server database. What happens to conflicts?

    To identify conflicts version info and optimistic locking is used. When conflicts occur all conflicts are returned. Object graphs can only be processed if no child has a conflict. Conflicts need to be resolved manually by the user. Similar to well known version controls. Force operations exist.

    Limitation:

    • works only with fat clients -> application logic needs to be on the client
    • only a prototype not ripe
    • two set of keys (e.g. positive and negative)
    • not all of hibernate features are available
    • Offliner cannot guess pointers to the offlined objects

    Conclusion: Interesting approach but the restriction to fat clients is kind of disappointing.

    1 Comment »

    1. Mohammed Ali Khan said,

      November 11, 2009 @ 11:12 am

      i have studied a lot on hibernate offliner an the EL4J framework but failed to implement even a simple \

    RSS feed for comments on this post · TrackBack URI

    Leave a Comment

    This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

    You must read and type the 5 chars within 0..9 and A..F, and submit the form.

      

    Oh no, I cannot read this. Please, generate a