HOME
stuff you never thought you wanted to know.

 

 
Programming mobile handheld devices.

Programming mobile handheld devices
written by Jon Berg <jon.berg|a|turtlemeat.com>

Discovery of Services
Service Discovery of Web Services
Web services have proven to be an efficient way of exporting functionality to Internet applications. The key entities in the web service architecture are XML, SOAP, WSDL, and UDDI. Web Services is useful for mobile devices since it provides a good
interoperability between various devices and systems.

WSDL
When a web service is set up, the clients that are going to use it needs to know where it is located, what it can do and method structure and input and output parameters you need to call it. This information can be described using Web Services Description Language (WSDL). WSDL is described using XML.

UDDI
The Universal Description, Discovery and Integration (UDDI) is the mechanism used for finding a web service. The UDDI service is meant to be called by SOAP messages and to provide access to WSDL documents. This will enable use of the UDDI to find a proper web service and how to interact with the web services listed in its directory. In the UDDI the service will use an URI to define the actual server and path on the server. This will have to be located using DNS.

Using Web Services
The proper way of using a web service is to do a lookup in the UDDI for the required service. Then the client can start communicating with the service by sending SOAP messages. The SOAP messages can then be delivered by HTTP to the Web Service. If the Web Service needs to reply SOAP messages will be sent over HTTP back to the client.

It seems today that the method of dynamically discovering of web services through UDDI is not widely adopted in today’s applications. Most applications that use web service are preconfigured to use one or more known web service. The web service is configured by a URI and then looked up through DNS.

Universal Plug and Play (UPnP)
UPnP is Microsoft's approach to service discovery. It is designed to extend the original Plug and Play model. The new UPnP will be able to support a more dynamic networked environment from many vendors [6]. When a device connects to the network, the UPnP discovery protocol allows the device to advertise its services to control points in the network. The fundamental exchange is a discovery message containing a few, essential specifics about the device or one of its services, for example its type, identifier, and a pointer to more detailed information. The UPnP discovery protocol is based on the Simple Service Discovery Protocol (SSDP). It can run over many types of network protocols from Ethernet to IrDA.

Service Discovery in Bluetooth
The Bluetooth standard defines Service Discovery Protocol (SDP). SDP is created to let Bluetooth devices figure out what other Bluetooth devices can offer. This is done in two way either searching or browsing [5]. When searching for services you specify the capabilities as Universally Unique Identifiers. General capabilities can be
combined into patterns to get specific capabilities. When browsing for capabilities UUI of the various devices are built into a browsable tree. To use Bluetooth with J2ME you can use the JSR 82 library.

The steps an application would make to discover email service and send email using Bluetooth [4].
1. Inquire: In a new environment, the device automatically initiates an inquiry to find an access point. All nearby access points respond with their addresses, and the device picks one.
2. Page: Synchronize the device with the access point.
3. Establish a link: Link Manager Protocol will establish a link with the access point.
4. Discover services: The LMP uses the Service Discovery Protocol (SDP) to find out what services are available from the access point. It is assumed that the email service is available.
5. Create an L2CAP Channel: The LMP uses information obtained from the Service Discovery Protocol (SDP) to create an L2CAP channel to the access point. The application may use this channel directly or use a protocol like RFCOMM (Radio Frequency Communications Protocol) that might be running over L2CAP. RFCOMM emulates a serial line.
6. Create an RFCOMM channel: Depending on the needs of the application, an RFCOMM channel (or another channel) is created over the L2CAP channel. Creating an RFCOMM channel allows an existing application that works with serial ports to work with Bluetooth as well, without any modifications.
7. Authenticate: This is the only step that requires input from the user. If the access point requires authentication, it will send an authentication request, and the user will be prompted to enter a PIN to access the service.
8. Log in: If the devices use the Point-to-Point Protocol (PPP) over RFCOMM, a serial port is emulated, and the user can log in to his email account.
9. Send and receive data: The email client and the access point now use standard network protocols like TCP/IP to send and receive data.

Service Discovery through JINI
JINI [7] is a system from Sun Microsoft that lets clients easily discover services when they become available. JINI provides a decoupling of processes through a tuple space called JavaSpaces. JINI is an entirely Java based system that stores Java objects represented by tupples. Reading a tupple is done by posting a template tupple that is used for maching in the tupple space. JavaSpace is only a part of the JINI system. Communication in JINI is based on Java RMI.

Lookup in JINI [7] could be done by having a service announcing it self by adding a new tupple describing it self to the tupple space. It is however not implemented in such a way. It is implemented with a specialized "lookup service". A service registers it self in the lookup service by providing a set of (attribute, value) pairs that describe the service it offers. A client can do a lookup in the same way as reading in the tupple space, by providing a template for the service it wants to the lookup service. The lookup service will provide a service item if a match is found. This service item will contain a reference to a object implementing the service. This object can often be called with RMI. Lookup of the lookup service it self is done using multicast, which only works for networks supporting it like LAN. The lookup service address can be
cached to reduce the need for multicast.

 

Programming mobile handheld devices
Sections in the article
Introduction to programming mobile handheld devices
Handling of temporally lack of network
Locating devices
Discovery of Services
Effective use of limited resources
Location-Based Services
Synchronization
Security
User involvement in selection of service with concerns to price and quality
References

 
 



Linux
Setup Software Raid 1 with LVM
Setup Linux with Desktop

Google
Manage your website ads with DFP
Google AdSense for Domains - not so great
Let Google Handle Email for your Domain Name
Page Rank banned by Google
Google's highest ranked web pages
SEO intelligent spam causes irrelevant search results
Google Sandbox
Google ranking factors
How to not give out page rank in web page links

Web Server Programming
Simple Java web server
Simple Python web server
Configuring Apache webserver with .htaccess file

Windows
Turn off the loginscreen in XP, after installing .NET .

Turn off xp login screen unread mail count
What is .NET

Web (webmastering)
Introduction to Cascading style sheets (CSS)
The value of Alexa traffic rank
HTML META tag, not a search engine optimization tool
Create a maintainable webpage with modularization
The www prefix in your domain name
What is RSS and cool things RSS can be used for
MySql backup and restore with phpMyAdmin

Mix Computer related text
Doing business (making money) with Information Technology
Business with Computer Science
Research in Computer Science
Current and future possibilities of Medical Informatics
Tasks that make sense to have automated
Programming handheld mobile devices (overview)
Security tips for the web surfer
Price and Capacity in computer hardware
Java RMI Tutorial.

Microsoft Word
Page numbering in Word
Numbering headers or outlines in Word
Create a List of Figures
Turn off the default collapsing menus in Word




Turtlmeat.com 2004-2011 ©