karaf best practices: bundle hot swap?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

karaf best practices: bundle hot swap?

Andrei Pozolotin
Hello;

so that I do not re invent the wheel,
I hope there is a write up on the web somewhere, something like:

"karaf best practices: bundle hot swap"

to address questions like:
* does file install / deploy work for this?
* how about feature:install?
* should I use external ssh/scp with file install?
* should I use embedded ssh/scp with file install?
* which approach properly handles bundle life cycle, update/refresh?
* which approach properly handles osgi scr bind/unbind & activate/deactivate?
* how do I test bundle hot swap in karaf properly?
* etc.

can you please share some pointers?

Thank you,

Andrei.

Reply | Threaded
Open this post in threaded view
|

Re: karaf best practices: bundle hot swap?

Achim Nierbeck
Hi Andrei, 

what is your use-case for hot-swap?
What do you mean by this?

If you want a hotdeployment - yes it's fileinstaller that does the job for the deploy folder
if you want to update a bundle that is installed from a maven url for example, 
just do a update on the bundle Id in the shell and you'll be fine. 
If you're developing you have the command dev:watch id and it'l update your bundle as soon as it's
installation source is updated (e.g. from a maven url)

Regards, Achim 

2011/11/30 Andrei Pozolotin <[hidden email]>
Hello;

so that I do not re invent the wheel,
I hope there is a write up on the web somewhere, something like:

"karaf best practices: bundle hot swap"

to address questions like:
* does file install / deploy work for this?
* how about feature:install?
* should I use external ssh/scp with file install?
* should I use embedded ssh/scp with file install?
* which approach properly handles bundle life cycle, update/refresh?
* which approach properly handles osgi scr bind/unbind & activate/deactivate?
* how do I test bundle hot swap in karaf properly?
* etc.

can you please share some pointers?

Thank you,

Andrei.




--

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>
Reply | Threaded
Open this post in threaded view
|

Re: karaf best practices: bundle hot swap?

Andrei Pozolotin
Achim:

-------- Original Message  --------
Subject: Re: karaf best practices: bundle hot swap?
From: Achim Nierbeck [hidden email]
To: [hidden email]
Date: Wed 30 Nov 2011 12:02:35 PM CST
Hi Andrei,
thanks for getting back


what is your use-case for hot-swap?
What do you mean by this?
my use case is
* highly available
* real time
* event processor
where I can update a bundle or a feature on the fly,
w/o downtime / delays;


If you want a hotdeployment - yes it's fileinstaller that does the job for the deploy folder
if you want to update a bundle that is installed from a maven url for example, 
just do a update on the bundle Id in the shell and you'll be fine. 
If you're developing you have the command dev:watch id and it'l update your bundle as soon as it's
installation source is updated (e.g. from a maven url)
great ideas; I will follow up;


Regards, Achim
I noticed you use this picture
   http://en.wikipedia.org/wiki/Marvin_the_Paranoid_Android
for your logo
   https://github.com/ANierbeck
here is one more karaf evaluation question:
   is this because karaf is making you depressed? :-)

Cheers,

Andrei


2011/11/30 Andrei Pozolotin <[hidden email]>
Hello;

so that I do not re invent the wheel,
I hope there is a write up on the web somewhere, something like:

"karaf best practices: bundle hot swap"

to address questions like:
* does file install / deploy work for this?
* how about feature:install?
* should I use external ssh/scp with file install?
* should I use embedded ssh/scp with file install?
* which approach properly handles bundle life cycle, update/refresh?
* which approach properly handles osgi scr bind/unbind & activate/deactivate?
* how do I test bundle hot swap in karaf properly?
* etc.

can you please share some pointers?

Thank you,

Andrei.




--

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>

Reply | Threaded
Open this post in threaded view
|

Re: karaf best practices: bundle hot swap?

Achim Nierbeck
Hi Andrei, 

2011/11/30 Andrei Pozolotin <[hidden email]>
Achim:

-------- Original Message  --------
Subject: Re: karaf best practices: bundle hot swap?
From: Achim Nierbeck [hidden email]
To: [hidden email]
Date: Wed 30 Nov 2011 12:02:35 PM CST
Hi Andrei,
thanks for getting back



what is your use-case for hot-swap?
What do you mean by this?
my use case is
* highly available
* real time
* event processor
where I can update a bundle or a feature on the fly,
w/o downtime / delays;



Another possibility is to use OBR while installing. You might also consider using Cave, it could also help you with the updates, see [1] for it. 

btw. OSGi is designed for the usecase of updating / upgrading your bundles without down-times (or minimum down-times while upgrading)

 

If you want a hotdeployment - yes it's fileinstaller that does the job for the deploy folder
if you want to update a bundle that is installed from a maven url for example, 
just do a update on the bundle Id in the shell and you'll be fine. 
If you're developing you have the command dev:watch id and it'l update your bundle as soon as it's
installation source is updated (e.g. from a maven url)
great ideas; I will follow up;


Regards, Achim
I noticed you use this picture
   http://en.wikipedia.org/wiki/Marvin_the_Paranoid_Android
for your logo
   https://github.com/ANierbeck
here is one more karaf evaluation question:
   is this because karaf is making you depressed? :-)


Not at all, just not being able to use it all the time makes me depressed :-)


Regards, Achim 

 
Cheers,

Andrei



2011/11/30 Andrei Pozolotin <[hidden email]>
Hello;

so that I do not re invent the wheel,
I hope there is a write up on the web somewhere, something like:

"karaf best practices: bundle hot swap"

to address questions like:
* does file install / deploy work for this?
* how about feature:install?
* should I use external ssh/scp with file install?
* should I use embedded ssh/scp with file install?
* which approach properly handles bundle life cycle, update/refresh?
* which approach properly handles osgi scr bind/unbind & activate/deactivate?
* how do I test bundle hot swap in karaf properly?
* etc.

can you please share some pointers?

Thank you,

Andrei.




--

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>




--

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>
Reply | Threaded
Open this post in threaded view
|

Re: karaf best practices: bundle hot swap?

Andrei Pozolotin
Achim:

wow, cave sounds cool;

thank you for pointing out;

Andrei.

-------- Original Message  --------
Subject: Re: karaf best practices: bundle hot swap?
From: Achim Nierbeck [hidden email]
To: [hidden email]
Date: Thu 01 Dec 2011 01:52:26 AM CST
Hi Andrei, 

2011/11/30 Andrei Pozolotin <[hidden email]>
Achim:

-------- Original Message  --------
Subject: Re: karaf best practices: bundle hot swap?
From: Achim Nierbeck [hidden email]
To: [hidden email]
Date: Wed 30 Nov 2011 12:02:35 PM CST
Hi Andrei,
thanks for getting back



what is your use-case for hot-swap?
What do you mean by this?
my use case is
* highly available
* real time
* event processor
where I can update a bundle or a feature on the fly,
w/o downtime / delays;



Another possibility is to use OBR while installing. You might also consider using Cave, it could also help you with the updates, see [1] for it. 

btw. OSGi is designed for the usecase of updating / upgrading your bundles without down-times (or minimum down-times while upgrading)

 

If you want a hotdeployment - yes it's fileinstaller that does the job for the deploy folder
if you want to update a bundle that is installed from a maven url for example, 
just do a update on the bundle Id in the shell and you'll be fine. 
If you're developing you have the command dev:watch id and it'l update your bundle as soon as it's
installation source is updated (e.g. from a maven url)
great ideas; I will follow up;


Regards, Achim
I noticed you use this picture
   http://en.wikipedia.org/wiki/Marvin_the_Paranoid_Android
for your logo
   https://github.com/ANierbeck
here is one more karaf evaluation question:
   is this because karaf is making you depressed? :-)


Not at all, just not being able to use it all the time makes me depressed :-)


Regards, Achim 

 
Cheers,

Andrei



2011/11/30 Andrei Pozolotin <[hidden email]>
Hello;

so that I do not re invent the wheel,
I hope there is a write up on the web somewhere, something like:

"karaf best practices: bundle hot swap"

to address questions like:
* does file install / deploy work for this?
* how about feature:install?
* should I use external ssh/scp with file install?
* should I use embedded ssh/scp with file install?
* which approach properly handles bundle life cycle, update/refresh?
* which approach properly handles osgi scr bind/unbind & activate/deactivate?
* how do I test bundle hot swap in karaf properly?
* etc.

can you please share some pointers?

Thank you,

Andrei.




--

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>




--

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>