Thursday Sep 27, 2007

Saying Goodbye to Friends & Coworkers

Four really great writers and super people are leaving our Communications Technical Docs Team..

  • Doreen Kasson - Super-sweet mother of two.. She and I been working around Comms for nearly 10 yrs.
  • Nancy Cheney - She's been managing out Communications Documentation Team.
  • Bonnie Quigg - She's been a great writer for our Calendar Server product.
  • Shami Kini - Our Doc writer working from Los Angeles

Also saying good bye to another friend from our Portal Server Team is Wayne Gifford. He and I been finding ourselves in strange places around the world. Never going to forget sharing a dinner with him at a Tibet Restaurant in Beijing. He's a lot of fun.

These are great people.. I'm sure the industry (and the world) is going to benefit from having them available to work on some really great products.

Cheers! God Bless!

Jon

Tuesday Sep 25, 2007

Sun Java Instant Messaging Server and J2EE

The ServerSide has a great article on how to integrate "Presence" into your J2EE environment. This paper is a pretty good overview. Presence provides a mechanism for business applications to communicate the availability of users. The most obvious example is Internet Chat. You can see if someone is "offline", "online", or "busy." You could also extend this to write a phone switch, an escalation business workflow, or many other applications.

I would add to this paper that the Sun Java Instant Messaging Server provides the same XMPP functionality. The Sun Java Message Queue also provides the JMS functionality.

ServerSide Article "Integrating Presence in J2EE" by John Georgiadis

Technorati Tags: , , , ,

Directory Server 5.2 Patch 6 Released

Ludo's Blog is announcing the release of Patch 6 for Directory Server 5.2. I'm aware that many of our Messaging Server customers are still on this release.

Technorati Tags:

Need Intel-based Systems.. ok Sun's got those!

Today Sun announced Tucani, our new Sun Fire X4450 Server. Based on Intel Xeon 7200/7300 Series. The 7200-series provides dual cores, and the 7300 provides quad cores.

Technorati Tags: ,

Friday Sep 21, 2007

How Email Works (part 2): Intro to the Sun MTA

Last week.. We covered the "high level" explanation of "How Email Works." If you like, I suggest you read my last post before you read this.

See my last post in this series.. Introduction to Sun Messaging Server : How Email Works

This week we are looking at the MTA. The Mail Transport Agent (MTA) is a critical part of the Sun Java Messaging Server. The MTA's function is to transport messages to either other computers or to user applications. The question is now, how does the message go from one MTA to another MTA.

A Quick Review from Last Time..

Nearly all of us have written a email in our day to day life. When we click the "send" button on our email software, the message disappears and "hopefully" appears in someone else's email mailbox. On the setup of our Email Software, we are asked for an SMTP Server. The SMTP Server (or MTA-Outbound) provides (#1) the initial acceptance of the message from the author of the email.

Once the email has been accepted by the MTA-Outbound. The MTA will then evaluate the message recipient's address. If the recipient is not local to the MTA, the MTA will attempt to deliver the message to another site.

The recipient address of "jonathan@siroe.com" has two parts. The first is the user part which is "jonathan." The second part is the domain part which is the "siroe.com." If the domain part does not equal the MTA Server's local settings, it then decides that the message must be delivered to another site (#2). The address of the site is looked up using the MX DNS Record to find the IP Address of that site. This allows the MTA-Outbound to create an SMTP Connection to the Remote Site's MTA-Inbound.

200709211532

Figure 1 - Example of a User from one site sending an email to a User at another Site

The MTA-Inbound handles all incoming requests (#3) from the Internet. It takes the SMTP connections, and validates the email message's "user address" as a valid user. If the user is valid, it writes the message to its internal message queues. If the user is invalid, it may reject the message. In the Sun Java Messaging Server, we validate the email user addresses using our Sun Java Directory Server.

The MTA must place messages "in transit" in a message queue. The purpose of this message queue is to protect the message from potential system failures, such as loss of power. Only when the message is successfully committed to a message queue will the MTA confirm that it accepted the email message. The example here is.. When you drop off a letter at the local Post Office, you have a reasonable assumption that the Post Office will accept responsibility of the delivery of that message.

After the message has been written to a Message Queue, the MTA will then dequeue the message. The message will be dequeued to either 1) deliver to another site or 2) be delivered into the Message Store. In this case, the MTA-Inbound will evaluate the email address in the Directory Server, and then deliver the message to another server. The Sun Java Messaging Server will deliver to local Messaging Servers using Sun's version of LMTP.

Messaging Server Internals

Now let's look at how the Sun Java Messaging Server does the above from the "inside." (Figure 2) The MTA is a major portion of the Messaging Server. This is because it implements a "channel-based" architecture. The channel-based architecture allows the MTA to provide extensive processing and routing of messages that pass through its system.

200709032311
Figure 2 - Overview of the Internals of the Sun Java Messaging Server

The above picture (Figure 2) provides the highlights of the Messaging Server. The key components of the Messaging Server are the MTA (discussed in this article), the Message Store, and the Access Services (IMAP, POP3, and WebMail).

200709032101

Figure 3 - Initial state where the MTA's Dispatcher starts SMTP_SERVER Processes

For our discussion, we can consider the initial state of the MTA to look like Figure 3. The Dispatcher (a maintenance process) will start up a number of system processes (SMTP_SERVER) to listen to TCP/IP ports. In this case, the processes are setup to listen to port 25 (SMTP) and port 443 (SMTP w/ SSL).

200709032337
Figure 4 - Incoming SMTP Connections connect to the SMTP_SERVER Processes

As other servers and email programs connect to the MTA using SMTP, the multiple connections are handled by the SMTP_SERVER processes. As a connection is established, the client will attempt to start a SMTP session. This SMTP session includes the author's email address (FROM address), the receiver's address(es) (TO address), and the actual email itself.

200709032337-1

Figure 5 - SMTP Session provides addressing information. This is evaluated by the Mappings Table and Rewrite Rules.

Once the FROM address and the TO address is given, the MTA will then assign channels to each of these addresses. These will be the SOURCE Channel and the DESTINATION Channel. The MTA will also track the SOURCE Channel of the connection's IP Address. This process of Channel assignment is based on the rewrite rules provided in the MTA's configuration files. (imta.cnf)

200709032337-2
Figure 6 - Channel's Architecture. Slave Process (enqueues) messages to a Queue. Master Process (dequeues) is assigned to service (dequeue) a Message Queue.

The above figure 6 shows an example "channel-based" architecture. The slave process is the SMTP_SERVER which enqueues the message into the message queue.

200709032338r
Figure 7 - Evaluation of addresses assign the message to be written to disk on a Message Queue file system.

200709032338-1

Figure 8 - Messages in the Message Queue are then dequeued and processed by a Master Process.

Additional Reading:
1. Sun Java System Messaging Server 6.3 Administration Reference, http://docs.sun.com/app/docs/doc/819-4429
test

Technorati Tags: , , , , ,

Thursday Sep 20, 2007

Mobile Phones Agree on Power/Data Cable Standards

Hopefully this agreement will help end the nightmare of cables to power different cell phones. This agreement makes Micro-USB to be the mobile phone standard for Data and Power connections. I'd give it two years before some of these phones show up.

ZDNet: Micro-USB to be phone-charger standard

Technorati Tags:

Sunday Sep 09, 2007

various pictures around Singapore

1353567999 A9Fe5821Fc

After 5 trips to Singapore.. I've finally got a picture in front of the Merlion.

1353556523 C730A24200

Spent a day out at Sentosa Island..

Technorati Tags:

Monday Sep 03, 2007

various pictures around Bangalore

DSCN0275
Travel.. ain't it "fun"

DSCN0286

Want to buy a rug.. "cheap"

DSCN0333

Bangalore Raja Palace? or Wedding/Movie location?

DSCN0283

Another Government Building

DSCN0354

Temple

DSCN0277
My Driver for the Week.. Royal Orchard Hotel

Technorati Tags:

Tuesday Aug 28, 2007

"How Email Works" Introduction to Sun Messaging Server

This week, I am teaching in Bangalore, India. One of the presentations which I'm giving is a "Basic Functional Overview of Communications Suite." Many of us who have been working with Communications Products for over a decade sometimes find ourselves going too deep into the technical aspects of our fields. My intention of this presentation was to provide a "basic baseline introduction" to how "email works".

This write up is a basic introduction. It does avoid most of the more complicate configurations and mechanisms which are part of the Sun Java Messaging Server. The key objective is to understand "how email works" from a basic "black box" model. In the up and coming posts, I'll start getting more complicated into the internals of the Messaging Server and the other components of the Sun Java Communications Suite.

What does Messaging Server allow Users to do?

The Messaging Server allows users to interact with their email message data in three different manners:

  1. Users may write an email, and then send it to someone(s).
  2. Users may receive emails from others.
  3. Users may access their Mailbox

200708280455

The Sun Java Messaging Server Key Components:

• Message Transport Agent (MTA)
• Message Store Database
• Message Access Services:

• IMAP / POP3

• WebMail Access for Communications Express (separate product)

The above imagine simplifies the Messaging Server into these three components.

Messages are delivered into the Messaging Server via the MTA. The MTA is the SMTP Server which accepts the email message and then route the message to it's destination. The destination for the email could be either the Message Store or to another server somewhere out over the network.

The Message Store is a Sun private database, which stores user's mailboxes and message data.

Users access their mailboxes via either IMAP, POP3 or through Webmail.

A User Decides to Send an Email

Users write their emails using any of the popular email clients out on the market. These email clients could include Mozilla/Thunderbird, Apple Mail, Outlook Express, or any other IMAP-based email application. Once the email is ready, the user would click the "SEND" button.

The "SEND" button allows the email application to connect with the MTA. The client connects to the MTA using the SMTP protocol.

200708280507

On the connection to the MTA, the client will send the message over the network to the MTA. The MTA would then store the message in the Message Queue Disk and release the client connection. The message stored on the queue will then be read and the address of the message will be evaluated by using information stored in the Sun Java Directory Server using LDAP.

200708280517

At this point, the MTA will attempt to deliver the message to one of three places:

  1. Into a User's Mailbox
  2. Into another Messaging Server
  3. Into another site on the Internet (note for security.. it is recommend that the MTA forward the message to a "smarthost" MTA to handle the message delivery over the Internet)

It is important to note that once the message is on the Message Disk Queue, and the MTA has responsibility of the message. We guarantee this responsibility by committing the message to disk. It is this commitment which provides the first clue into a our first performance limitation. We write all MTA data to a disk queue, and we therefore are bounded by the disk i/o performance of that disk system. We also need to ensure that the disk system is highly available through RAID. (Typically RAID 0+1 or RAID 5.)

Postal Service Example.. An example of this would be a letter that you drop into a postal mailbox. If you drop a letter of at the Post Office, you are assuming that the Postal Service will mail the message to the destination. You will not expect the message to get lost.

The MTA will not remove the message from the Message Disk Queue until a successful delivery. If a delivery attempt fails, it will keep trying. If it fails a final time, the message will be HELD on the disk queue and a notification sent back to the sender. The MTA logs will record the whole history.

200708280530

The MTA will attempt to deliver the message in one of three possible ways:

  1. Message is Deposited into the User's Mailbox on the Message Store
  2. Message is Sent to another MTA Server on the Same Local Network
  3. Message is sent to the Internet by first sending to the smarthost.

The Smarthost MTA sits between the Messaging Server inside the protected network and the Internet. Typically this would be in an area outside the internal network. The Smarthost would evaluate the message address by domain name. Using DNS, the MTA would attempt to identify the DNS MX Record and A Record for the destination of the email. It would then attempt to deliver the message to the host of that IP Address using SMTP.

User Receives an Email

200708280544

An email sent to a user on the Message Store. In the case of the message arriving from the Internet, the email sender would address the email to "jon@siroe.com". The email sender's MTA would look up "siroe.com" in DNS and find either an MX record or an A record for this site.

200708280543

The Inbound MTA for the site may be configured to detect SPAM or Viruses. In this case, the message will be sent to a anti-spam/anti-virus verdict engine (such as Cloudmark or Symantec Brightmail). If the email passes, it is evaluated for message routing. The email address is evaluated in the Directory Server. If the email address is valid, it is then sent to the user's mailbox host (mailboxb).

User Access their Mailbox

200708280559

If a person wishes to access their email, they would use their email client. These clients, such as Mozilla Thunderbird or Apple Mail, connect to the mailbox using the IMAP protocol. In some cases, ISPs would limit access to POP3 protocol.

The email client would connect to the Sun Messaging Server's Mail Multiplexor Proxy (MMP). The MMP would accept the user's email credentials (their username and password) and validate their login using the Directory Server. Should the authentication be successful, the MMP would then identify the user's backend Message Store server. The MMP would then connect to this backend Message Store on the user's behalf. The user can then access their mailbox data.

The value of the MMP is that it provides 1) Security and 2) Scalability. Security is improved by the use of the MMP by isolating the Message Store from the end-users. This helps to prevent unauthorized access (hacking) into the Message Store server data. Scalability (as seen in the picture below) is improved through Horizontal Scalability. This means that the architecture can grow by adding additional MMPs and backend Message Store servers.

200708281831

In Conclusion..

I hope this information is informative for anyone curious on how "email works." Specifically, how email works with our Sun Java Messaging Server. In my next post, I'm going to describe how "Calendar Services Work" using our Sun Java Calendar Server.

Technorati Tags: , , , , ,

Thursday Aug 23, 2007

Goodbye SUNW.. hello JAVA!

In case you didn't hear.. Sun will be changing its stock ticker from SUNW to JAVA. I think it is a good idea.. It was a horse race between us and Starbucks. Looks like Sun won.

I wonder if the trend is going to be Apple is going to be MAC or more likely IPOD? Microsoft will be BUGS (oops).

Technorati Tags: ,

Friday Aug 10, 2007

On Vacation.. Waikiki, Hawaii

Dscn0034-1

DSCN0037

Technorati Tags: , ,

Wednesday Aug 08, 2007

Sun's Plans for Web-based Instant Messaging?

Francisco Castrillo wrote:

Do you know of any deployment or configuration of IM working embedded on Sun Portal? Something like Gmail or Yahoo functionality?

The only reference I have found is this:
"JWChat Portlet — Communicates with an instant-messaging server with Extensible Messaging and Presence Protocol (XMPP) over HTTP binding. See the Jabber Web Chat site."

I cannot specifically comment on our schedule, but I can tell you that we are active in implementing Web-based Instant Messaging.  Specifically, we are implementing work around a Next Generation AJAX version of Communications Express.  This will allow Presence and Chat capabilities around Address Book.. and possiblity Email and Calendar.

Wednesday Jun 27, 2007

Viewing a Calendar with JScrollPane (Part 2)

In my blog yesterday, we created a basic JFrame application. In this frame we added a JScrollPane and a JPanel for our calendar data. Today, the Calendar client will start to look like a traditional calendar client. We will cover first JScrollPane Headers, working with date stamps, and also drawing text on a Swing component.

JScrollPane Headers

One of the issues with the JScrollPane's ViewPort is that you can quickly get lost. One way to keep your orientation on a sheet is to place a header for the column (top) and the row (left) that is always visible. The developers of the JScrollPane realized that this was an issue, so they added two headers into this class: the Column Header and the Row Header.

Jscrollpane-Headers

The above diagram (click to enlarge) shows the headers being added to the JScrollPane. I thought it would be good to have the header on top show the current date for this view. On the left side, I will put a list of hours from Midnight (0:00) to Midnight (0:00). As I scroll down, the hour will move, but the Date will remain on the top of the View Port. As I scroll left or right, both the Hour Header and the Date Header will remain in place.

You create these headers by first creating a JPanel for each, then calling either setColumnHeaderView(Component view) or setRowHeaderView(Component view). If you read the JavaDoc API for JScrollPane, you will notice that there is a setColumnHeader(JViewPort view) and setRowHeader(JViewPort view), but I chose to avoid these for now.

The following code will create a new Java file called DateHeader.java. We will be using this JPanel to create a Date label.

/\* DateHeader.java \*/
import java.awt.\*;
import java.util.Date;

public class DateHeader extends javax.swing.JPanel {
    Date date;
    
    /\*\* Creates new form DateHeader \*/
    public DateHeader() {
      /\* Calls DateHeader(Date date) constructor \*/
        this(new Date());
    }

    public DateHeader(Date date){
        setDate(date);
    }              

    public void setDate(Date date) {
        this.date = date;
        repaint();         /\* we will talk about this later \*/
    }

    public Date getDate() {
        return this.date;
    }
    
}
/\* DateHeader.java \*/

We will now add this Column Header Panel into our Calendar Client.

/\* Replace the method customComponents() in SampleFrame.java \*/

    public void customCompoents() {
        this.setSize(450, 300);
        myDataPane = new JPanel();
        myDataPane.setSize(1200, 1200);
        scrollPane = new JScrollPane(myDataPane);
        scrollPane.setSize(300, 150);
        DateHeader dHeader = new DateHeader(new Date());    /\* Newly added Column Header Instance \*/
        scrollPane.setColumnHeaderView(dHeader);            /\* Adds Column Header to JScrollPane  \*/
        myDataPane.setBackground(new Color(255, 255, 204)); /\* Set the Data Pane to a nice yellow \*/
        this.add( scrollPane);
    } 
 
/\* end changes for SampleFrame.java \*/

Now add two lines in your existing SampleFrame.java which we worked on yesterday. In the above, we added an instance of the DateHeader class from DateHeader.java. We initialize the new instance with a new Date object. This will set the label to today's date. We then call setColumnHeaderView(Component view) to attach the JPanel to the JScrollPane. The final thing we add is to change the Data Pane to a nice yellow color.

That's it. The top header is now in the JScrollPane's View Port.

The next section, we will put more data on the Column Header and add a Row Header.

Writing Text on the DateHeader

In the previous section, we defined a new subclass called DateHeader. In this section, I'll add a date stamp to this header, and I'll add two buttons to allow us to navigate forward and back.


We added a new constructor in DateHeader to set the Date object. This object holds the current information for the Date. In itself, we cannot just print the Date object to a string. Instead, we need to use a new object SimpleDateFormat to format the date into a useful date format. This label will be added by overriding the paintComponent(Graphics g) method of the JPanel. You can modify the initialization of SimpleDateFormat to display the date in a manner you desire. For example, you may want to display the date like "dd-MMM-yyyy".

/\* Add paintComponent() to DateHeader.java \*/ 

    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        SimpleDateFormat dateStamp = new SimpleDateFormat("MMMM dd, yyyy"); 
        int x = getWidth() / 2 - 150;  // Center the Text by Width
        int y = getHeight() / 2;       // Center the Text by Height
        g.drawString(dateStamp.format(getDate()), x, y);
    }

/\* DateHeader.java \*/

At this point, you should see a header with a date. 

Tomorrow  lets add a Row header.

Technorati Tags:

Tuesday Jun 26, 2007

Viewing a Calendar with JScrollPane

I've been playing around with Swing on my free time. I wanted to update my skills from my previous Java Programming days. In those days (back in 1997), I used the the older AWT-based forms. Today, we have the Swing Toolkit which makes it a lot easier to develop applications.

In the next few days, I will be writing some basic notes and tips for creating a new client using Swing. The client will eventually be a Calendar Client for our Sun Java Calendar Server.

The first topic will be on using JScrollPane. At some point, you will need to present data that will be bigger than the allowable view space.

The following code sets up our example. It defines our application as one that is extending a Swing JFrame class.

import javax.swing.\*;

public class SampleFrame extends JFrame {

    /\*
     \* Constructor for SampleFrame
     \*/
    public SampleFrame() {
        initializeComponents();
        customComponents();
    }

    /\*
     \* Constructor for SampleFrame
     \*/
    public main() {
         SampleFrame sFrame = new SampleFrame();
         sFrame.setVisible(true);
    }
}

You could type the above and compile it from a console window. The easiest way to get started is to download NetBeans and simply create a new project using a JFrame.

One way to display data on a Java Application is to use a container. The container which I'll use for this demonstration is a JScrollPanel and a JPanel. These two Swing containers provide a very large canvas for data (the JPanel) and a view port navigation tool (the JScrollPanel).

Jscrollpane-Overview
The above figure demonstrates a JScrollPane. In my Calendar Client, I really won't be able to display all the information at once. It is useful to allow a user to navigate their view (view port) across a larger calendar. The navigation is done through the use of the scroll bars on the bottom or the right of the view port.

In the next code example, I'll define a JScrollPane and my Data Pane. I'll do this within the JFrame defined above by adding a method called customComponents(). If you are using NetBeans, a method called initializeComponents() will be created automatically.

private JScrollPane scrollPane;
private JPanel      myDataPane;

    public void customCompoents() {
        this.setSize(450, 300);
        myDataPane = new JPanel();
        scrollPane = new JScrollPane(myDataPane);
        scrollPane.setSize(300, 150);
        this.add( scrollPane);
    } 

If you write, compile and run the above, you will likely not see much. This is because the JPanel is pretty much empty. Once we had some interesting stuff into the Data Pane, the scroll bars will appear.

We first resize our JFrame application to a size that is manageable. The next few lines define the JPanel for our Data Pane. We then create our JScrollPane (scrollPane) with myDataPane in the constructor.

Tomorrow.. Part 2 will go into making this more "calendar-like" by adding header information.

Technorati Tags:

Tuesday May 22, 2007

Transactional Model for Sun's Outlook Connector

Outlookconnector-Arch

The below is a diagram representing the transactional model between Outlook Connector and the Sun Communication Suite Servers. I have broken this into four different types of transactions. I have diagramed the relationship between the Outlook Connector and Microsoft Outlook. These transactions are mostly GUI driven, and I haven't bothered to document all of those other than stating that these sit on a MAPI bus connection.

Oc-Transactionmodel

a. Access to Personal Address Book Information
b. Access to Mailbox and SMTP Delivery
c. Calendar Server Access
d. Corporate Address Book & Outlook Connector Configuration

(a) Personal Address Book Access

Outlook users have the ability to add, edit and remove their personal Contacts. On these actions, the Outlook Connector will connect with Communications Express to transmit these changes using the Web Address Book Protocol (WABP) which is a Sun Proprietary protocol.

On Communications Express is a special servlet which provides the WABP Service. This servlet also represents a LDAP Client which communicates back to the Directory Server. The WABP Service will first look up the user, then interact with the user's Address Book Data.

b) Mailbox Access and SMTP Delivery

On the Outlook Connector, a user may wish to retrieve their emails from their mailbox. In this case, the Outlook Connector acts as a IMAP client and connects to the Messaging Server. The Messaging server would evaluate the end-user's username and password with the Directory Server.

If a user is composing and sending an email, the Outlook Connector would provide a SMTP connection to the Messaging Server to attempt to deliver this message. In some cases, the user must first authenticate before sending their email. In this case, the Messaging Server will need to authenticate with the Directory Server.

c) Calendar Access

People may access their, or other's, calendars through the Outlook Connector. The connector communicates to the Calendar Server using the Web Calendar Access Protocol (WCAP). This is also a semi-proprietary (but published) protocol for the Sun Java Calendar Server. User authentication and profiling is provided by the Directory Server.

In Calendar Server 6.3, we added the feature for appointment attachments. This feature allows you to use the Outlook feature to attach a document to a particular appointment. In this case, the Calendar Server has an additional Attachment Store.

d) Corporate (or Global) Address Book

Outlook users may want to find someone within their company or organization which is not already in their Personal Address Book. For this the Outlook Connector becomes an LDAP client which communicates with the Directory Server. The Corp Address Book data are the normal user entries which are the user accounts.

For More Information:

Sun Java System Connector for Microsoft Outlook 7.2 Administration Guide

http://docs.sun.com/app/docs/doc/819-4410/

About

I'll be writing about topics that would interest users and developers of Sun Java Communication Suite.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today