Demo difficulties

I’m experiencing unexpected major technical difficulties in producing a functional demo of a Servoy solution.

I’m ready to go to market. Last step is to put up a decent demo, one which anyone can access to at any time, no special procedures, just download the Servoy Client applet and log on. Go immediately to a set of sample records. Navigate around, create new records, alter existing ones, experiment. And when the prospect is gone the sample records revert to their original condition.

In addition, the system should be able to accommodate several demo users simultaneously. For marketing reasons it just won’t do to ask a prospect to come back later. So, support for several concurrent users is important.

It’s quite possible with Servoy for multiple computers to log in with the same user name and password concurrently. I’ve done it, logged on with my beta tester’s user name and password while he also is also up and running.

In other words one Servoy security user name and user id can be seen as having two different IP addresses simultaneously.

This fact will create difficulties for the database if I start a transaction as soon as someone logs on as “demo”. From experience I’ve discovered this vulnerability can lock out all users from logging on.

I’m using Sybase ASA. Someone has suggested:

Transactions also lock data so if you use them in multi user systems always use them with caution, if you use them a lot use a database with multiversion capabilities like Oracle or Postgres.

For demos transactions are not the way to go.

An alternatives would be to rebuild the sample records nightly. Not a good solution for two reasons. The system could be in the midst of rebuilding when someone in Asia is logged on (middle of the day). And most prospects would see whatever mess was left behind by previous users that day. Less than ideal on both counts.

I’ve also received this recommendation:

You can consider using the sql plugin to perform delete and insert statements upon log-off or use a stored procedure for this.

I’m not sure, but I suspect this scenario is just as vulnerable to being triggered when someone else is logged onto the demo.

I’m not keen on switching databases at this late stage and Sybase ASA has been just fine thus far. Nevertheless I’m willing to entertain the idea.

Another Servoy user who uses Postgres said this:

I don’t know if PostgreSQL is gonna solve your problem. Even though PostgreSQL has multiversion capabilities I still have sometimes a lock like you describe.

My guess is that this has to do with the Servoy framework. Since your client connects to the database through servoy then Servoy is the one that owns the database connection (and thus the session). Most of the time that is only 5 to 10 connections at the same time (a preference you can set in the Servoy database connections).

I think you have to ask Servoy how they handle transactions in Servoy. Like will it reserve a connection for the duration of that transaction so that the database can keep them seperate?

I’ve gone onto one of Sybase’s public forums to get advice from that direction. They offer two suggestions.

  1. Create temporary tables when the prospect logs on as “demo”, kill the temporary tables when they leave.

The concept (and management) of temporary tables is new and strange to me and I’m not sure whether existing forms would present data from temporary tables or manage relationships properly.

  1. Create several identical sets of demo records. When the user logs on, direct them to an unused set. Start a transaction when they log on, roll it back when they quit.

This would work if I first checked to see which of my demo sets was currently unused and changed their assigned Servoy security id to the one associated with that set. I could do that, but I see no available Servoy function which will do that. In Servoy it would appear only the Servoy Client user can set the Servoy security user id.

To summarize, I need a way for several prospects to log on to a demo concurrently. Each demo tester doesn’t interfer with the actions of other users. And the demo records remain unchanged when the tester quits.

I seem to be blocked in each direction I turn. I need a workable scenario.

Kind regards,

Hi Morley,

I can think of 2 solutions:

  1. Make it ‘multi-company’.
    A user can register him/herself and gets a unique id (in the database).
    This ID is used in all other tables and filtered upon.
    This way a user sees ONLY his/hers data.
    It’s a lot of work though.

  2. Auto-restore the database every 30 minutes (or so) and flush the clients. This could be done by a crontab or something.
    Or if it’s just a case of cleaning up (deleting the data) then use a batchprocessor and all clients will be updated automatically.
    I’ve seen other demo solutions (a CMS in this case) work in this manner.
    Just clearly state on your website that it does this.

Hope this helps.

ROCLASI:
Hi Morley,

I can think of 2 solutions:

  1. Make it ‘multi-company’. A user can register him/herself and gets a unique id (in the database). This ID is used in all other tables and filtered upon. This way a user sees ONLY his/hers data.

It’s a lot of work though.

I’m an FMP-refugee, aware of SQL in the broad strokes but not up to speed in the details. Sorry, don’t understand the above.

ROCLASI:
2. Auto-restore the database every 30 minutes (or so) and flush the clients. This could be done by a crontab or something. Or if it’s just a case of cleaning up (deleting the data) then use a batchprocessor and all clients will be updated automatically.

I’ve seen other demo solutions (a CMS in this case) work in this manner. Just clearly state on your website that it does this.

Sounds and feels like a measure to take as a last resort. Even when warned in advance (not all users read or retain what they’ve read) it’s not good marketing to bump off a prospect who’s right in the process of assessing a solution with colleagues all gathered round.

Were I to go this route I’m uncertain of the mechanics of a “crontab”. I’ve succeeded in programming several SQL queries and have a batch processor running now. That was a tough learning curve and I surmounted it. But I’m very much aware of my SQL limitations.

From a marketing and also coding perspective I’m hoping there are alternatives.

Morley:

ROCLASI:
Hi Morley,

I can think of 2 solutions:

  1. Make it ‘multi-company’. A user can register him/herself and gets a unique id (in the database). This ID is used in all other tables and filtered upon. This way a user sees ONLY his/hers data.

It’s a lot of work though.

I’m an FMP-refugee, aware of SQL in the broad strokes but not up to speed in the details. Sorry, don’t understand the above.

I don’t know that this would require any special knowledge of SQL. I was going to suggest something similar to Robert’s idea, and these are the thoughts I have re how to achieve this:

  1. Run a method upon solution load that creates a record in a DemoUsers table which has an incrementing serial PK. Load the PK into a global variable. Then the mehod will create all the requisite sample records, populating a UserID field with the value from the global variable.

  2. For the New Record command, attach a method (could be a global method if you don’t have tabel-specific New Record methods) that enters the UserID into a field.

  3. On all forms, filter the found set by the value in the global variable.

Looking again at #1 above, you might wish to make your onLoad method take the user to a record in DemoUser that presents fields for their name, company name, contact info. Then a “Start Demo” button can validate that the info you wish them to enter has been typed in, and creates the sample records for them. This way you have the ability to capture info re potential customers.

kazar