>OK, so if you are running Swing, I guess all your clients are on different
computers. But are they in >the same network? Can the clients talk to each
other? What security implications does this have?
>Just to doublecheck, you are talking about separate client applications
running on different client >machines?
Yes, the clients are separate applications running on different machines.
They are all on the same network at this point as even the remote clients
use vpn to access the server. Security is not really a concern beyond
logical security which is already built into the application itself. Each
client establishes a channel and creates a context upon login and then
re-uses that context throughout the session calling commits and rollbacks,
etc, but otherwise, holding on to the same context. Is this the correct
design or should I be creating a new context prior to each commit?
I guess there is nothing stopping clients from talking to each other, but it
sounds to me like that would get hairy. It'd be simpler to have the server
manage freshness.
>Would a periodic refresh be enough? Or do you need to send an event to the
client? Can the server >contact the client directly or does the client need
to poll for changes?
It's an application which helps track orders and inventory and when someone
makes an update to an order, it needs to be visible to everyone else lest
mistakes be made. So a periodic refresh would need to be very frequent.
Otherwise, I have control over the clients and server and can make them
communicate whichever way.
I did some additional testing today and noticed some patterns:
- When I use DataObjectUtils.objectForPK() to find an object, I get a stale
version.
- When I run a SelectQuery, I DO get an updated version.
- In all circumstances, 1-many relationships are not updated. The specific
issue my users have is one person will add line items to an order (there is
a 1-many relationship between order -> lineItem) and nobody else can see the
line item added unless they shut down the client and restart it. Same goes
for deleting a line item.
>Such synchronization works and is a part of the ROP design. It requires a
setup of a
>communication channel from the server to each client to be able to do
server "push". In the past I
>used XMPP connection for that purpose (see example web.xml declarations
here:
>http://cayenne.apache.org/doc/remote-object-persistence-cws-deployment.html ).
This requires
>running a separate XMPP server, but otherwise works nicely.
I added the configuration to my web.xml but I don't notice a difference.
What does the server actually send to the client? Is there a way to check
that it's doing it?
Thanks for your support and help on this. I really appreciate it and hope I
can come up with a solution as I am a bit in a crunch trying to go live but
hitting this.
On Fri, Feb 13, 2009 at 2:30 AM, Andrus Adamchik <andru..bjectstyle.org>wrote:
>
> On Feb 13, 2009, at 7:43 AM, Tarik Cherkovi wrote:
>
> How are people getting around it if at all?
>>
>
> Just to doublecheck, you are talking about separate client applications
> running on different client machines?
>
> Such synchronization works and is a part of the ROP design. It requires a
> setup of a communication channel from the server to each client to be able
> to do server "push". In the past I used XMPP connection for that purpose
> (see example web.xml declarations here:
> http://cayenne.apache.org/doc/remote-object-persistence-cws-deployment.html ).
> This requires running a separate XMPP server, but otherwise works nicely.
>
> A different transport can be plugged in, such as JGroups multicast if all
> clients are on the same network, or Jetty 6 continuations, servlet 3.0 async
> communication. (I very much like to investigate the last option with Jetty
> 7, just didn't have an occasion yet).
>
> Hope this helps.
> Andrus
>
This archive was generated by hypermail 2.0.0 : Fri Feb 13 2009 - 10:05:04 EST