Sybase Business Intelligence Solutions - Database Management, Data Warehousing Software, Mobile Enterprise Applications and Messaging
Sybase Brand Color Bar
  blank
 
 
 
 
 

Synchronizing through the SQL Anywhere Relay Server

The Relay Server is new to SQL Anywhere 11, and the UltraLiteJ demo application I just posted uses it during synchronization. I was surprised how much of a difference it made being able to use the same synchronization setup in a simulator and a real device, and whether I was at home or at work, so here is a description of the hosted Relay Server and how to use it in as few words as possible.

The Relay Server is a web server extension that allows MobiLink synchronization to take place from anywhere to anywhere, even through firewalls. Synchronization takes place using outbound calls to the Relay Server from the synchronization client and also from MobiLink server. So if a browser can go through your firewall, so can MobiLink Server.

Sybase hosts a Relay Server to make life easy for developers. It’s not available for production use at the moment.

Steps to using the hosted Relay Server:

  1. Set up an account on the hosted relay server and configure your Relay Server.
  2. Configure your synchronization client to use the right URL.
  3. Configure your server. Run a program called the Relay Server Outbound Enabler (RSOE) that connects your MobiLink server to the Relay Server.

Here they are, one at a time.

Setting up an account and configuring the Relay Server

  1. Start here.
  2. Click Register and fill in the form with the usual name, company etc.
  3. Login.
  4. At the bottom of the account information page (click Manage Account), click Add New Farm. A farm contains a number of servers, but for this walkthrough it’s just a single server.
  5. Choose a name (no spaces), like MyFarm, leave the Type as MobiLink, add a Server 1 Name like (MyFarm1) and click Create Farm.
  6. Click Configuration Instructions. The page gives the instructions you need for configuring your client and your server. I’ll just walk through some here so you get the idea.

Configuring your Client

If you are using an UltraLite client with HTTPS synchronization, you need to set its stream parameters to this:

host=relayserver.sybase.com;url_suffix=ias_relay_server/client/rs_client.dll/<account-name>.<farm-name>”

For other clients, the instructions are similar and you can read them in the Configuration Instructions page.

Configuring your MobiLink Server

The Configuration Instructions page lists the server instructions too. For a single server you have to do two things: Run a Relay Server Outbound Enabler (rsoe.exe in your SQL Anywhere 11\bin32 directory). The command line has the arguments listed as a configuration file.

rsoe -f <account-name>.<farm-name> -id <server-1-name> -t <generated-key> -cr “host=relayserver.sybase.com;https=1;port=443″

I also add a log file (-ot <server-1-name>.oel) to my command lines.

Start your MobiLink Server with the same connection options that you usually provide, and listening on the http protocol with the -x command line switch.

mlsrv11 -c “dsn=<data-source-name>” -x http

If port 80 is in use on your machine then you will have to start the MobiLink server specifying a port, for example -x http(port=90) and you will also have to add an option to the rsoe command line (-cs “port=90″).Now start your MobiLink server, start your outbound enabler (rsoe) and you should be able to synchronize from anywhere to anywhere. First time is a bit tricky, but once you have it working, you’ll be hooked.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Leave a Reply

Sybase privacy policy

*