Shallow vs. Deep Clone... Getting in Deep

I have created a custom "Node" class to be used in my JTrees. The class is called "KataNode" ... cuz my name is "K"urt .. they represent "Data" and the class extends DefaultMutableTree"Node" ... clever name huh? Anyway, I would like to create clones or copies of some selected nodes ... which may or may not have children in the JTree (also KataNodes), to be moved elsewhere ... like into another tree... without messing up the "original nodes". The documentation for Object.clone() in the Object class, states that the method that I am actually calling... ...(meaning the one that was overwritten by DefaultMutableTreeNode)... is actually going to only provide me with a shallow clone .. hence the resulting cloned node "on the surface" is actually a good copy ... but its underlying children refrences remain pointing to ... NOT new clones .. but the original children nodes of the "original parent". In other words... I am attaining a "shallow" clone (as noted via the documntation in the Object class) Thus my plan is: (.. and please comment / criticize it)Create some sort of recursive clone method to create "Deep" clones of my custom Nodes ... with refrences to children clones as well.
However .. upon further inspection of the documentation for the Object.clone() method, it suggests an interface "Cloneable" ... however this interface has no method declairations in it. Thus my first question is: Does "implementing Cloneable" simply mean that you overwrite the "clone()" method? ... and if that is the case .. then can I correctly assume that any class that "implements Cloneable" will handle making either a "shallow" or "deep" ... or even "semi-shallow" clone, respective to the class context .. right?
My last question is: What is the"depth" of the DefaultMutableTreeNode.clone() method? The documentation states only "primitives fields" and "immutable object references" are granted new instances during a clone() call. What about things like ... elements of a Vector .. for instance? ...which my KataNode class maintains ... would I need to clone those as well? My guess is yes, I would need to copy that manually for a successful "deep" clone. I would like to verify that answer with a second opinion .. if I could.
If that didn't make sense .. please let me know and I'll reword it. But for now .. any thoughts, comments, suggestions etc. on the topic are greatly encouraged.
Thanks in advance ... Kurt

This is the JNI forum. I don't believe your post fits.
then
can I correctly assume that any class that
"implements Cloneable" will handle making either a
"shallow" or "deep" ... or even "semi-shallow" clone,
respective to the class context .. right?
It probably does something. The implementor might not have implemented anything though. And you have no idea what they implemented.
No idea about your other question.
You might want to think carefully about why you are cloning though.

Similar Messages

  • Deep and Shallow array copy  again

    I am a Computer Analyst and a Java tutor.
    I am trying to understand the terms Shallow and Deep copy
    for arrays, using an example.
    Can you please tell me if my shallow and deep copy below is correct?
    Does the shallow copy not need any memory allocation?
    public Security( int paramAccountNumbers[], String paramPasswords[] ){
    String passwords[];
    int accountNumbers[];
    // INT ARRAY SHALLOW COPY
    accountNumbers = paramAccountNumbers;
    // STRING ARRAY DEEP COPY
    passwords = new String[paramPasswords.length];
    for( int i=0; i<paramPasswords.length; i++ ){
    passwords[i] = paramPasswords;

    You should use clone to copy arrays that contain only references to immutable objects or primitives.
    // "shallow" copy
    final String[] orig = new String[] {"a", "b", "c"};       
    final String[] copy = orig.clone();
    // or java 6 "shallow" copy
    final String[] orig = new String[] {"a", "b", "c"}; 
    final String[] copy = Arrays.copyOf(orig, orig.length, String[].class);If the array contains references to mutable objects you need to clone each element in the array
    // "deep" copy
    final Date[] orig = new Date[] {new Date()};
    final Date[] copy = new Date[orig.length];       
    for (int i = 0; i < orig.length; i++) copy[i] = (Date) orig.clone();However even this may not be sufficient in some cases, which is why cloning is a bit of a minefield.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Reentrant shared clones between instances Memory Usage

    Hi guys. 
    I have a question on the Reentrant shared clones between instances. 
    I understand the concept of Reentrant shared clones between instances, Next clone get into the memory after a clone get out the memory. 
    My question is that how many instances of clone can run simultaneously?  How much memory is allocate for Reentrant shared clones between instances?
    If I use call Vi by reference as show in the the figure, will it open more than one VI and keep it in the memory. 

    You might be just a bit confussed about clones, clone pools, and that option 0x80 setting. 
    Your code as written will cause an error to subsequent calls unless the vi has finished first.
    Combining the 0x80 flag with ox40 prepares the vi to be called reenterant so each call to the modified vi will casue one dataspace to be checked out of the clone pool.  The default is one dataspace per core in the clone pool, that can be increased (but not decreased) with the populate async call pool method. 
    Each time that sub vi runs another dataspace is checked out of the clone pool.  If none are avalable additional dataspaces are created on the fly. this takes time you will notice. 
    The sub-vi is responsible for returning the dataspace to the clone pool when it finishes.
    As far as how many can be in memory at one time.  how much memory can your application access and how much memory does your vi's dataspace take?
    Jeff

  • Clone Image

    Hi,
    I want to know how i can clone an object java.awt.Image since this class does not implement cloneable interface. I want to specify that i don't have access of BufferedImage, but i can use PixelGrabber. Is there any way with PixelGrabber to construct an new image?
    Thanks for any help
    Message was edited by:
    Div4zion

    I finaly found the solution!!!! For those who are interested, here is the solution
    I used MemoryImageSource and PixelGrabber to create a new Image like this
    Image img = createImage(new MemoryImageSource(w, h, pix, 0, w));
    where pix is the Array of all pixel of my Image to clone get with PixelGrabber.

  • Calling A Super Method Externally

    Hi,
    I would like to call an overridden method, a super method, of an object externally. I thought all I needed to do was:
    1. get the java.lang.Class object of the super class where the original method was declared and implemented.
    2. get the appropriate java.lang.reflect.Method object from the Class object.
    3. override the java language protections on the Method object.
    4. Call Method.invoke() with the instance of the subclass which I wanted to call the method on.
    Unfortunately, when I got to step 4, I saw this in the documentation for Method.invoke:
    "If the underlying method is an instance method, it is invoked using dynamic method lookup as documented in The Java Language Specification, Second Edition, section 15.12.4.4; in particular, overriding based on the runtime type of the target object will occur."
    Is there any way to externally access the functionality of a super method implementation on a subclass that overrides it? It seems like there should be...
    In case you are wondering, the reason I am doing this is I am trying to implement a deep clone method. However, I would like any class to be able to call the deep clone method by passing themselves as an argument to a static method -- that way you don't have to worry about subclasses inheritting clone or anything like that. The code would look something like this (however it seems that according to the docs, this would result in an infinite recursion because when the Object.clone() method is invoked, it would actually resolve to the MyDeepCloneableObject.clone() method (which would call the utility function, which would invoke the Object.clone() again etc. etc.)):
    public class MyDeepCloneableObject implements Cloneable {
    public Object clone() {
    return ObjectUtil.deepClone(this);
    public class ObjectUtil {
    private static final Method OBJECT_CLONE_METHOD;
    private static final Class[] EMPTY_CLASS_ARRAY = new Class[0];
    private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
    static {
    //Set the OBJECT_CLONE_METHOD
    try {
    OBJECT_CLONE_METHOD =
    Object.class.getDeclaredMethod("clone", EMPTY_CLASS_ARRAY);
    OBJECT_CLONE_METHOD.setAccessible(true);
    } catch (NoSuchMethodException e) {
    System.out.println(e.toString());
    e.printStackTrace();
    } catch (RuntimeException e) {
    System.out.println(e.toString());
    e.printStackTrace();
    public static Object deepClone(Cloneable object, int levels) {
    Object clone;
    try {
    clone = OBJECT_CLONE_METHOD.invoke(object, EMPTY_OBJECT_ARRAY);
    } catch (IllegalAccessException e) {
    System.out.println(e.toString());
    e.printStackTrace();
    return null;
    } catch (InvocationTargetException e) {
    System.out.println(e.toString());
    e.printStackTrace();
    return null;
    } catch (RuntimeException e) {
    System.out.println(e.toString());
    e.printStackTrace();
    return null;
    // Use more reflection on fields of clone to implement deep clone
    }

    In your example the clone method is not creating a clone, just returning a new instance of an object of the same type. In both cases the default shallow clone method should be implemented as follows:
    public Object clone() {
    //Call Object.clone()
    return super.clone;
    By doing so, any subclasses will also have their fields copied when clone() is called.
    From the javadocs for Object.clone():
    "The method clone for class Object performs a specific cloning operation. First, if the class of this object does not implement the interface Cloneable, then a CloneNotSupportedException is thrown. Note that all arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment; the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation."
    Now as to how the parent is supposed to know about fields in subclasses, the implementation of clone is implemented in a native method in Object, so the JVM can pretty much know anything about the subobject as long as it has a reference to it. Further, if I wanted to make my own implementation, I could using reflection:
    public Object clone() {
    // Get the runtime class of this object, note that the runtime class
    // may be a subclass of the class in which this clone method is defined
    Class objectClass = this.getClass();
    //Get all of the fields in this class and it's super classes
    List fieldsList = new ArrayList();
    while (objectClass != null) {
    Field[] fields = objectClass.getDeclaredFields();
    for (int j =0; j < fields.length; j++) {
    fieldsList.add(fields[j]);
    objectClass = objectClass.getSuperClass();
    //Now I can create a new instance of the runtime class and set
    //all of its fields appropriately
    However, I'm sure the JVM's implementation is far more efficient.
    I have not benchmarked serialization. However, all the steps in my procedure would have to be done for serialization anyway (i.e. get list of all fields, instantiate equivalent field values and set them in the new object), but serialization also needs to convert everything to a byte representation and then parse it out again. Furthermore, serialization will perform a fully deep clone, where as I only want a one level deep clone (or two depending on how you think of it -- i.e. not a shallow copy of references (as Object.clone(0 does), but a copy of direct fields and containers (i.e. Maps and Collections in fields should be cloned, but not objects in the Maps and Collections). So if an object has a field which is a List and the List field contains 1 entry, and the object is cloned, then subsequent modifications to the List field in the cloned object are not reflected in the original object's List field and vice versa (i.e. the 1 entry is removed in the original , but remains in the clone's version of the List field).

  • Jtree node refuses to collapse upon clicking handle; makeVisible() was used

    Hello,
    While creating a new node and inserting as a leaf in the JTree, I use tree.makeVisible(newTreePath) to expand the new node and make visible. (Using expandPath() will not expand if a leaf was added).
    However now the jtree node refuses to collapse upon clicking the node handle.
    How do I get it to not insist on staying open - be able to collapse manually?
    thanks,
    Anil

    This is the JNI forum. I don't believe your post fits.
    then
    can I correctly assume that any class that
    "implements Cloneable" will handle making either a
    "shallow" or "deep" ... or even "semi-shallow" clone,
    respective to the class context .. right?
    It probably does something. The implementor might not have implemented anything though. And you have no idea what they implemented.
    No idea about your other question.
    You might want to think carefully about why you are cloning though.

  • Old battery for home use and 1 "traveller" battery? good idea?

    My powerbook is my main computer and is connected to the adapter 90% of the time.
    Would there be a noticable benefit from only using the new battery if i need to go on the road and leave the current battery in the laptop for home use?
    If so is it best to leave the new battery half charged when not in use?

    You might want to read this page on the same site as the previous link, because most of my opinions are based on sources like that one, since I am not myself a battery expert.
    So what would you class as a shallow discharge? 50 or
    75%?
    This is going to sound stupid, but I don't really put a number on it, only because I haven't seen one. I only see the advice about shallow vs. deep discharges. But I also don't think it needs to be that precise. The most damaging percentages seem to be 0% and 100%. I am not sure there is so much difference between 50% and 75%. Also, it's pointless to finesse it around that range because if you are on battery and you need to work longer, you should work longer. Being able to use the runtime you bought is more important than ekeing out incremental runtime preservation. I think this is why Apple's advice is so general, because it will essentially accomplish the goal. ("An ideal use would be a commuter who uses her MacBook Pro on the train, then plugs it in at the office to charge.") Unplug it when you need battery, and plug it back in when you don't need battery.
    As the battery will sometimes "rest" for a month or
    more should i follow the apple battery care
    suggestion and leave it at 50% ?
    That seems fine. The page I linked to says 40%. Other sites say 40% and in the fridge. Again, anywhere in the ballpark is probably Close Enough.
    Network, do you leave the battery at a specific
    charge when resting?
    Resting plugged in, 100% obviously, can't do much about that.
    Resting and not in the laptop (short term offline), I aim for 90-95%. The only reason for that is on the site I linked to, it says "The worst condition is keeping a fully charged battery at elevated temperatures," so I figure it's easy to not have it fully charged. However, I will not drain it to 40% for short-term room temp storage, because that would require planning at least an hour ahead to charge it back up to 100% before going out the door. If you forget to do that, you walk out the door with your 40% charged battery, and that 5ucks.
    Resting long-term, I'll drain to around 40%, put it in a ziploc bag, and put it in the fridge. Some say getting it down to fridge temperature isn't important, and I really don't know. But all agree, never put it in the freezer!!!!!
    There is a balance here between convenience and runtime preservation. If you wanted to obsess over runtime preservation you could drain to 50% and fridge it every time you take it out of the laptop, but the reason that's totally stupid is that every time you want to use it you have to get it back up to room temperature and charge it. That's why I like to have different criteria for might-need-it-today storage (almost charged, room temp) and long-term storage (half discharged in the fridge).
    The reason i'm hammering at this is that this
    powerbook is nearing the end of its cycle and i doubt
    i'll invest in another battery in the future.
    Totally understand. That's why I looked into this stuff myself. But since I have a battery that's pretty new, and I think I can get decent runtime out of it for at least 2 years, that means it should last long until the ol' PowerBook G4 feels out of date enough for me to upgrade.
    The main points here are, if you want to use your battery for its intended purpose, don't worry about micromanaging the percentages, just use it normally, don't drain it every time, keep it cool when possible.

  • Can you user help me?Random Reset On S750...

    Hi there!
    Got 4 new sets of S750 from Creative, trying to solve the Random Reset on S750 issue!
    All the sets suffered from this issue....
    Creative support wants to hav my set for tests...
    They think is not "normal"....
    Please, can you, users who had this issue on your S750 post here your experiences with this problem?
    Did you got it solved? How?
    Appreciate your help as I got my S750 in February 2005 and since then, I had been on a nightmare with exchanges after exchanges with no results!
    Regards
    Ricardo Marinheira

    christian97 wrote:
    What do you mean "That's the normal use you should give to your Mac"? The one that i said "I want to do is fully charge it and use it without the charger connected, can i do that everyday? " And what do you also mean "At least once a month, I recommend you to use the computer until the battery runs out, and then charge the battery" Is that a calibrating a battery? But some other user said that I shouldnt run my battery out, I should charge it on 20%. Is that true?
    If you read the second link I posted, it gives more details about this. Lithium-ion batteries last longer with shallow, not deep, discharges. This means if you use it every day, draining the battery partially (maybe to 60-80%), and charge it back up to full, that's good. But if you use it every day draining it until the battery is completely empty, that's bad and will shorten battery life. That's why I keep it plugged in when near an outlet.
    Refer to Table 2 in the Battery University link I posted: "Table 2: Cycle life as a function of depth of discharge. A partial discharge reduces stress and prolongs battery life."
    But let's be realistic. If you cannot reach a power outlet for most of the day, then you have only so much control over your cycling pattern; use the battery as you need to get your work done, even if that means emptying it frequently. Simply budget for a potential battery replacement sooner than other users. Apple does provide a battery replacement service for a fee.

  • General newbie questions

    Method getX(): Which would be the difference between using "return this.x;" and "return x;"?
    public class Point
    private int x,y;
    public Point()
    public Point (int x, int y)
    super();
    this.x=x;
    this.y=y;
    public int getX()
    return this.x;
    Constructors never have return types; do they?
    When i use copy constructor, i create a reference to the calling object. However, when i use cloning i create a totally new object. Is this true? If it's not, which is the difference?
    Thanks

    Method getX(): Which would be the difference between
    using "return this.x;" and "return x;"?In that particular case, nothing. On the other hand...
    int x = 42;
    public int foo(int x) {
       return x;
    }In the above, calling foo(10) would return 10, not 42. Change it to return this.x and it will return 42. The "this" keyword lets you disambiguate local and instance variables.
    Constructors never have return types; do they?No. By definition a constructor is returning an object of the class's type.
    When i use copy constructor, i create a reference to
    the calling object. However, when i use cloning i
    create a totally new object. Is this true? If it's
    not, which is the difference?
    ThanksIn both cases you are creating an instance of the object in memory, and returning a reference to the object.
    A copy constructor will normally take a target class, the attributes of which are copied. The effect of this:
    Foo foo2 = new Foo(foo1);And this:
    Foo foo2 = (Foo)foo1.clone();Will probably be identical if the first is a copy constructor - but they don't have to be. For example, you might want to make a deep copy with the copy constructor, but a shallow copy with clone. But you could do something different too - so it depends on your requirements.
    Dave.

  • Question concerning java Serialization of a complex internal field variable.

    Not everything in the J2SE implements serializable by default.  Say BufferedImage.
    I have learned from an online artical that absolutely all fields to be serialized must
    implement Serializable, including internal ("global") class fields,
    a la
    http://javarevisited.blogspot.com.au/2011/04/top-10-java-serialization-interview.html
    (point 5).
    However, for my purposes, I cannot re-implement (extend) and recompile every and any
    java class I would want to serialize, eg. anything which is a "complex" sub field of
    a conceptual class I do want to serialize, which doesn't occur on the java 1.6 list
    of default serializable classes:
    a la
    http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html
    and
    "If member variables of a serializable object reference to a non-serializable object, the code will compile but a RumtimeException will be thrown."
    Understanding there are implications for the java security model, is there anything to be done for these non-serializable-implementing class fields?
    Is there a Serialization add on kit for Java or something?

    Indeed, however, with a distinct lack of success with the instrumentation api, my request is dualfold now.
    I do understand the restrictions explained here concerning more complex classes and the Serializable API.
    I have found that there is an input line that needs to be submitted when running an Inustrumentation, premain Agent class.
    However, I would have to avoid that by doing System.setProperty(a,b); appropriately.
    Why won't the following just work, without any further supplied input parameters?
       import static java.lang.System.out;
       import java.io.PrintStream;
       import java.lang.instrument.Instrumentation;
       public class InstrumentationAgent
          private static volatile Instrumentation globalInstrumentation;
          public static void premain(String paramString, Instrumentation paramInstrumentation)
             System.out.println("premain...");
             globalInstrumentation = paramInstrumentation;
          public static void agentmain(String paramString, Instrumentation paramInstrumentation)
             System.out.println("agentmain...");
             globalInstrumentation = paramInstrumentation;
          public static void main(String ... args)
             out.println("!");
             String data = new String("data");
             long size = getObjectSize(data);
             out.println(size);
          public static long getObjectSize(Object paramObject)
             if (globalInstrumentation == null)
                throw new IllegalStateException("Agent not initialized.");
             return globalInstrumentation.getObjectSize(paramObject);
    I am still curious as to how the DataFlavor approach I have outlined above.  Does it accomplish a shallow or deep conversion?  Are
    there other limitations which restrict what's put to the underlying ByteOutputStream?
    Why won't my agent class execute though, regardless?

  • Synchronizing objects between classes?

    so, i ought to know this, but i've never done this in my classes before, so here goes:
    I have an object, call it object A, that i create in a class, call it class B.
    i then pass object A to 2 other classes, class C and class D.
    the object is then changed in class C. Is it possible to detect that change in class D without passing a new copy of the object?
    it seems to me like it should be, and the actual data that changes is another object inside object A, so does that complicate matters?
    when i run test code it works, but it's not working in production.
    the code is way too long to post here.
    any ideas? i REALLY appreciate your time in considering this problem.

    ok, so i figured it out.
    finally i got the correct name of it: shallow and deep copying, after some googling it LOOKED like i was doing it right and yet my example code still said no.
    then i rethought my example, and realized that i was making a certain assumption that, in the end, was not actually true in that case.
    once i reversed that assumption, i realized that the code is working perfectly.
    thanks for the help.

  • Extras from the Rack Mount Kit

    With the XServe rack mount kits sending us parts for both the shallow and deep racks, is there something we can do with all the extra parts we do not use? Does apple have a recycle/reuse for them or do we just send them down to the local recycler along with the soda cans from install night?
    I also keep thinking there has to be some good use for that large white plastic shipping cover that comes on the XServe but we only have so many doors needing propped open.
    Any suggestions?

    Your local Apple Authorized Service Provider would probably love them! If you gave them to him free, he would be your new best friend, and you would strike up a relationship with someone who may work with you when it comes time to procure new hardware.

  • Cloning a virtual instance in OVMM

    :Hi
    I am very much new to this so plz accept my apologies for my basic questions.
    I am planning to clone one of our instance as a backup. I want to perform simple clone 'with-Out Clone Customizer' which means with same features if Instance like (disk space, memory etc)
    but i am confuse about 'Target Server Pool' cause we have one Server Pool. Can i clone instance in same Server Pool and same Repository ?
    is it going to make any issue ? during cloning process if clone get failed is it going to effect our current running instance ?
    Thanks
    Regards
    i am following below steps for clonning:
    To create a clone of a virtual machine or template:
    1.Select the virtual machine or template to clone and display the Clone or Move dialog box. You display this dialog box from different locations, depending on whether you are cloning a virtual machine or a template.
              * Virtual Machine: Click the Servers and VMs tab. Select the server pool on which the virtual machine resides in the navigation tree. Select Virtual Machines from the Perspective drop-down list. Select the virtual machine to clone in the management pane, and click Clone or Move Clone or Move icon .
              * Virtual Machine Template: Click the Repositories tab. In the navigation tree, select the repository in which the template resides, then VM Templates. Select the template in the management pane and click Clone or Move Template... Clone or Move Template... icon .
       2. The Clone or Move dialog box is displayed.
         Select the Create a clone of this (VM or Template) option. Click Next.
       3.  The Clone or Move (Virtual Machine or Template) dialog box is displayed.
         Select or enter the following:
              *  Clone to a: Select the clone type, either Virtual Machine or Template, to specify the objects to create from the clone.
              * Clone Count: The number of clones to create.
              * Clone Name: A name for the virtual machines or templates.
              * Target Server Pool: The server pool on which the clone is to be deployed.
                Note: The list of server pools that are available in the dropdown is limited to valid server pools that are capable of handling the cloning process correctly. This helps you to prevent cloning to a server pool that may fail to process the request. If this list is empty, you should refer to the table presented under the Why don't I see other server pools to clone to? element on this dialog screen.
              *  Description: A description for the virtual machines or templates.
              * Advanced Clone: Whether to use a clone customizer to set preferences for the clone operation.
              * Clone Customizer: The clone customizer to use to create the clones. Click Create... to create a new clone customizer. See the section called \u201cManaging Clone Customizers\u201d for information on creating a clone customizer. Only enabled if Advanced Clone is checked.
              * Target Repository: The repository to store the cloned files, such as virtual disks. Only enabled if Advanced Clone is checked.
              *Why don't I see other server pools to clone to? A collapsed window element, providing a table of server pools that do not meet the requirements to accept a clone request. Expanding any of the entries in this table will provide the reason that the server pool does not qualify.
      Click OK.

    You can of course clone a guest onto the same repository and onto the same server pool. You don't have to worry about the server pool, if you only have one.
    If possible, shut down your guest prior to cloning it.

  • Backup Software For backing up Raid Drives and main hardrive system

    i'm, looking for the best software for backing up raid drives. i have rocstor raids. they said retrospect was best but after reading reviews they were not that good. i use super duper but they said for raid drives you need more than a free program
    any ideas
    thanks

    I use Time Machine in conjunction with SuperDuper for my backups. I tend to use the simplistic of >the restores in Time Machine for restoring files whereas I like the speed of SuperDuper if a clone is >required. I also like the redundancy of multiple backups by different techniques.
    Yes I think its a good strategy. Time machine is great for "undeleteing" if you see what I mean but a clone gets things working again very quickly after a disaster and even if you don't have time to restore you can still boot your computer. I have CCC do an incremental backup every evening at 3am.

  • VDI best practices

    Hi,
    Is there any documentation that outlines best practices when implementing VDI, the install guides are great but they are just that; install guides...I'm looking for real life examples, worked out issues and such; case studies with instructions if you will. I've done the Google searches, but as with most things like this there are bits an pieces of the puzzle but none that I've found have start to finish examples.
    For instance, where would I go to look for documentation for the best way to convert an environment of about 100 or so Windows desktops (all together around 4-6 different templates), so that I have a near zero IT workload maintaining 4-6 different installs vs. 100 hardware desktops. Do I still need a WUS server...etc.
    My goal is near zero IT at least for the desktops. Has anyone gotten close?
    As an example; Creating templates - install guides work fine; but what is the best way to configure a template so that each clone gets registered (assuming a flexible pool is the best way to go) with AD, or does one have to go to each cloned machine and add it to the MS domain?
    What issues are there integrating all of the normal MS stuff with the VDI environment.
    I'll contribute what I find as I go along but if there is anyone out there with links to docs; I'm sure I'm not the only one that would appreciate it...thanks
    ron

    Hey Ron
    Regarding the VDI servers, we could probably get by with less.. only a few months ago, we had only 3 and we were getting by. Then one day I took one down for maintenance and things got a little dicey for the users... but we were eeking by. Then we had some crazy network issue which I am blaming on our switches and so we lost one of the remaining two, leaving us with only one for 300+ thin clients. It didn't work out well... basically the system was unusable. So on that day I vowed to have enough servers to have one or two down for maintenance, and still have failover capacity. Luckily we were blessed with extra servers, so I doubled the server count and now I can take one down for maintenance or testing, and we still have plenty of space for any random failures, and the users will still be able to work fine. Hard lessons learned.
    We are an Oracle hardware shop as well, so all 6 of those servers are some of their older blades... Sun/Oracle x6250 with 2x quad core 2.5ghz procs, and maxed out on ram at 64GB. In the VDI admin/install guide, they do a pretty good job of helping you size your VDI servers for the number of users. Pay attention to the number of users and the number of available cores in your servers. RAM is plentiful and cheap these days, so that's generally not an issue on the core VDI (sun ray) servers. And Oracle's ALP protocol the thin clients use is pretty optimized so network traffic is relatively low compared to other VDI vendors out there.
    We are a VMware shop, so instead of vbox virtualization, we are doing VMware. Those are older blades from HP - hp bl460 g1 I believe. They are 2x dual core 2.2ghz and only 32gb of ram each. Our virtual desktops are stored on our SAN. Honestly we probably have plenty of extra space in this arena too... according to what VMware tells me, we could turn off close to half the blades and still be fine. This cluster is dedicated to VDI -- all our other virtual servers for the rest of the business live on other vmware clusters on separate hardware.
    We maintain basically two types of desktop images... one, the dynamic desktop I referred to in an earlier post. Users log in, use the machine, and they get reset back to a clean state when they log out. There is nothing persistent and we have preloaded all the apps we know they will use. We have about 400 of this type sitting around available for us. The apps our clinical people use are pretty lightweight, so we get by fine with 512mb of ram and 1vcpu on XP SP3. Our second desktop image is a "static" desktop... basically it's assigned to a user and it remains theirs permanently until we blow it away. These are reserved for special people who use special software that is not preloaded on the dynamic desktop image. The more we try to expand use of VDI, the more we end up handing these out... we just have too many types of software and don't want to clutter up our clean little clinical desktop image. That image is XP SP3 again with 1GB of ram and 1vcpu. They also get a bigger 25GB hard drive to give them plenty of space for their special crapplications.
    Our biggest bottleneck on the virtual desktop side is SAN I/O. Unfortunately we're forced to use full clones of these desktops rather than "linked cloning" or what you get with vbox and zfs which make much better use of disk space and I/O. I think we currently have most of this squeezed onto about 10 600gb 15krpm fibre channel drives and this is a bare minimum. We recently had an assessment that said we need to probably triple the number of spindles to get the proper I/O. This seems to be a trend in virtualization lately... space is not a problem with modern drives. The problem is that you can squeeze 60 virtual desktops on the space of one hard drive, which is a bad idea when you consider the performance you're going to get. Oh, and the ONLY way we have made this work thus far is by fine tuning our antivirus settings on the virtual desktops to not scan anything coming off the disk (which is clean because it was clean when I built the template). Before we did that, things were crawling and the SAN was doing 3x the I/O.
    Again, read the install/admin guide if you haven't yet... I'm pretty sure they give some basic guidelines for storage sizing and performance which we should have read closer early on.
    If you have other questions you think you'd like to talk about offline, you can send me an email at my personal address and we'll set something up - dwhitener at gmail dot com. Otherwise, keep the questions coming here and I'll give out whatever info I can.

Maybe you are looking for

  • Oms2 and po delivery tab setting

    Hi All, First of all, I like to thank sam in answering me on oms2. I need to clarify on certain issue here. 1) Can I say goods receipt tick box in PO delivery tab is depending on OMS2 setup? If qty in OMS2 is ticked, then by default, PO delivery tab

  • :*(  Form buttons don't work for all testers

    I created a form in Acrobat 9.1 using Forms> Add or Edit Fields. The form contains action buttons for next page and previous page, to clear all fields, and (with the generous help of a fellow forum member) to print the form and save it to disk. I opt

  • How to print html as it appears in internet explorer

    i've been workin on a program (volunteer work) to help storing database ...... i am almost close to finals in my school and im lookin for a way to finish fast, im desperate i've been workin for 3 month no sleep ..... please i just need advise on: 1-

  • How to enable my ipod touch?

    my ipod touch had been stolen and return but now its disabled till so many minutes. how can i enable it if my computer where it was last connected to is now broken?

  • IPhoto copies, Export problem, upload photos

    HELP!!! I definitely need your expertise. Here is the background: - I wanted to upload photos onto Kodak Gallery through ofoto Express. Since Ofoto can upload pictures from iPhoto, so i went to organize my photos there. - I created a new folder (let'