Tuesday, October 11, 2011

Distributed Garbage Collection and Stub Downloads–and other dirty solution architecture alternatives

Technology choices can make the difference between meeting the customers’ immediate needs and failing to complete a project on time. No can do if you’re using IIOP. If you’re still stuck in CORBA or IIOP, and trying to get remote objects talking to one another – don’t expect RMI-IIOP to help do what pure RMI does – DGC. Stub downloads and DGC are never going to be supported across technologies – it’s not possible to standardize it.

Think about refactoring to expose encapsulated business services instead. Use HTTP – it is connection based and stateless. Alternatively think about using messaging architectures, if you are at the systems programming level – IP Multicasting can be used of TCP that can serve as an unreliable messaging infrastructure – but it can also have layers of high speed health checks and retry mechanisms built. Virtual channels like queues (p2p) and topics with durability attributes can be used as well.

If a non-EJB Java application requires integration with your CORBA system, Java IDL is officially recommended – the communication protocol then is native IIOP. CORBA clients needs to talk to Java, Java IDL on the client end don’t make sense. If you want to integrate with the mainframe, and all you need is some fancy GUI, but the mainframe source code is unavailable – guess what? Screen scrapers via terminal emulator inputs may be recommended. Depends. If the goal is to meet the customer’s need quickly – don’t forget to do a trade off analysis and make target state recommendations. An architects job is to accelerate business not make perfect solutions at all costs. Judging trade offs is where we make money for the clients. Know when where and how to make short cuts if needed. Use a reverse proxy to target different servers for servicing different types of requests. Have failure management systems up to the wazoo. Avoid EJBs if you have no need for transactions and business logic in the solution. KISS.

If you must use CORBA and RMI-IIOP (for EJB type communications), and Session Beans provide good memory management like Pooling and Passivation (SLSB & SFSB). If you must integrate with existing native C++ code/business logic, it is advisable to wrap that with JNI calls, and remote it via RMI. Don’t over use web-services if you don’t need a business service. SOA isn’t API over the web.

All in all, Java IDL is business as usual for CORBA programming. Use RMI-IIOP is for Java programming over IIOP, it can interoperate with CORBA objects but those interfaces must be available as Java RMI. If you must use pure IIOP – then you have existing CORBA objects in play that can’t have Java interfaces – so you must use Java IDL. CORBA provides lots and lots of nice services; Naming Services, Security, Transaction Service, Event and Concurrency Control.

Regardless of how you meet your customers’ expectations – plan to leave them with an awesome build/deploy strategy & matching execution.

Monday, October 10, 2011

Cloud 9? Don’t forget data replication strategies

It is still important to decide on your data, server replication strategy when you deploy your core business services and data assets to an internal, external or hybrid cloud models.

Understanding the implications of Active Replication, Passive Replication, Hot Backup, Warm Backup, Cold Backup, State Change Synchronization, Load Balancing and Fault Tolerance are key to making essential choices for a solid deployment architecture on the cloud.

Elasticity, capacity flexibility, horizontal and vertical scalability and dynamic resource allocation makes life a lot easy on the cloud.

Active replication is not achieved by taking cold backups, state changes are not logged for periodic flushes to the replicas, state is not synchronized to only support backup replica when the primary fails. Instead each replica is identical, each replica attempts to process each request – an interceptor takes care of idem potency between replicas. If you want a Primary Service to support all incoming requests, and periodically synchronize its state with the replicas – what you have is a Warm Backup or Passive Replication.

Take a hot backup during times when you have low scalability needs on the RDBMS systems, whereas a cold backup should be reserved for “Sundays” or in the 70s. If you’re going to support the cloud – forger cold backups and start thinking CA (Continuous Availability).

Sunday, October 9, 2011

Dealing with $$$$? You need ACID

 

If you’re deploying business logic to an EJB container, you’re probably dealing with some durable transactional stuff that’s needed by the customer. You need som ACID baby!

Atomicity – do it all or don’t do anything at all.
Consistency – Ensure everything is left integral.

Isolated – Nothing else should alter or interfere.

Durable – persist prior to finishing.

For financially significant applications you need transactions – with four quality attributes together: ACID.

Saturday, October 8, 2011

How to remove Linux partition from a dual-boot PC? lilo & gparted

Now that Windows 7 and Macs have improved their security architectures, it is possible to take tentative steps away from linux for desktop computing, if cost is not a factor.

Every GB counts, so machines that have dual partitions, freeing up the swap, home and primary partition is the only reasonable option.

Remove grub, linux distro and reallocate space.

If you have a dual-boot PC with a Windows XP partition and an Ubuntu 11.04 (or other) partition – and want to simply have the windows partition only then read on.

One 4-letter word: lilo

It can create an MBR on your Windows partition.

Before you do that, make sure you run check disk on all drives from your windows partition. Then boot up with a live Ubuntu CD and run GParted. Delete the partitions, and resize them as needed.

Run lilo to recreate your MBR on the windows main partition, and you are all set.

Tuesday, October 4, 2011

Creating Objects Design Situations

 

Understanding how to create an object goes beyond the new() syntax, a good designer will think about the current requirement and future requirements to ensure decoupling layers, build in flexibility and maintainability. For example,

So you have an object that needs to create another class, however

…it cannot anticipate the class of objects it must create

…it wants only its subclass to specify the object it wants to create

…it wants to localize knowledge of which helper subclass is the delegate

How would you design for these quality attributes?

How about the following:

A client class needs a complex object, however it also

… wants to vary the product’s internal representation

…isolate code for construction and representation

…gives you greater control over the construction process

How would you design for these quality attributes?

 

What if you wanted to:

… isolate the concrete class from the client that needs it, and

… allow for exchanging classes of products easily

…enforce a common consistent product interface across families of products

What’s going to be the pattern of choice, designer?

If you answered Factory, Builder and Abstract Factory – then that’s pretty darn good – you remember your GOFs, which are like the ABCs for software architects (or should be).

Monday, October 3, 2011

Java EE 5 Security

Enterprise Java provides abstracted security APIs and concept that sit on a robust security foundation at the Java Language Specification and implemented by Java Virtual Machines:

Automatic Memory Management

Secure Class Loading

Strong Typing

Byte code Verification

At the time the security design was unprecedented, nothing came close to the security model of an interoperable platform. However with the advent of Java Applets and sandboxing, clunky jar signing processes and key stores, users and system designers shed away.

Java EE 5 continues to build and extend a robust security platform for its EJB and Web containers – the simplified API looks for isCallerInRole and isUserInRole respectively. Unfortunately not all real security threats can be handled from within the container.

Denial Of Service attacks require man-in-the-middle and session hijacking to be addressed, typically outside the container – at the network layer. Additionally, nothing can be done to prevent social engineering. That’s a human only vector.

Saturday, September 24, 2011

JMS Header Values, who sets what

JMS API defines headers for messages that are sent asynchronously to a message destination (Queue or Topic).

A Client that sends a message has the ability to select 3 values:

1. JMSCorrelationID

2. JMSReplyTo

3. JMSType

 

These 3 values have meaning to the receiver of the message, and may have pre-defined semantics.

These can be useful to Browse the messages, a QueueBrowser object can read and display messages that are sitting in the queue by reading its header messages. Note, that the API doesn’t support browsing topics. It is advisable to keep an internal xml database record of messages that are destined for a topic, and wrap the commit atomically using a 2 phased commit protocol.

Sunday, May 8, 2011

Updating Grub 2 Config

Updating Grub 2 - 

If you want to change your grub configuration (reorder, change, remove etc) - there are TWO steps

1. Make The Change

2. Update Grub

 

For example, If you want to change the selected OS to boot from (usually the first one is selected by default).

rohit@lenovo:~$ sudo gedit /etc/default/grub 

rohit@lenovo:~$ sudo update-grub

Generating grub.cfg ...

The steps above, essentially means, I opened the grub file in a text editor, made changes and saved it. Then I ran update-grub to cement my changes. Done

Sunday, May 1, 2011

5 Things Ubuntu STILL needs your support on

I have been an avid Ubuntu user for 4 years and Linux user for 10, there have been significant several improvements over the years that have made it a pleasure to use Linux 80% of the time.

But listing these will help guide the next few releases and help early adopters understand the risks.

 

TOP 5 Missing Features in UBUNU (and Linux)

5. Speed

Ubuntu boots up way faster than Windows XP, Vista and Win7. However, once Gnome (or KDE) startsup the user-perception of performance lags. Ubuntu/Gnome and Kubuntu are markedly slower to start applications than Win Xp or Win7.


4. Office 2010-like features

OpenOffice and OfficeLibre don't compare with Microsoft Office 2010. Features like One Note and Smart Art, MS Visio (yes, it's still better than Dia), has left the open source community challenged to meet or beat the new features provided in Office. 


3. Better screen real estate utilization

Screen real-estate is precious, and Win Xp did an awesome job on rendering the toolbars and icons to optimize on both low resolution monitors as well as high resolution monitors. For WSXGA screens, XP is still far better that Gnome 2x. A partial workaround is to use a compact theme, but it does not suffice. KDE does a better job than Gnome, and XP does a better job than KDE in screen real estate utilziation.


2. Support for Apple products: iPad, iPod

Support for iPads and iPods is essentially missing. You cannot use iTunes on Linux. Shame on Apple. Not only is iTunes a poorly designed and resource hungry software, it is not cross-platform. Windows is the only 'other' OS that is supported.


1. Support for Netflix

Shame on MIcrosoft and Netflix. Microsoft has not allowed DRM to be ported. Netflix seems committed to Silverlight. The combination has left Linux and Android operating systems in the cold, when it comes to Netflix movies. This is major strategic risk to Netflix. Not from Linux, but from Android users. Watch for Amazon in the this space. If Amazon supports a true cross-platform movie-watching experience Netflix will have a serious competitor.

 = No Linux or Android

Conclusion

If you are planning to check out Linux and any of its distributions for the first time, I strongly reccommend Ubuntu/Gnome or Kubuntu which is closer to the Windows user experience. Be aware of the missing features on the platform. In the next 3-5 years, Linux needs support from you and the corporations to be a viable platform for day to day computing needs.

 

 

Thursday, March 31, 2011

3 rules to understand attitudes and actions

Here are my 3 rules to understand people's attitudes and actions.

 

Rule #1. If you want to understand people's attitudes, first understand their motives.

Rule #2. If you want to understand people's actions, understand their incentives.

Rule #3. If you want to understand people politics, read Rule #1, Rule #2.

 

----
Case in point 

 

Health Care Reform, War

The Human-AI Partnership: Why Mastering Touch Typing is Your Next Generative AI Superpower

Generative AI requires humans to establish thought partnership rather than allow AI to take over critical thinking skills. I believe that ty...