thread ] NextGen

* Our system runs on SPARC and I know the new SPARC processors feature a large number of kernel threads — 32 kernel threads in T2000.
* NextGen is massively multi-threaded to deal with perhaps hundreds of concurrent sessions, each lasting 15 minutes to several hours.

* open call in constructor
* singleton in a multi-threaded environment
* promote local variables
* promote constants and immutables
* immutables as much as possible. Some things in a circuit model are updatable. Most are not, but if you don’t enforce immutability in your classes, then other objects could accidentally attempt to modify my objects’ states, posing a threading hazard.
* log4j logger ? It’s not just thread-safe, it uses synchronized methods everywhere. That means that for heavy logging log4j will induce performance bottleneck and possible deadlocks

— static fields
* EVERY static field is accessible by (true) concurrent threads.
* static fields are needed to model many characteristics of a given telecom equipment, such as …
* In my modules, static varables are mostly constants

— instance variables
* In terms of threading concerns in my modules, instance variables are trickier than static fields
* my classes use more instance variables than static fields, typically 10 – 50 in each object.
* EVERY instance var is, by default, open to hazardous concurrent access
* System was designed to assign 1 thread to each “trouble ticket”, thus minimizing concurrent access to instance variables of circuit elements. Similar to servlet.
* instance vars of parser object? Parser is supposed to be a singleton, so those instance fields are similar to static fields.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s