users
[Top] [All Lists]

Re: [cinjug-users] Messaging At the Web Layer

To: CinJug <users@xxxxxxxxxx>
Subject: Re: [cinjug-users] Messaging At the Web Layer
From: Mike Mills <mike@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Oct 2007 23:57:37 -0400
Delivered-to: mailing list users@xxxxxxxxxx
In-reply-to: <6a216ba20710231342s6eefc439qfad56bd3269143dd@xxxxxxxxxxxxxx>
Mailing-list: contact users-help@xxxxxxxxxx; run by ezmlm
Organization: Mike Mills Consulting, Inc.
References: <6a216ba20710231235h730074f7ma164455e7bb8307a@xxxxxxxxxxxxxx> <1e5a35690710231243x1bafa16bm8bdff997274a39f3@xxxxxxxxxxxxxx> <6a216ba20710231342s6eefc439qfad56bd3269143dd@xxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)
You mention that you are using Hibernate, so it seems to me that your MDB would just need to grab your Hibernate Cache object and clear it? For clustering, you would do the same thing using topics (message sent to each container in the cluster.)

Other ideas also come to mind, but it is hard to say without more information. From what I've read, you have multiple Google Earth users requesting up-to-date KML file(s) from your server application. However, it isn't clear whether the KML is per-user or the same for everyone. Also, it isn't clear how often the KML is actually updated (you say that the polling from Google Earth is frequent, but how often do changes occur?) If changes are frequent (which would invalidate the cache), then I might want to consider the possibility of eliminating database access from the web application. Related to this, if the data is specific to each user, then you wouldn't want to clear the whole cache on a user-specific update. So lots of ideas come to mind, from choosing an appropriate cache provider for Hibernate, to pushing (background-generated) static content to the web server, etc.

--
Mike Mills
mike@xxxxxxxxxxxxxxxxxxxxxxx



Edward Sumerfield wrote:
If you are using the term "business layer" to refer to the EJB container then I would have to ask how I should do that?

We are using Spring/Hibernate in our MDB so I wonder if I could configure a distributed cache, make the web layer get it's data from a session bean and then use normal EJB hosted MDB's to invalidate the cache as needed?

On 10/23/07, *josh marotti* <marotti@xxxxxxxxx <mailto:marotti@xxxxxxxxx>> wrote:

    I'm no architect, so I am asking this out of curiosity and for my own
    knowledge :

    Why can't the caching and JMS be pushed down to the business layer
    instead of the web layer?

    Thanks,
    Josh

    On 10/23/07, Edward Sumerfield <esumerfd@xxxxxxxxxxxxxx
    <mailto:esumerfd@xxxxxxxxxxxxxx>> wrote:
    > I am considering implementing a JMS messaging container at the
    Web layer.
    > Tell me I am a fool? :-)
    >
    > I have a simple web app polled by a client every second for its
    data. Not
    > wanting to hit the database for every client, every second, it
    is cached at
    > the web layer.
    >
    > Enter JMS. We will be receiving notifications of changes to the
    database
    > data via JMS messages. So MessageDrivenBeans, deployed to JBoss EJB
    > container will receive these messages but what should they do to
    tell the
    > cache in the Web container to update.
    >
    > It seems my options are to push the cache to a java space
    somewhere so that
    > the web layer and the MDB's can access it or to move the
    messaging container
    > to the web layer.
    >
    > Thoughts?
    >
    > Ed
    >
    >




--
Ed


<Prev in Thread] Current Thread [Next in Thread>