LDAP and Directory Services

A directory service is a software system that stores, organizes and provides access to information in a computer operating system’s directory. It helps us to detect names and their corresponding values very much like a dictionary. A directory is similar to a database, which links the names of network resources to their respective network addresses.

There are diverse ways to provide a directory service. Various mechanisms support different types of information to be stored in the directory, place different requirements on how that information can be referenced, queried and updated, security measures to protect it against unauthorized access etc. Some directory services are local; others are global providing distributed service spread across many machines.

LDAP (Lightweight Directory Access Protocol), as the name itself implies, is a lightweight industry standard application protocol for accessing and maintaining information in X.500 directory services. LDAP is a compendium of four models models that fully describe how it operates, what data can be stored in LDAP directories, and what can be done with that data:

  1. An information model that describes what you can put in the directory.
  2. A naming model that describes how you arrange and refer to directory data.
  3. A functional model that describes what you can do with directory data.
  4. A security model that describes how directory data can be protected from unauthorized access.

LDAP is a message-oriented protocol. The client constructs an LDAP message which consists of a request and sends it to the server. The server processes the request and sends the result(s) back to the client as a series of one or more LDAP messages.

LDAP has nine basic protocol operations, which can be divided into three categories:

  1. Interrogation operations – search & compare: These two operations allow you to ask questions of the directory.
  2. Update operations: add, delete, modify, and rename DN (Distinguished Name): These operations allow you to update information in the directory.
  3. Authentication and control operations: bind, unbind, abandon: The bind operation allows a client to identify itself to the directory by providing an identity and authentication credentials; the unbind operation allows the client to terminate a session; and the abandon operation allows a client to indicate that it is no longer interested in the results of an operation it had previously submitted.

WAP (not to be confused with Wireless Access Point)

The evolution of cellular networks has resulted in many mobile services primarily for voice. Eventhough mobile users desired to access the internet, the Internet Protocols were not designed to operate efficiently over mobile networks.

WAP (Wireless Application Protocol) is the existing global standard for maintaining Internet communications and advanced telephony services on digital mobile phones, pagers, PDAs and other wireless terminals.

WAP the standard developed by the WAP forum, addresses these issues nicely by adapting to the restrictions of the wireless network such as low bandwidth, low display capability, limited input facilities and less connection stability. It is the set of rules governing the transmission and reception of data by computer applications on or via a wireless device like mobile phones.

WAP interfaces with different entities through the use of a gateway/proxy and a set of lightweight scripts. These scripts covert information in a format that is suitable for transmission over wireless and for presentation on a small wireless device with limited display capability.

The key features provided by WAP include:

  • A programming model similar to the Internet
  • Wireless Markup Language(WML)
  • WMLScript
  • Wireless Telephony Application Interface(WTAI)
  • Optimized protocol stack

When we try to success a website from a mobile device through a micro-browser, the device searches for service by sending out a radio signal and a connection is made with the service provider. A request is sent to a gateway server using WAP. The gateway server retrieves the information via HTTP from the Web site. The gateway server encodes the HTTP data as WML.

To create wireless Internet content, a Web site creates special text-only or low-graphics versions of the site. The data is sent in HTTP form by a Web server to a WAP gateway. This system includes the WAP encoder, script compiler and protocol adapters to convert the HTTP information to WML. The gateway then sends the converted data to the WAP client on your wireless device. You see the wireless Internet version of the Web page you selected.

This exchange relies on features on the different parts of the WAP Protocol Stack.wap-architecture

  • WAE (Wireless Application Environment)
  • WSP(Wireless Session Protocol)
  • WTP(Wireless Transaction Protocol)
  • WTLS(Wireless Transport Layer Security)
  • WDP(Wireless Datagram Protocol)
  • Network Bearers (Exiting technologies such as SMS, USSD, GPRS, CDMA)

USSD – Unstructured Supplementary Service Data

It is a protocol used by GSM (Global System for Mobile) networks for communication between mobile phones and the service provider’s computer. This is a session based protocol. USSD establishes a real time connection, and hence allows data to be exchanged two ways, like a dialogue. Subscribers are able to query information and in response, trigger services from the Network Operator.

A USSD Gateway is used to route USSD messages from the signalling network to the service application. A gateway is an intermediary node between two networks that communicate with each other. USSD Gateways are usually owned by Mobile Network Operators. On the physical side, USSD gateway may contain devices such as protocol translators, signal translators, rate converters, and fault isolators etc. to facilitate system interoperability.

In comparison to SMS (Short Message Service), USSD is more easy to use. The technology is universal i.e. it is accessible from all kinds of mobile phones and requires no special configuration.

Nowadays, USSD is used to provide services that involve interactive structure; banking services, customer self-care, information services, payments, quizzes, polls etc. The subscriber doesn’t have to wait because the responses are automated. USSD also allows roaming, increasing availability even when the subscriber is away from the home network. The service provider is able to update the USSD menus at any given time.

Nevertheless, when using USSD, subscribers may encounter problems due to session time-out thus losing their progress. USSD Short Codes are also comparatively less memorable. Besides, the information obtained cannot be stored, and as a result the service has to be combined with SMS in situations like receiving exam results or transaction receipts.

USSD is supported by WAP (Wireless Application Protocol). WAP (not to be confused with Wireless Access Point) is the de facto worldwide standard for providing internet communications.

An Analogy on DBMS

In this post I’m going to give you a concise comparison of some popular DBMS (Database Management Systems) in use today, based on my observations.

MySQL is a fully featured RDBMS (Relational Database Management System). It is used in Open Source projects and web applications since it is free software. MySQL can be compiled on many platforms. And there are a horde of GUI tools to manage the databases, like MySQL Workbench.

In addition to the standard features such as tables, indexes, stored procedures it also offers updatable views, triggers, cursors, query caching, partitioned tables and clustering. It is relatively light-weight and offers a lot of free features despite of the server growth.

MySQL is mostly used to store data for web applications typically as part of the popular LAMP stack(Linux, Apache, MySQL, PHP/Python/Perl), while ORACLE Database is mostly used in large enterprise scenarios.

ORACLE Database is an object-relational database management system produced and marketed by ORACLE Corporation. The ORACLE RDBMS stores data logically in the form of tablespaces and physically in the form of data files

Unlike MySQL, ORACLE calls for a lot of in-depth knowledge and skill to manage large environments. An added feature is RMAN (Recovery Manager) which supports backups and runs a central repository. The data dictionary in ORACLE is also comparatively more detailed.

ORACLE consists of several tools that support you in creating applications with ease and flexibility. The features and tools that you choose to implement your application can substantially affect its performance.

Several of the more convenient aspects available to ORACLE application developers are integrity constraints, stored procedures and packages, database triggers, cost-based optimizer, shared SQL, locking and sequences.

MongoDB is a well known NoSQL (Not Only SQL) database which is non-relational and document oriented. Instead of storing your data in tables made out of individual rows like a relational database does, it stores your data in collections, made out of individual documents.

In MongoDB a “document” is written in BSON and has no particular format or schema. BSON files are really a modified version of JSON(JavaScript Object Notation) file (binary+JSON). A document is a self-contained piece of semi-structural data, and it doesn’t link to other documents.

MongoDB is considered good for situations where data integrity isn’t a pressing concern like large busy websites. But it has a major limitation when it comes to joining tables.

In conclusion, each one excels in certain scenarios and is ill-suited for others. And because of their very different structures each one contains features not found in the other, it is up to us to choose the best suited to our own requirements.

A Glimpse at Databases

The word “Databases” is a familiar, widespread word nowadays. In the modern world where terabytes of information is exchanged across the internet, databases are detrimental in managing all the haphazard information and also importantly make use of it in a productive way.

Humans have always sought to model and represent the real world in some way, and databases are one of them.  You can create them too! When you collect some data that are connected in some way and organize them, you can have your very own database. Organizing data into databases means that you don’t have to repeatedly enter information that already exists. Also it helps you to easily find what you need.

DBMS (Database Management Systems) are computer applications that help us to capture data and analyze it. Many popular databases currently in use are based on the relational database model – called RDBMS (Relational Database Management Systems), which are in use since the 1980s.

A database is not generally portable across different DBMSs, but disparate DBMSs can interoperate by using standards such as SQL, ODBC and JDBC. These allow a single application to work with multiple DBMS.

RDBMS are managed by a special-purpose programming language called SQL (Structured Query Language). SQL is a declarative 4th generation language with some procedural aspects, designed for managing data. It consists of data definition language and data manipulation language.

The syntax encompasses Language Elements such as Clauses, Expressions, Predicates and Queries, Operators, Data definition, Data manipulation, Data types, Data control etc.  By exploiting these features, we are able to insert data, query, update, delete, create schema and modify them using SQL.

ODBC (Open Database Connectivity) is a standard programming language middleware API for accessing DBMSs. This uses a “driver” to translate the queries into commands that are comprehensible by the DBMS. ODBC is also language independent.

JDBC (Java Database Connectivity) is an API for Java that facilitates Java programs to execute SQL statements. Since JDBC is designed specifically for Java, an “ODBC-JDBC Bridge” is used to connect to an ODBC-enabled data source in a JVM host environment.

📷 Samuel Zeller