Re: SmartFrog question...

"Kevin Jackson" <[email protected]> Thu, 17 May 2007 17:33:47 +0700
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
Hi Steve,

> Kevin,
> You are welcome to send sf support calls to me at work. I'd recommend
> you get on the smartfrog dev or support mail list, because there are
> other people who can answer them too.

ok, I'm just getting subscribed now.
> aah, that's my code isnt it? Its not really beta, its got tests, its got
> source, just not enough docs. Actually there is some ivy stuff that's
> new and testless, but that's just a different layout policy...all the
> underlying code is the same.
>
> -the Library stuff can pull stuff down from local or remote
> repositories, using any policy to describe remote stuff, and the same or
> a different policy for local file layout. That lets me fetch from m2,
> store under ivy, etc.
>
> -you can tweak caching policy to control how often we look for updated
> artifacts
>
> -you can make the download synchronous or async. Async stops your
> deployment blocking for a while, but makes it harder to wait for the result
>
> -you set a destination in the copyTo attribute (either a path or a ref
> to a FileUsingComponent), to where the artifact will be copied on
> deploy. so even with an async download you can trigger a synchronous copy.
>
> -the maven2 library defaults to using the ibiblio repository, but can be
> set up to use a local file or http repository. Setting up an m2
> repository with the jetty component should be pretty simple, even if I
> haven't set up an example of that yet.
>
>  > the way around this problem is to setup a private maven repo which
>  > includes all our custom jars and then get SmartFrog to use that
>  > instead of the ibiblio repo.
>
> 1. You may be able to use it alongside the main one; I will check.
> 2. we support filesystem repositories too -if you have a shared FS then
> stuff is simple.
>
> ***Tell me where your local repo is (in the filesys or HTTP) and I will
> do an example library configuration to retrieve from it**

Ok, here's a bit more detail on the setup.

My PC (client) has a local m2 repo ~/,m2/repository.... in Vietnam
behind a NAT style ADSL connection (not a static IP - this I guess
will be the main showstopper)

The server (Fedora core6) with no m2 repo based in US - has static IP/hostname

So the problem is :
-when I test SmartFrog locally (run sfDaemon on my PC and then run the
sfStart localhost...), everything is fine as the m2 repo is resolved
locally and sf discovers the custom JDBCRealm jar and deploys it to
TC6/lib correctly (great!)

-when I test sf connecting to the server (run sfDaemon on the server,
then run sfStart <server> ...), sf first looks for
/home/root/.m2/repository, fails to find it then downloads the jdbc
drivers jar from ibiblio and installs it in a newly created m2 repo,
then falls over when it looks online for my custom JDBCRealm.

My guess is that if I had a static IP I could run a http accessible
repo that the server could connect to, to retrieve the custom jars.
Without that static IP address I think I'm screwed as I cannot see a
way that the server can 'fetch/get' from my PC - if there was a way
for me to 'push' to the server that would be great.

>  > Another option would of course to setup SmartFrog so that the required
>  > jars are copied over to the server first via Ant's <scp> and then
>  > SmartFrog won't need to download them.
>
> 1. We tend to use network shares, but it does rely on the shares having
> the same name everywhere.
>
> 2. Smartfrog daemons themselves support an RMI-style network
> classloader, so you can force download new components by deploying a
> component descriptor with an sfClasspath attribute ...all things that
> are deployed from that level down get the new classpath. This lets you
> do dynamic component deployment, but doesnt help with setting up TC6.
>
> 3. There's a LocalFilestore component, with an implementation behind it:
> org.smartfrog.services.filesystem.filestore.LocalFilestore
>
> This is something I've used for long-haul publishing, where you push up
> an artifact with metadata and a URI, and it gets saved at the far end
> (RMI isn't the long haul API used, some SOAPy thing BTW). So you can
> store stuff locally.

This may be what I need to use as I don't think that the server will
be able to get from my PC.

>
> I could imagine a component that is a bit like this that lets you
> publish stuff to a local library cache. I say imagine as it isnt there
> yet and I am not going to write it this week -I'm trying to get a
> release out the way and I've been building a pretty complex process
> using ivy and izpack, and now people want RPMs. your .deb antlib will
> come in handy in future too.

OT:
I was looking at izpack the other day - it's LGPL right?  Can we use
that with Ant (the wiki mentions providing an izpack distribution)?  I
guess we can, but I'm not a license guru.

> We encourage users, and on the mail lists provide free support to
> internal and external customers. Your use of the tool is appreciated.
> Part of our team (Ritu and Kumar) are in India, which is closer TZ-wise
> to your place of employment.
>
> also, we caught a presentation at apachecon that mentioned a POJO API
> for managing Tomcat 6, though I havent seen the details yet...it should
> be something we can manage directly. Otherwise there is the JMX component.
>

On the conference side of things, my Uni has just told me that from
next January I have funding to attend conferences (upto a certain
amount), so I should be available for more apache related activities
when that comes through - as a new Lecturer I don't have access to
these funds (which sucks, but never mind).

BTW, last week were you at Manchester Uni for a grid computing
conference?  I haven't seen the place for too long - hope to get back
to visit this summer.

Thanks for your help,
Kev

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/