Dan Price wrote:
On Wed 25 Feb 2009 at 09:31AM, Manpreet Singh wrote:
1) If any two (same or different) IPS commands were run in separate
terminals at the same time on the same image, will the image
integrity be maintained?
2) If 1 is true is it true beyond just the CLI interface and at the
API level? (Meaning CLI is not just doing some simple locking
itself.)
3) If 2 is true, is it safe at thread re-entrancy level i.e. same
process using the API in different threads on the same image.
4) Are there any recommended best practices for concurrent use?
In addition to Danek's response, I would ask: What are you trying to do?
Do you have requirements in this area?
-dp
UC2 GUI handles multiple user images. Each UC2 GUI's 'image' has three
views that the user can switch amongst
1) Available Component
2) Available Updates
3) Installed Components
When the user clicks on view 1 for an image x, the catalog fetch from
the remote repos starts. This takes certain amount of time and while
that is happening the user can do nothing but wait. The application is
pretty much locked.
So, we put the catalog fetches etc. in a separate thread from the UI.
But for the same image a, if the user wanted to switch to view 2
the same kind of fetches would happen in the same area at the same time
if the first operation is not complete. So, if pkg api is not doing any
locking, we have to do something to avoid races and so on.
Additionally, we have a notifier app always running in the background
which fires up catalog/manifest fetches from time to time to check
for updates. This may happen even when the main GUI is doing any
operation on the image. So these two need to be synchronized in their
access to the same image.
We will soon have another Updates Manager UI which will be
competing with these two previous apps for access to the same
images too.
All this is much more easily and solved for IPS API clients, IMHO,
if this mutual exclusion happens at pkg API level.
So the requirement would be to let the clients 1) lock a certain image
(the .org.opensolaris.... area) 2) explicitly 3) optionally with a
specifiable lease period.
Thanks
-manpreet
--
Any similarities between what I say and what I mean are purely
coincidental.
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss