Janus Sockets: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 9: Line 9:
</ul>
</ul>


The rest of this article provides an overview of the Janus products which includes supporting information for <var class="product">Janus Sockets</var>. For links to all the <var class="product">Janus Sockets</var>-specific topics, see [[:Category:Janus Sockets]].
The rest of this article provides an introduction to sockets as well as overview of the Janus products which includes supporting information for <var class="product">Janus Sockets</var>. For links to all the <var class="product">Janus Sockets</var>-specific topics, see [[:Category:Janus Sockets]].
 
==Introduction to Sockets==
The Janus family provides many different high-level mechanisms for accessing
resources on the Internet and for communication between processes.
Sometimes, however, systems require lower-level network communication:
for example, when you want to write special-purpose back-end systems
that retrieve information off the web without a browser, or systems that
need to send e-mail or WAP protocol messages.
In client-server applications, the server provides some service, such as
processing database queries or providing current stock quotes on demand.
The client uses the service provided by the server, either displaying
database query results to the user or making stock purchase recommendations to an investor.
The communication that occurs between the client and the server must be reliable.
That is, no data can be dropped, and it must arrive on either
side in the same order in which the other sent it.
Transmission Control Protocol &mdash; the TCP part of TCP/IP &mdash; is the protocol that provides the
reliable, point-to-point communication channel that
client-server applications on the Internet use to communicate with each other.
To communicate over TCP, a client program and a server program establish a connection to one another.
Each program binds a socket to its end of the connection.
To communicate, the client and the server each reads from and writes to the socket bound to the connection.
The high-level communication interfaces &mdash; like <var class="product">Janus Web Server</var> or <var
class="product">Janus Open Server</var>
&mdash; rely on sockets for their communications, and <var class="product">Janus Sockets</var> provides
applications with direct access at the socket layer for custom applications.
===What is a socket?===
A socket is one end-point of a two-way communication link between two programs running on the network.
It is also usefully thought of as a logical handle to such a link.
<var class="product">Janus Sockets</var> [[Janus Sockets $functions|$functions]]
or <var class="product">Janus SOAP</var> <var>[[Socket class|Socket]]</var> object methods
create and manage sockets to establish and communicate over
the connection between a client program and a server program.
Or, alternatively, these same socket communication tasks are handled by
the <var class="product">[[Janus SOAP]]</var>/<var class="product">Janus Sockets</var> object-oriented
"helper" interfaces:
<ul>
<li>[[HTTP Helper]]
<li>[[Email class]]
<li>[[LDAP class]]
</ul>
These interfaces are abstractions of the underlying $function and object method layers.
Normally, a server runs on a specific computer and has a socket that is
bound to a specific port number.
The server just waits, listening to the socket for a client to make a connection request.
On the client-side, the client knows the hostname of the machine on
which the server is running and the port number to which the server is
connected (there are well-known default port numbers for
specific services like ftp, telnet, HTTP, etc., so the client
readily knows the port number).
So, for instance, the client might know that there is a web server
running at port 80 at Sirius Software's mainframe.
A client (here, a web browser) would connect to the machine specifying the host address and port,
given as <i>host.ipaddress:port</i> in the browser's "Location" window:
<p class="code">198.242.244.47:80
</p>
And the web server running at port 80 would accept and respond to the client request.
When the server accepts a connection it assigns a socket to the connection.
It needs a new socket to distinguish the connection from others being served from that port.
Note that the socket on the client side is not bound to the remote server port number.
Rather, the client is assigned a port number local to the machine on which the client is running.
The client and server can now communicate by writing to or reading from their sockets.


{{Template:Janus overview}}
{{Template:Janus overview}}


[[Category:Sirius Software products]] [[Category:Janus Sockets]]
[[Category:Sirius Software products]] [[Category:Janus Sockets]]

Revision as of 23:26, 14 February 2012

Janus Sockets is a Sirius Software product that provides APIs for writing applications that use arbitrary protocols layered on top of the TCP/IP protocol. These APIs include low-level TCP/IP calls for communicating directly with the TCP/IP layer as well as higher-level APIs for using protocols such as HTTP (web requests) and SMTP (e-mail). The Janus Sockets product also provides an FTP Server that can be used without any User Language coding at all (though it can be extended with User Language code) and a telnet/tn3270 server that can be used to access Model 204 directly from a PC-based 3270 emulator.

The following classes are provided with Janus Sockets:

The rest of this article provides an introduction to sockets as well as overview of the Janus products which includes supporting information for Janus Sockets. For links to all the Janus Sockets-specific topics, see Category:Janus Sockets.

Introduction to Sockets

The Janus family provides many different high-level mechanisms for accessing resources on the Internet and for communication between processes. Sometimes, however, systems require lower-level network communication: for example, when you want to write special-purpose back-end systems that retrieve information off the web without a browser, or systems that need to send e-mail or WAP protocol messages.

In client-server applications, the server provides some service, such as processing database queries or providing current stock quotes on demand. The client uses the service provided by the server, either displaying database query results to the user or making stock purchase recommendations to an investor. The communication that occurs between the client and the server must be reliable. That is, no data can be dropped, and it must arrive on either side in the same order in which the other sent it.

Transmission Control Protocol — the TCP part of TCP/IP — is the protocol that provides the reliable, point-to-point communication channel that client-server applications on the Internet use to communicate with each other. To communicate over TCP, a client program and a server program establish a connection to one another. Each program binds a socket to its end of the connection. To communicate, the client and the server each reads from and writes to the socket bound to the connection. The high-level communication interfaces — like Janus Web Server or Janus Open Server — rely on sockets for their communications, and Janus Sockets provides applications with direct access at the socket layer for custom applications.

What is a socket?

A socket is one end-point of a two-way communication link between two programs running on the network. It is also usefully thought of as a logical handle to such a link. Janus Sockets $functions or Janus SOAP Socket object methods create and manage sockets to establish and communicate over the connection between a client program and a server program.

Or, alternatively, these same socket communication tasks are handled by the Janus SOAP/Janus Sockets object-oriented "helper" interfaces:

These interfaces are abstractions of the underlying $function and object method layers.

Normally, a server runs on a specific computer and has a socket that is bound to a specific port number. The server just waits, listening to the socket for a client to make a connection request.

On the client-side, the client knows the hostname of the machine on which the server is running and the port number to which the server is connected (there are well-known default port numbers for specific services like ftp, telnet, HTTP, etc., so the client readily knows the port number).

So, for instance, the client might know that there is a web server running at port 80 at Sirius Software's mainframe. A client (here, a web browser) would connect to the machine specifying the host address and port, given as host.ipaddress:port in the browser's "Location" window:

198.242.244.47:80

And the web server running at port 80 would accept and respond to the client request.

When the server accepts a connection it assigns a socket to the connection. It needs a new socket to distinguish the connection from others being served from that port.

Note that the socket on the client side is not bound to the remote server port number. Rather, the client is assigned a port number local to the machine on which the client is running.

The client and server can now communicate by writing to or reading from their sockets.

The Janus family

A site that has a Janus product will probably have one or more of the other products in the Janus family, though no others are required. The Janus products are:

Janus TCP/IP Base Provides a direct connection between Model 204 and a TCP/IP network. The Janus IFDIAL Library is a no-cost C-callable API that operates in conjunction with Janus TCP/IP Base to provide access to Model 204 from a wide variety of platforms.
Janus Web Server Provides access to Model 204 data and objects to client browsers via the World Wide Web.
Janus Network Security Supports the Secure Sockets Layer (SSL) protocol, providing secure communications for users of Janus products.
Janus Sockets Provides HTTP socket-level connectivity between Model 204 and any software package or service that provides a sockets interface.
Janus Specialty Data Store Enables Model 204 to operate as a Sybase/Microsoft SQL Server, principally for the Sybase OmniConnect feature of Adaptive Server. Features include optimized translation of SQL into SOUL and cataloging tools to map unchanged Model 204 files onto normalized.
Janus Open Client Enables your Model 204 SOUL applications to invoke Sybase/Microsoft Remote Procedure Calls (RPCs) or language requests (for example, SQL) to one or more Sybase or Microsoft Open Servers and/or SQL servers.
Janus Open Server Enables you to create Model 204 SOUL applications which respond to requests from clients which use Sybase DB-Library Open Client calls and SQL EXECUTE statements.

A single Model 204 Online region can contain any number of the three different Janus server products (Janus Specialty Data Store, Janus Open Server, and Janus Web Server). A Janus Open Server or Janus Web Server SOUL request can also invoke Janus Open Client $functions; this enables server applications to exchange information with other Model 204 or non-Model 204 servers.

Janus, the Sirius Mods, and UL/SPF

The Janus family of products is itself made up of two distinct components:

  • A collection of object code enhancements to the Model 204 database-engine nucleus. These enhancements are distributed as components of the Sirius Mods and make up a collection of products including those in the Janus family.

    The Sirius Mods include many non-connectivity related products (such as Fast/Backup, Fast/Reload, and the Fast/Unload User Language Interface) that are not part of the Janus family. No Sirius Mods products are required to run a Janus product other than itself and Janus TCP/IP Base.

  • A collection of Model 204 procedures that contain SOUL, documentation, and assorted other data.

    These Model 204 procedures install and implement the components of the formerly named User Language Structured Programming Facility (UL/SPF), now known as RKTools. All the UL/SPF files reside in the SIRIUS procedure file, which also contains code and data useful to Janus product users. UL/SPF also includes files that are components of non-connectivity related products such as SirPro, SirScan, and SirMon.

    No other UL/SPF products are required to run any Janus product. Thus, to install a Janus product, both the Sirius Mods and UL/SPF must be installed, following the instructions in the Sirius Mods Installation Guide and RKTools installation, respectively. When the Sirius Mods are installed, all other products owned by the installing site that are part of the Sirius Mods will also be installed. Similarly, when UL/SPF is installed, all other products owned by the installing site that are part of UL/SPF will be installed.

Versions and compatibility

Because the Sirius Mods and UL/SPF have somewhat different release cycles, the version numbers for these two components will often differ in a distribution. For example, version 7.6 of the Sirius Mods might be shipped with version 7.3 of UL/SPF. All the products in UL/SPF depend on certain features being present in the version of the Sirius Mods that is installed in the Model 204 load module under which UL/SPF is running. This implies, obviously, that the Sirius Mods must be installed for any UL/SPF component to operate correctly. And, as of version 6.8, the Sirius Mods version must match or be higher than the UL/SPF version number.

The Sirius Mods however, do not depend on any particular features of the UL/SPF product, merely the presence of the UL/SPF SIRIUS file. The SIRIUS file contains the code for the sample Janus Web Server, and Janus port definitions have default rules that call to this file.

Any SOUL application (including UL/SPF) that uses the Sirius Mods will run correctly on subsequent versions of the Sirius Mods. It is, thus, always possible to upgrade the Sirius Mods without having to worry about upgrading UL/SPF. This is not to say that this is always a good idea, only that it is possible and that the installed version of a UL/SPF product will continue to run as it had before the Sirius Mods upgrade.

While the Janus family of products has a UL/SPF component, most of the critical code is actually in the Sirius Mods — object code enhancements to the Model 204 nucleus. The UL/SPF component of the Janus family consists mostly of utilities, examples, and documentation. Because of this, the version number of a Janus product is generally considered to be the version of the Sirius Mods in which it is contained.

Janus product documentation assumes that a site is running Sirius Mods version 6.7 or later and has installed UL/SPF version 6.2 or later. Any documentation that requires a later version of the Sirius Mods or UL/SPF will be clearly marked to indicate this. For example, a JANUS DEFINE parameter that is only available in versions 7.7 and later of the Sirius Mods will have a sentence such as "This parameter is only available in version 7.7 and later of Sirius Mods" in its documentation. If a feature, $function, command, or parameter is not indicated as requiring any specific version of the Sirius Mods, it can be assumed that it is available, as documented, in all versions of a Janus product; that is, all versions since version 6.7 of the Sirius Mods and version 6.2 of UL/SPF.

Related products

The Janus TCP/IP Base must be installed to use any Janus product. This is the only other Sirius Mods product that must be installed in a Model 204 region to use a Janus product.

In addition:

  • Janus SOAP

    Janus SOAP provides XML APIs for the parsing and generation of XML.

  • SirScan

    One of the convenient debugging features available with Janus products is a TRACE facility which logs Janus request/response information to the Model 204 journal. In addition, most of the debugging information for a Janus product goes to the Model 204 journal. If you don't have good tools to view the journal, using it for debugging is a tedious process. AUDIT204 and ISPF provide some capabilities for viewing the journal, but they have many inherent shortcomings and inefficiencies. Because of this, it is strongly recommended that any site that installs Janus Web Server also install SirScan.

    SirScan is a product in the UL/SPF family that facilitates the interactive extraction of journal information within the Model 204 region. It does so via a user-friendly web browser or full-screen 3270 interface and low-level routines to provide efficient access to in-memory and on-disk journal buffers. SirScan can provide an order of magnitude improvement in debugging efficiency for non-terminal-related Model 204 processes such as Janus Web Server, Horizon, BATCH2 and other Janus server applications.

    Note: If Limited Janus Web Server is available, SirScan is automatically authorized for viewing audit trail entries on WEBSERV threads.

System requirements

The current release of Janus products requires the following components to run:

  • Mainframe operating systems:
    • Any supported version of z/OS
    • z/VSE Version 4 or later or
    • CMS (releases currently supported by IBM) running under any supported version of z/VM
  • Model 204 Version 6 Release 1 or later
  • One of the following mainframe TCP/IP implementations:
    • IBM TCP/IP for z/VM or z/OS
    • InterLink TCP/IP for MVS - Version 1.1 or later
    • TCP/IP for VSE (Connectivity Systems, Inc., Columbus, OH) - Version 1 Release 4.0 or later

Janus Web Server also requires:

  • Any HTTP 1.0 or later compliant browser