Re: client-server Object Caching

2004-05-04 Thread Armin Waibel
Hi again,

Amol Pophale wrote:

...
So you use PB-api only for read-only operations and
persist objects via 
the server - right?
And on the server you don't use OJB?
Can you describe a little more?
YES U ARE ABSOLUTELY CORRECT I AM MOT USING OJB ON
SERVER SIDE.
...
I CANT FIRE QUERIES EVERYTIME ON DATABSE DIRECTLY
BECAUSE I WANT TO USE CACHE TO IMPROVE PERFORMANCE BUT
I WANT OT KNOW HOW CLIENT CAN KNOW THAT DATABSE OBJECT
IS CHANGED SO IT CAN REMOVE THAT OBJECT FROM CACHE.
I HAVE ONE SOLUTION, WHEN SERVER UPDATES DATABSE IT
SHOULD TELL CLIENT THAT I HAVE UPDATED DATABSE SO
CLIENT CAN REMOVE THAT OBJECT FROM CACHE.
HOW DO U FINFD THIS SOLUTION?
Sounds ok for me, if the number of clients is less and the frequency of 
updates is low (in other cases you need a very fast intranet and very 
performant server nodes ;-)). I don't know a better way.

Be careful with ObjectCache implementations and referenced objects. 
Currently the implemetations are quite simple and cache the main object 
with all references. Remove only remove the main object, if the same 
object was part of a collection of another main object it will not be 
removed.
I will start a new ObjectCacheImplementation in near future only holds 
Identity objects of referenced objects. Maybe you have to tweak one of 
the existing cache implementations. It is possible to refresh referened 
objects but this could lead in DB access.

regards,
Armin
ONE MORE QUESTIONS
DO U KNOW OTHER TOOL BETTER THAN THIS FOR OBJECT
RELATIONAL MAPPING?
I HAVE READ ABOUT TOPLINK FROM ORACLE, COCOBASE,
HYBERNET BUT I DONT KNOW HOW ARE THEY?
AND WHAT IS DIFF BETWEEN THEM?
IF U HAVE ANY INFO PLZ LET ME KNOW
regards,
Armin

This is my problem 

Thanks & Regards
Amol Pophale.










Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html



-

To unsubscribe, e-mail:
[EMAIL PROTECTED]

For additional commands, e-mail:
[EMAIL PROTECTED]




-

To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


	
	
		

Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: client-server Object Caching

2004-05-04 Thread Guillaume Nodet
I think the only way for the client to be aware of
server-side modifications to the database is to use
a distributed cache (OSCache, Swarmcache, jcs, ...).
The other way is, as Armin mentionned, not to
use cache at all on the client.

For other tools to do o/r mapping see
http://c2.com/cgi-bin/wiki?ObjectRelationalToolComparison

Guillaume

-Message d'origine-
De : Amol Pophale [mailto:[EMAIL PROTECTED]
Envoyé : mardi 4 mai 2004 12:14
À : OJB Users List
Objet : Re: client-server Object Caching


Hi Armin,
Thanks anyway for the reply
read inline comments with block letters.

Regards,
Amol

 --- Armin Waibel <[EMAIL PROTECTED]> wrote: > Hi
Amol,
>
> I read your previous posts carefully too, but I'm
> not sure that I can help.
>
> Amol Pophale wrote:
> > Hi All,
> > Please read carefully and suggest me solution.
> > I am working with one MNC s/w company.My
> application
> > is web-based client-server application in which
> client
> > and server are on different machines and uses same
> > database. One imp thing one client might connect
> to
> > more than one servers.Each server has one database
> > which may be on server itself or on third machine.
> > These servers stores some data in database.
> > and also send a xml copy of same data on some port
> > to client.web Clint get this data from server in
> the
> > form of xml parses this xml and creates objects
> from
> > that and stores in memory. If there are any
> changes in
> > data server notify client so client can update its
> > in-memory store.[client is not using database
> > directly (jdbc)because firing query on Database
> every
> > time is not feasible with current DB schema]But
> > disadvantage of this is, if clients connect to
> > multiple server [yes, there may be more than one
> > servers]then performance of web-server on client
> > decrease because it store data of all server in
> > memory.
> > Now we redesign the database schema and now client
> > can connect to each server's database directly
> using
> > OJB PersistanceBroker API and get data.
>
> So you use PB-api only for read-only operations and
> persist objects via
> the server - right?
> And on the server you don't use OJB?
> Can you describe a little more?
YES U ARE ABSOLUTELY CORRECT I AM MOT USING OJB ON
SERVER SIDE.
>
> > IN Object
> > cache implementation if there is some data in
> cache
> > and
> > same data get changed by server how clients knows
> this
> > change and cache can be updated?
>
> hmm, I don't recommend to use a distributed cache on
> client side this
> will be overkill if you run more than a few clients.
> If you allow direct
> access from the client to the DB I assume
> client/server/DB run in an
> intranet. Do the client have to recognize changes in
> DB immediately or
> is latency allowed? If not I recommend not cache
> data on client side or
> to use the per broker cache (cache only data within
> a transaction or
> till the PB instance was closed), otherwise you can
> use cached object
> 'timeout' property of the default object cache.
I CANT FIRE QUERIES EVERYTIME ON DATABSE DIRECTLY
BECAUSE I WANT TO USE CACHE TO IMPROVE PERFORMANCE BUT
I WANT OT KNOW HOW CLIENT CAN KNOW THAT DATABSE OBJECT
IS CHANGED SO IT CAN REMOVE THAT OBJECT FROM CACHE.
I HAVE ONE SOLUTION, WHEN SERVER UPDATES DATABSE IT
SHOULD TELL CLIENT THAT I HAVE UPDATED DATABSE SO
CLIENT CAN REMOVE THAT OBJECT FROM CACHE.
HOW DO U FINFD THIS SOLUTION?
ONE MORE QUESTIONS
DO U KNOW OTHER TOOL BETTER THAN THIS FOR OBJECT
RELATIONAL MAPPING?
I HAVE READ ABOUT TOPLINK FROM ORACLE, COCOBASE,
HYBERNET BUT I DONT KNOW HOW ARE THEY?
AND WHAT IS DIFF BETWEEN THEM?
IF U HAVE ANY INFO PLZ LET ME KNOW
>
> regards,
> Armin
>
> > This is my problem
> >
> > Thanks & Regards
> > Amol Pophale.
> >
> >
> >
> >
> >
> >
> >
> >
> >
>

> > Yahoo! Messenger - Communicate instantly..."Ping"
> > your friends today! Download Messenger Now
> > http://uk.messenger.yahoo.com/download/index.html
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>






Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: client-server Object Caching

2004-05-04 Thread Amol Pophale
Hi Armin,
Thanks anyway for the reply
read inline comments with block letters.

Regards, 
Amol

 --- Armin Waibel <[EMAIL PROTECTED]> wrote: > Hi
Amol,
> 
> I read your previous posts carefully too, but I'm
> not sure that I can help.
> 
> Amol Pophale wrote:
> > Hi All,
> > Please read carefully and suggest me solution.
> > I am working with one MNC s/w company.My
> application
> > is web-based client-server application in which
> client
> > and server are on different machines and uses same
> > database. One imp thing one client might connect
> to
> > more than one servers.Each server has one database
> > which may be on server itself or on third machine.
> > These servers stores some data in database.
> > and also send a xml copy of same data on some port
> > to client.web Clint get this data from server in
> the
> > form of xml parses this xml and creates objects
> from
> > that and stores in memory. If there are any
> changes in
> > data server notify client so client can update its
> > in-memory store.[client is not using database
> > directly (jdbc)because firing query on Database
> every
> > time is not feasible with current DB schema]But
> > disadvantage of this is, if clients connect to
> > multiple server [yes, there may be more than one
> > servers]then performance of web-server on client
> > decrease because it store data of all server in
> > memory.
> > Now we redesign the database schema and now client
> > can connect to each server's database directly
> using
> > OJB PersistanceBroker API and get data.
> 
> So you use PB-api only for read-only operations and
> persist objects via 
> the server - right?
> And on the server you don't use OJB?
> Can you describe a little more?
YES U ARE ABSOLUTELY CORRECT I AM MOT USING OJB ON
SERVER SIDE.
> 
> > IN Object
> > cache implementation if there is some data in
> cache
> > and
> > same data get changed by server how clients knows
> this
> > change and cache can be updated?
> 
> hmm, I don't recommend to use a distributed cache on
> client side this 
> will be overkill if you run more than a few clients.
> If you allow direct 
> access from the client to the DB I assume
> client/server/DB run in an 
> intranet. Do the client have to recognize changes in
> DB immediately or 
> is latency allowed? If not I recommend not cache
> data on client side or 
> to use the per broker cache (cache only data within
> a transaction or 
> till the PB instance was closed), otherwise you can
> use cached object 
> 'timeout' property of the default object cache.
I CANT FIRE QUERIES EVERYTIME ON DATABSE DIRECTLY
BECAUSE I WANT TO USE CACHE TO IMPROVE PERFORMANCE BUT
I WANT OT KNOW HOW CLIENT CAN KNOW THAT DATABSE OBJECT
IS CHANGED SO IT CAN REMOVE THAT OBJECT FROM CACHE.
I HAVE ONE SOLUTION, WHEN SERVER UPDATES DATABSE IT
SHOULD TELL CLIENT THAT I HAVE UPDATED DATABSE SO
CLIENT CAN REMOVE THAT OBJECT FROM CACHE.
HOW DO U FINFD THIS SOLUTION?
ONE MORE QUESTIONS
DO U KNOW OTHER TOOL BETTER THAN THIS FOR OBJECT
RELATIONAL MAPPING?
I HAVE READ ABOUT TOPLINK FROM ORACLE, COCOBASE,
HYBERNET BUT I DONT KNOW HOW ARE THEY?
AND WHAT IS DIFF BETWEEN THEM?
IF U HAVE ANY INFO PLZ LET ME KNOW
> 
> regards,
> Armin
> 
> > This is my problem 
> >  
> > Thanks & Regards
> > Amol Pophale.
> > 
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> >
>

> > Yahoo! Messenger - Communicate instantly..."Ping" 
> > your friends today! Download Messenger Now 
> > http://uk.messenger.yahoo.com/download/index.html
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> > 
> > 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  






Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: client-server Object Caching

2004-05-04 Thread Armin Waibel
Hi Amol,

I read your previous posts carefully too, but I'm not sure that I can help.

Amol Pophale wrote:
Hi All,
Please read carefully and suggest me solution.
I am working with one MNC s/w company.My application
is web-based client-server application in which client
and server are on different machines and uses same
database. One imp thing one client might connect to
more than one servers.Each server has one database
which may be on server itself or on third machine.
These servers stores some data in database.
and also send a xml copy of same data on some port
to client.web Clint get this data from server in the
form of xml parses this xml and creates objects from
that and stores in memory. If there are any changes in
data server notify client so client can update its
in-memory store.[client is not using database
directly (jdbc)because firing query on Database every
time is not feasible with current DB schema]But
disadvantage of this is, if clients connect to
multiple server [yes, there may be more than one
servers]then performance of web-server on client
decrease because it store data of all server in
memory.
Now we redesign the database schema and now client
can connect to each server's database directly using
OJB PersistanceBroker API and get data.
So you use PB-api only for read-only operations and persist objects via 
the server - right?
And on the server you don't use OJB?
Can you describe a little more?

IN Object
cache implementation if there is some data in cache
and
same data get changed by server how clients knows this
change and cache can be updated?
hmm, I don't recommend to use a distributed cache on client side this 
will be overkill if you run more than a few clients. If you allow direct 
access from the client to the DB I assume client/server/DB run in an 
intranet. Do the client have to recognize changes in DB immediately or 
is latency allowed? If not I recommend not cache data on client side or 
to use the per broker cache (cache only data within a transaction or 
till the PB instance was closed), otherwise you can use cached object 
'timeout' property of the default object cache.

regards,
Armin
This is my problem 
 
Thanks & Regards
Amol Pophale.

 



	
	
		

Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: client/server Object Caching [Very Urgent]

2004-04-29 Thread gfaerman
Amol,

I think you face and underlying problem related to the architecture of 
your application.
I do not know if you are familiar with the MVC pattern, but it seems 
considering applying it to your project might be of help.
The basic idea is to let the Controller in the server "talk" to the Model 
(your business objects) and to the View (your client app, where you might 
have another MVC pattern in place to handle the client stuff). In your 
client you should handle (present to the user or send to the server) just 
values (or ValueObjects if you prefer but no "business objects" or direct 
access to the database).
I´m trying to say the client app should not know anything about OJB, it´s 
just the server app the only one that actually talks to the DB using OJB 
framework in this case.

Once the controller receive from the client some data and some commands or 
actions, it should dispatch an "action", letting  your "actions", take 
care of situation like the one you are presenting (dirty objects).
We´ve done several developments applying this pattern  to Swing based 
clients app in client/server scenarios with very good results (we ´ve 
implemented in swing based solutions tons of good ideas "borrowed" from 
Apache Struts among other implementations of the MVC pattern).

Regards,
Gustavo.



Amol Pophale <[EMAIL PROTECTED]> wrote on 29/04/2004 06:30:58 a.m.:

> Hi All,
> I just learned OJB.
> I have written one application in OJB. 
> My application is client-server application in which 
> client and server are on different machines and using
> same databse which may be on third machine.
> Right now i have one query.
> server stores some java object in databse using
> PersistaceBroker APIs. Client retrives these object
> on its machine using same i.e. OJB
> Now if any object is updated by server which is in
> client object cache How can we update client object
> cache when server updates the object in database.
> Because I think server cache and client cache are
> different.
> I need this very urgent.
> 
> Thanks in advance
> Amol Pophale.
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Messenger - Communicate instantly..."Ping" 
> your friends today! Download Messenger Now 
> http://uk.messenger.yahoo.com/download/index.html
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: client/server Object Caching [Very Urgent]

2004-04-29 Thread Brian McCallister
You are effectively operating in a cluster, where your workstations are 
also cluster nodes:

http://db.apache.org/ojb/howto-work-with-clustering.html

-Brian

On Apr 29, 2004, at 7:53 AM, Amol Pophale wrote:

Hi Brain
Thanks a lot for urgent reply.
You said I need to use one of the distributed caches
(JCS, OSCache, or Coherence)
can u please tell where i can get details info about
this or if u know can u tell me by some example or
where can i get that API help etc.
I mean more detail.
Note:do u anything about PersistanceBrokerClient
class?
Thanks
Amol
 --- Brian McCallister
<[EMAIL PROTECTED]> wrote: > You need to
use one of the distributed caches (JCS,
OSCache, or
Coherence).
The other option, which tends to be the easiest, is
to use a per-broker
cache (non-distributed) and optimistic transactions,
in which case you
acknowledge that data in cache for the lifetime of
one broker (usually
short depending on how you use it) may be dirty if
ti is in contention.
This doesn't work for highly contentious data,
however.
-Brian

On Apr 29, 2004, at 5:30 AM, Amol Pophale wrote:

Hi All,
I just learned OJB.
I have written one application in OJB.
My application is client-server application in
which
client and server are on different machines and
using
same databse which may be on third machine.
Right now i have one query.
server stores some java object in databse using
PersistaceBroker APIs. Client retrives these
object
on its machine using same i.e. OJB
Now if any object is updated by server which is in
client object cache How can we update client
object
cache when server updates the object in database.
Because I think server cache and client cache are
different.
I need this very urgent.
Thanks in advance
Amol Pophale.







Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html


-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]






-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]






Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: client/server Object Caching [Very Urgent]

2004-04-29 Thread Amol Pophale

Hi Brain
Thanks a lot for urgent reply.
You said I need to use one of the distributed caches
(JCS, OSCache, or Coherence)
can u please tell where i can get details info about
this or if u know can u tell me by some example or
where can i get that API help etc.
I mean more detail.
Note:do u anything about PersistanceBrokerClient
class?
Thanks
Amol


 --- Brian McCallister
<[EMAIL PROTECTED]> wrote: > You need to
use one of the distributed caches (JCS,
> OSCache, or 
> Coherence).
> 
> The other option, which tends to be the easiest, is
> to use a per-broker 
> cache (non-distributed) and optimistic transactions,
> in which case you 
> acknowledge that data in cache for the lifetime of
> one broker (usually 
> short depending on how you use it) may be dirty if
> ti is in contention. 
> This doesn't work for highly contentious data,
> however.
> 
> -Brian
> 
> On Apr 29, 2004, at 5:30 AM, Amol Pophale wrote:
> 
> > Hi All,
> > I just learned OJB.
> > I have written one application in OJB.
> > My application is client-server application in
> which
> > client and server are on different machines and
> using
> > same databse which may be on third machine.
> > Right now i have one query.
> > server stores some java object in databse using
> > PersistaceBroker APIs. Client retrives these
> object
> > on its machine using same i.e. OJB
> > Now if any object is updated by server which is in
> > client object cache How can we update client
> object
> > cache when server updates the object in database.
> > Because I think server cache and client cache are
> > different.
> > I need this very urgent.
> >
> > Thanks in advance
> > Amol Pophale.
> >
> >
> >
> > 
> > 
> > 
> >
>

> > Yahoo! Messenger - Communicate instantly..."Ping"
> > your friends today! Download Messenger Now
> > http://uk.messenger.yahoo.com/download/index.html
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  






Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: client/server Object Caching [Very Urgent]

2004-04-29 Thread Brian McCallister
You need to use one of the distributed caches (JCS, OSCache, or 
Coherence).

The other option, which tends to be the easiest, is to use a per-broker 
cache (non-distributed) and optimistic transactions, in which case you 
acknowledge that data in cache for the lifetime of one broker (usually 
short depending on how you use it) may be dirty if ti is in contention. 
This doesn't work for highly contentious data, however.

-Brian

On Apr 29, 2004, at 5:30 AM, Amol Pophale wrote:

Hi All,
I just learned OJB.
I have written one application in OJB.
My application is client-server application in which
client and server are on different machines and using
same databse which may be on third machine.
Right now i have one query.
server stores some java object in databse using
PersistaceBroker APIs. Client retrives these object
on its machine using same i.e. OJB
Now if any object is updated by server which is in
client object cache How can we update client object
cache when server updates the object in database.
Because I think server cache and client cache are
different.
I need this very urgent.
Thanks in advance
Amol Pophale.






Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]