04
Fri, Oct
2 New Articles

TechTip: Implementing an Internal Instant Messaging System

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

The Jabber Protocol

The Jabber protocol is based on the Extensible Messaging and Presence Protocol (XMPP) standards.

The Jabber open-source community developed this standard in 1999 to provide an open communications technology. Many questions about its use and history can be found at the Jabber Web site. The Openfire and Spark projects were built directly from these open standards.

Ignite Realtime, which maintains Openfire and Spark, is an open-source community based upon Jive Software, which provides professional services for content management and communications systems. Both server and client can be installed and operated on Windows, Linux, and Mac. In the event that enterprise-level support is required, Jive Software offers commercial business solutions as well.

The Server

Building an IM system requires two things: 1) a server installation designated to only one machine or spanning multiple instances and 2) a client package to be installed on all workstations where communications are needed. The server package is Openfire, which comes nicely bundled in several OS flavors, with a Java JRE that is required to run the server. The Linux package comes either in source form or in an RPM to be used with any Red Hat Linux OS. I'll explain installing the server onto a Red Hat variant. To find whichever Openfire package is required for your needs, visit the downloads section of Ignite Realtime's Web site.

Install the RPM on RHEL:

# rpm -ivh openfire-3.3.1-1.i386.rpm

The RPM automatically creates and turns on the service in RHEL, but the service will need to be started by hand the first time it's run. Subsequent reboots of the server will automatically start the service. You can then check the status of Openfire.

# service openfire start
# service openfire status
  openfire is running

After installation, setup is easily completed from a Web interface. Open up a Web browser and navigate to either http://127.0.0.1:9090 or http://servername:9090. If you encounter any problems, verify that nothing else is operating on port 9090 or otherwise blocking it. You should get a setup screen that looks like Figure 1.

http://www.mcpressonline.com/articles/images/2002/openfire_sparkV3--06010700.png

Figure 1: Here's your Openfire setup screen. (Click images to enlarge.)

The setup options are self-explanatory. The server settings page requires a domain name, which should already be filled in by what it reads from the system. Of most interest to you is the database settings page. Openfire allows connections to standard external databases. MySQL, Oracle, Microsoft SQL Server, PostgreSQL, and IBM DB2 are the database types it can connect to. Alternatively, you can use the embedded database HSQLDB, which requires no configuration and allows for ease of setup and use. For your application, you might find an external database to be best. For mine, I use the embedded one.

The profile settings page enables you to set up the default user and group system or allows you to configure Openfire with an LDAP server. The admin account page provides the last step in configuration. Enter an email address and a password for administration purposes only. Once complete, you should see a button to log in to the admin console. Click it, and once logged in, you should see a console as illustrated below.

http://www.mcpressonline.com/articles/images/2002/openfire_sparkV3--06010701.png

Figure 2: This is the Openfire admin console.

The configuration options are too vast to explain here. You can configure resource limits, offline message policies, server-to-server communications, message auditing, security certificates, message compression, and much more. You can create, edit, and delete users and groups under the users and groups page, and you can even set up group chats if you'd like. If you need assistance, check out the active user-based forum or the documentation provided online.

The Client

The hardest part of this project is server installation and configuration.

The next step is to install the client on all the workstations needed. Spark is packaged similarly to the server and also comes with packages for Windows, Linux, and Mac. The Windows clients are packaged as either an MSI installer or an .exe, and the Linux client is a zipped file and requires slightly more manual installation. The client is rather simple to install, so I'll leave it up to you to experiment with it. The result for the client should be a sign-on screen (Figure 3) and then the IM list after you are logged into your server (Figure 4).

http://www.mcpressonline.com/articles/images/2002/openfire_sparkV3--06010702.png

Figure 3: The Spark sign-on screen looks like this.

http://www.mcpressonline.com/articles/images/2002/openfire_sparkV3--06010703.png

Figure 4: And now you have your IM list.

Once signed onto your Openfire server, you can find quite a few configurable options under the Spark menu for preferences and plug-ins available. One of the most useful features of Spark is the ability to broadcast messages. If you click under Actions or if you right-click any group defined in your list, you can select "Broadcast Message." I use this feature all the time to send out messages about the IT system to the entire company or to only certain groups. This saves a lot of time on the phone and also ensures that everyone logged on gets the messages at the same time.

Spark Manager Plug-in

The only annoyance that I encountered with Spark was that it consistently bugged the user about upgrading the client if any updates were found. The client itself does not offer any way to turn this feature off, but you can install a plug-in on the server, download a version of Spark that is of equal or lesser value than the one currently running, and select this as the active installation for your system. This plug-in, called Spark Manager, seemed to resolve the pop-up problem. Install it (a Java .jar file) into the following directory under Linux:

# /opt/openfire/plugins/

Afterward, Spark Manager should appear when you access the plug-ins tab from the admin console.

Next, download and place a Spark client installation package into the following directory. This package needs to be the same version (or older) as all the clients on your network.

# /opt/openfire/resources/spark/builds/

Now, visit the main server configuration tab and a Spark Manager section should appear on the left side near the bottom. Click the settings button to choose any version of Spark that you have downloaded into this directory to be the active version. Now, users will not be bothered by update messages again. If you give users the necessary rights to install or upgrade packages, you can put the most current Spark client into the builds directory and choose it to be the newest active package. Then, when users log in, upgrades will be performed directly from your server.

Extending Openfire and Spark

The nice thing about XMPP is the ability to extend the server and client or adapt them to your own needs. Spark is extensible through the Sparkplug kit, which provides a way for you to customize the client for any business needs. Openfire and Spark can be extended through the Smack API, a pure Java library that can be embedded into applications to create clients or to send notifications across the network.

With the open APIs and available plug-ins, Openfire and Spark together can satisfy all your IM needs. Overall, this project is very stable and mature. I've been running it for nearly a year and a half without problems. It provides secure internal communications without requiring a lot of overhead installing, configuring, and maintaining the IM system. Best of all, if something doesn't work as you anticipate, you can purchase support or write your own code to satisfy your business needs.

Max Hetrick

Max Hetrick is an Information Systems Assistant for an electric utility. He has experience with installation and maintenance of both Windows and Linux operating systems from the PC to server levels. Max is also an open-source software advocate. He welcomes all comments and can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: