JaroslavTulach at 23:31, 17 February 2011 - 2011-02-17 23:31:23

←Older revision Revision as of 23:31, 17 February 2011
Line 1: Line 1:
Often one needs to provide similar, yet slightly different [[AlternativeBehavior]]s of the system. This page describes various levels on which such [[co-existence]] can take place.
Often one needs to provide similar, yet slightly different [[AlternativeBehavior]]s of the system. This page describes various levels on which such [[co-existence]] can take place.
-
TBD.
+
[[TBD]].
== Object level ==
== Object level ==

JaroslavTulach: /* Class level */ - 2010-11-08 08:20:21

Class level

←Older revision Revision as of 08:20, 8 November 2010
Line 9: Line 9:
== Class level ==
== Class level ==
-
The behavior is associated with class - e.g. in [[Java]] one needs to load the class by two different classloaders to get different behavior. This way one can get multiple [[singleton]]s.
+
The behavior is associated with class - e.g. in [[Java]] one needs to load the class by two different [[ClassLoader]]s to get different behavior. This way one can get multiple [[singleton]]s.
The [[NetBeans Runtime Container]] falls into this category ([[NetBeans]] [[API]]s expose a lot of static getters). This was an intentional decision. We never wanted to have more than one [[GUI]] application in the process.
The [[NetBeans Runtime Container]] falls into this category ([[NetBeans]] [[API]]s expose a lot of static getters). This was an intentional decision. We never wanted to have more than one [[GUI]] application in the process.

JaroslavTulach: /* Cloud level */ - 2010-01-25 09:07:01

Cloud level

←Older revision Revision as of 09:07, 25 January 2010
Line 27: Line 27:
== Cloud level ==
== Cloud level ==
-
To achieve [[AlternativeBehavior|parallel behavior]] of a complex system (kenai.com, netbeains.org) is often possible only with duplicating all its network.
+
To achieve [[AlternativeBehavior|parallel behavior]] of a complex system (kenai.com, netbeans.org) is often possible only with duplicating all its network.

JaroslavTulach: /* Class level */ - 2010-01-25 09:04:21

Class level

←Older revision Revision as of 09:04, 25 January 2010
Line 10: Line 10:
The behavior is associated with class - e.g. in [[Java]] one needs to load the class by two different classloaders to get different behavior. This way one can get multiple [[singleton]]s.
The behavior is associated with class - e.g. in [[Java]] one needs to load the class by two different classloaders to get different behavior. This way one can get multiple [[singleton]]s.
 +
 +
The [[NetBeans Runtime Container]] falls into this category ([[NetBeans]] [[API]]s expose a lot of static getters). This was an intentional decision. We never wanted to have more than one [[GUI]] application in the process.
== Call level ==
== Call level ==

JaroslavTulach: /* Object level */ - 2010-01-25 09:01:43

Object level

←Older revision Revision as of 09:01, 25 January 2010
Line 5: Line 5:
== Object level ==
== Object level ==
-
One can configure two objects to have the same type (external interface), but slightly [[AlternativeBehavior|different behavior].
+
One can configure two objects to have the same type (external interface), but slightly [[AlternativeBehavior|different behavior]]. The [[OSGi]] falls into this category. It is possible to have two running [[OSGi]] containers in the same [[HotSpot|virtual machine]] quite easily (as the [[API]] doesn't have any static getters).
== Class level ==
== Class level ==

JaroslavTulach: /* Process level */ - 2010-01-25 04:19:45

Process level

←Older revision Revision as of 04:19, 25 January 2010
Line 17: Line 17:
== Process level ==
== Process level ==
-
The behavior is the same throughout the process. System.getProperty("...") or various [[singleton]]s in core [[Java]] libraries ('''SecurityManager''') are example of such [[API]]s. One needs to start new [[Hotspot|virtual machine]] to get different behavior.
+
The behavior is the same throughout the process. System.getProperty("...") or various [[singleton]]s in core [[Java]] libraries ('''SecurityManager''') are example of such [[API]]s. One needs to start new [[HotSpot|virtual machine]] to get different behavior.
== Computer level ==
== Computer level ==

JaroslavTulach at 04:19, 25 January 2010 - 2010-01-25 04:19:34

←Older revision Revision as of 04:19, 25 January 2010
Line 1: Line 1:
-
#REDIRECT [[AlternativeBehavior]]
+
Often one needs to provide similar, yet slightly different [[AlternativeBehavior]]s of the system. This page describes various levels on which such [[co-existence]] can take place.
 +
 
 +
TBD.
 +
 
 +
== Object level ==
 +
 
 +
One can configure two objects to have the same type (external interface), but slightly [[AlternativeBehavior|different behavior].
 +
 
 +
== Class level ==
 +
 
 +
The behavior is associated with class - e.g. in [[Java]] one needs to load the class by two different classloaders to get different behavior. This way one can get multiple [[singleton]]s.
 +
 
 +
== Call level ==
 +
 
 +
Is it? Would be behavior that inspects stacktraces. Probably [[Java]]'s security policy falls into the category.
 +
 
 +
== Process level ==
 +
 
 +
The behavior is the same throughout the process. System.getProperty("...") or various [[singleton]]s in core [[Java]] libraries ('''SecurityManager''') are example of such [[API]]s. One needs to start new [[Hotspot|virtual machine]] to get different behavior.
 +
 
 +
== Computer level ==
 +
 
 +
Running two different HTTP servers on port 80 is possible only with two computers (ignore case of virtual hosts).
 +
 
 +
== Cloud level ==
 +
 
 +
To achieve [[AlternativeBehavior|parallel behavior]] of a complex system (kenai.com, netbeains.org) is often possible only with duplicating all its network.

JaroslavTulach: Redirecting to AlternativeBehavior - 2010-01-25 04:04:46

Redirecting to AlternativeBehavior

←Older revision Revision as of 04:04, 25 January 2010
Line 1: Line 1:
-
#REDIRECT [[AlternativeBehaviour]]
+
#REDIRECT [[AlternativeBehavior]]

JaroslavTulach: Redirecting to AlternativeBehaviour - 2009-06-01 19:58:21

Redirecting to AlternativeBehaviour

New page

#REDIRECT [[AlternativeBehaviour]]