Hi Ivo,

2011/10/19 Ivo Ladage-van Doorn <[email protected]>:
>
> Does anyone have any experience with this? I tried the ‘starting agents
> after JVM startup’ approach described on
> http://download.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html
> , but the OSGi classloader simply does not invoke my static agentmain (I
> modified the jamm jar to test that).

No experience with this and it would be fun to see if this actually
works. However, at the same time I am almost certain we should not
allow this because it breaks close to all the rules about lifecyle
(how do you top/uninstall an agent?), and modularity(how do you run
diff versions of the same agent?) OSGi gives us and is an inherent
threat to stability/security (The agent runs in JVM process space and
can do anything) and compatibility (It is not a mandatory JVM feature)
of the system.

As Marcel mentions in the related AMDATU issue (see [0]) I agree at
this point we should seriously consider forking cassandra instances in
a private VM outside. Not to say that this is trivial, but as all
communication is thrift anyway it should not be very hard either. I
see the following pros and cons:

Pros:
1) Amdatu Cassandra can not handle the service lifecycle or
configuration updates properly (and thus is not provisionable).
Forking a private VM and controlling that from the service lifecycle
solves this.
2) Amdatu Cassandra needs an agent which appears not desirable in an
AMA. Forking a private VM and controlling that from the service
lifecycle solves this.
3) Amdatu Cassandra has specific memory and gc requirements for
optimal performance. Forking a private VM means decouple memory and GC
that you can optimize.
4) Amdatu Cassandra currenlty system exits the entire AMA in case of
for example a configuration problem. Forking a private VM and
controlling that from the service lifecycle solves this.

Cons:
1) Forking a private VM means 2 Xms/Xmx heaps possibly causing higher
ram requirements for small systems.
2) Forking a private VM means you need to monitor it and account for
ghosts after an ama crash.
3) Forking a VM means you need a known VM on the AMA node or
provisision it yourself.

Again, not sure this is trivial if you want to do it right but
Cassandra simply is anti OSGi by design. Either we need to fix
Cassandra, but the easier way may be this one.

Regards,
Bram

[0] http://jira.amdatu.org/jira/browse/AMDATU-455

_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers

Reply via email to