java - transfer and cache versioned object file -


problem definition:

the project setup uses gwt on client side , spring on server side there object tree of 100 objects. object describes complex config file linked 1 user. object has persisted on server side , can requested client. both client , server can access methods , fields in object. once requested client, object tree cached. object can modified client , server. if file modified server, client downloads new version. should easy add functionality config object i.e. increasing version number , adding objects tree. config file project file saves changes user did make project is. config file altered regularly (every 3 seconds) user. compare example gimp project / powerpoint file.

current architecture:

the server stores config file in xml format. when config requested, converted java object send server client using requestfactory (gwt). client can modify object , changes send server. when client done, server saves new object replacing old xml file. client caches java object using hml5storage (gwt). 5mb limit not problem. when new version of object created @ server, e.g. new object type added tree, client downloads new object tree , discards old one.

questions:

  • is way approach problem?

maybe should send xml file directly server client on initialisation. modify file client , send server when done. client store xml file in hml5storage. maybe there odd choices can point out.

  • is there better format store data server side instead of xml?

i chose xml because has libraries allow mapping of java objects xml file , allows adding additional functionality easily. data linked 1 user , data isn't used otherwise. seams bad idea store in relational db , combine objects in tree (this take long assemble).

  • is requestfactory initial download of object tree?

i've read cases requestfactory take long time download big list of objects. (x 10 in time compared rpc).

if made point , isn't clear, i'm happy add details needed.

is way approach problem?

preloading object on login idea. better 1 break object tree small parts , load each of them on request, when user need edit specific part of config. assumes instead of providing single view edit config properties "organized" many separate forms, request part of config need when appropriate. it'll need work architectur more maintainable if object changes later.

i don't think doing since transform object tree (i understood big java object) xml, instead of sending object client right away. gwt rpc handle serialization/deserialization (actually using json instead of xml). isn't easier manipulate plain java object xml (even libraries) ?

is there better format store data server side instead of xml?

i use json. has libraries. use xml when human need read file directly.

but don't see why need either of them. gwt rpc mechanism serialize java object json automatically. provide "shared" object , (if needed) converter convert object tree shared form , back.

is requestfactory initial download of object tree?

as xml takes more space json , manipulating xml slower manipulating java object, advice use rpc.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -