hibernate - Strategies for Java ORM with Unreliable Network and Low Bandwidth -


i looking @ hibernate system needs work in unreliable network. there single central database need read-write access to, available on pretty patchy wi-fi network. in addition, there may power losses not shutdown application cleanly, solution must have persistent cache can survive power-cycles. lastly embedded system modest memory, , disk space example doing full blown replication of database not feasible strategy.

i have basic understanding of hibernate 2nd level caching, , wondering if possible configure ehcache solve problem, main thrust of seems performance not availability, not aware of pitfalls might be.

i quite willing consider other strategies involve replication local database. rather not have of heavy lifting myself implement this.

looking experience or possible alternatives.

"in addition, there may power losses not shutdown application cleanly, solution must have persistent cache can survive power-cycles."

you have solution in mind hibernate level 2 cache. didn't real requirements. have unrealiable network. that's ok, have unrealiable power supply. that's ok too. level of service want achieve ? acceptable or not ?

is data loss acceptable ? how accept ? risk accept ?

to more explicit, let have local replica of database or @ least part of it. let know how queue/save modification made locally. let store theses modification on harddrive safe in case of power failure. let able merge changes main database when connection avaialable again.

that's lot of assumptions. ok happens if 1 harddrive fail after powerfailure ? know harddrive don't power failure , tend corrupted on power failure or can damaged ?

so put on raid, , add uninterruptible power supply. that's nice. detect power failure event os. finish current transaction , correctly shutdown. raid protect disk failure.

ok, happens if whole computer stop functionning ? happens in case of fire ? or water damage ? disk managed, data unrecoverable , not synchronized central database lost. acceptable or not ?

even when wifi on, power supply work perfectly... reliability of central database anyway ? have regular backups ? or clustering solution ? sure central database reliable anyway ?

from database point of view, easy use cluster or backup , use transactions ensure dataconsistency. can still loose data (if not using cluster in particular), should able recover last backup exemple.

but if want work offline (with database not available), , not 1 can modify database, conflicts occurs. no longer cache, hibernate or technical problem.

this functional problem. when several modifications occurs offline , have merge ? acceptable ? not. might on reconnect, recent change apply, older changes discarded. or ptential conflicts detected , prompts user deal them. can try apply queued change , apply of them...

i tend consider can offer "offline mode" users must aware offline, , should have notification when change being made permanent on central database eventual conflict resolution. point of view.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -