Alpha Video Training
Results 1 to 9 of 9

Thread: A5 Desktop-Web-Applications: possibly a new model

  1. #1
    Member neil_albala's Avatar
    Real Name
    neil_albala
    Join Date
    Nov 2005
    Location
    Kitsap Peninsula (near Seattle)
    Posts
    126

    Default A5 Desktop-Web-Applications: possibly a new model

    Consider this article a theory on how Alpha Five version 8, with it's Enterprise Passive Linked SQL capability might be used to power a web community application where tens or even hundreds of thousands of users, participate with little or no server, or bandwidth, constraints. Can Alpha Five do this? I think so. Tell me if I'm wrong.

    You may have noticed that the pricing for multi-user Alpha Five runtime licenses get more expensive the more users you add. Whether you buy a 10 user runtime or a 200 user runtime, the maximum number of users, refers to the maximum number of concurrent users, NOT the maximum number of installed users. This restriction is, I believe, an extension of the the system's record locking logic.

    But what about Passive Link Tables and remote SQL updates? Since no record locking involved, I believe that there are no limits on how many users can access a remote database. Is this true?

    For instance: mySQL database connectivity is included with almost every web hosting plan. And bandwidth use from your web host, doesn't differentiate between HTML bandwidth and mySQL bandwidth, which means using any ordinary web hosting plan, it's possible to have many thousands of users sharing data without incurring any massive hosting or bandwidth costs.

    So here's my idea for a new kind of web-application. Since it uses the A5 desktop runtime, I call them desktop-web-application. It's really a desktop application that uses a remote database exclusively. When A5 refreshes a passive link table, it has the ability to restrict or filter the data, which means, if a time stamp field was added to every record, and that field was an index, then the desktop-web-application would be able to easily read only new data from the server, when refreshing Passive-Link Tables. That's a LOT faster than refreshing the whole table each time! As long as the time stamp is updated each time a user modifies a record, only new data need be read, to keep a full and perfect mirror of the remote database on the local computer.

    Alpha Five makes this easy. Searching and reading data is all done with the Passive Link Tables. The only hitch is that inserting new records, or updating existing records, cannot be done directly to the remote database. At least not in the traditional, networked data base fashion, where with record locking. No. In this way, the logic of a desktop-web-application is much more like a regular web application than a traditional networked database application.

    When inserts and updates are necessary, you have A5 put up a form. Then when the user is ready to write, (just like in a regular web application), they press submit button and a little bit of Xbasic + SQL, updates to the remote database done in an instant. In fact, if you look at the A5 Data Exploer: a right click on any table, gives you you a selection, "SQL Syntax - Insert Statement", where the exact SQL needed is already stubbed out for you. Mapping the Insert or Update form, to the Xbasic SQL statement is easy because both the SQL statement and the A5 form, were created from the same file definition. The SQL insert statement is generated directly from the remote database. The A5 insert or update form is generated directly from the passive link table, which is identical to the remote database.

    Maybe I've got something wrong here. But it seems that using this scenario, these A5 desktop-web-applications are the ideal platform for quickly developing web applications that can potentially handle a unlimited number of users, without high costs or slowing down under heavy usage, even in today's real world environment.

    I must be wrong about something. There has to be a reason why this is not possible. It seem to me that the Alpha Five Enterprise version now makes it easy to create a large scale web applications. Such a desktop-web-application, working off any remote (mySQL) server, with time stamped passive linked records, can potentially do everything a high end Java or PHP web application can do, BUT... faster and more efficiently. I say faster, because there is no server side services, (other than DB access) to slow the CPU. Meaning, the data does not need to be wrapped in HTML AND the DB table data is never read twice, as is always the case when web application users revisit pages for a 2nd or third time.

    So that's my theory? Think about it. Let me know what you think.
    Last edited by neil_albala; 03-29-2007 at 03:10 PM.

  2. #2
    Member Mario Prieto's Avatar
    Real Name
    Mario Prieto
    Join Date
    Apr 2000
    Location
    Las Cruces, NM
    Posts
    364

    Default Re: A5 Desktop-Web-Applications: possibly a new model

    I think you are right about the A5 web application server. I recently started using it and I have to say that it is pretty fast and reliable. if you couple Xbasic for database manipulation and Javascript for data validation, you can have a very fast and responsive web application. I currently host 2 web applications on a DSL connection and I got to tell you, they rival other web applications done with PHP and hosted on special servers with t-1 lines.
    If you buy the enterprise version, you can manipulate any database without using a passive link table. so far .dbf tables are an excellent choice for middle size web applications, up to 500 concurrent users ( I think).

    Good job alpha!!
    The Mexican

  3. #3
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: A5 Desktop-Web-Applications: possibly a new model

    Let's forget about SQL for a moment.
    Let's say, you have a DB for Hotel reservations and you developed WAS to allow the public to access your data online.

    If user A runs a query on the table on the server to find rooms available on 4/1/07 at the Miami location. The query shows 10 rooms available of which the user likes Rm #1501 because of the Ocean view.

    unbeknownst to User A, user B ran the same query for the same time period and for his luck, user B also likes Rm 1501.

    User A went on to make a reservation for Rm 1501.
    A nano second later, User B went on to make reservation for the same room.

    1-In a one-user app, what will happen with user B?
    2-What will happen if both user A & user B are both able to open the same reservation form, and while user A opened it first, yet he is a slow typist and User B beats him to the punch because she is a faster typist and she entered her info and saved before user A has a chance to?
    Last edited by G Gabriel; 03-29-2007 at 07:21 PM.

  4. #4
    Member
    Real Name
    Doug Page
    Join Date
    Jan 2002
    Location
    Vancouver, BC Canada
    Posts
    963

    Default Re: A5 Desktop-Web-Applications: possibly a new model

    Along the lines of what Gabriel is hinting at, this is really nothing more than the same type of synchronization problem you have with a central system and several laptop users. To a degree, synchronization works. Would I place my companies data in its trust? Not a chance. Real time processing is just that. It cannot be mimicked with a sync system. And I truly think that the amount of data moving across the net would also be slower than you think.

  5. #5
    Member 411tech's Avatar
    Real Name
    Barry Kucher
    Join Date
    Jul 2006
    Posts
    200

    Default Re: A5 Desktop-Web-Applications: possibly a new model

    I see one issue that might arise and which can be easily fixed. If you are going to rely on time stamps, then you MUST make sure the time of the local workstation has the correct time. You would need to read the regional settings of the computer to make sure that users on the east coast aren't overwritten by users on the west coast and so one. You would also need to connect to a time server and verify the time is correct.

    One issue that is not so easily fixed is the user rights limitations withing Microsoft Windows. If a user only has standard user rights, the user or any application the user runs CANNOT change the PC's clock.

    Time issues are things I am used to dealing with since I have written Time and Attendance applications that utilize biometric, swipe and data entry of timecard information. Luckily this was an inhouse project and I have control of user rights.

    Barry Kucher

  6. #6
    Member 411tech's Avatar
    Real Name
    Barry Kucher
    Join Date
    Jul 2006
    Posts
    200

    Default Re: A5 Desktop-Web-Applications: possibly a new model

    Quote Originally Posted by G Gabriel View Post
    Let's forget about SQL for a moment.
    Let's say, you have a DB for Hotel reservations and you developed WAS to allow the public to access your data online.

    If user A runs a query on the table on the server to find rooms available on 4/1/07 at the Miami location. The query shows 10 rooms available of which the user likes Rm #1501 because of the Ocean view.

    unbeknownst to User A, user B ran the same query for the same time period and for his luck, user B also likes Rm 1501.

    User A went on to make a reservation for Rm 1501.
    A nano second later, User B went on to make reservation for the same room.

    1-In a one-user app, what will happen with user B?
    2-What will happen if both user A & user B are both able to open the same reservation form, and while user A opened it first, yet he is a slow typist and User B beats him to the punch because she is a faster typist and she entered her info and saved before user A has a chance to?
    I have seen many websites use a system of locking a record for a predetermined amount of time when someone is reqesting it. To see it in action, go to ticketmaster.com and try to purchase tickets for a show. After the query returns tickets that you have requested you have about 10 minutes before they are released back to the pool.

    Barry Kucher

  7. #7
    Member neil_albala's Avatar
    Real Name
    neil_albala
    Join Date
    Nov 2005
    Location
    Kitsap Peninsula (near Seattle)
    Posts
    126

    Default Re: A5 Desktop-Web-Applications: possibly a new model

    Gab said, "Let's say, you have a DB for Hotel reservations..."

    Agreed. This model would not work for a hotel reservations system. In fact I'd say, this desktop-web-application model, would be a poor choice for any application that required any kind of transaction processing, or time sensitive data, such as scheduling. It's also a bad choice for any kind of retail application, because users are not going to want to download a 40 meg A5 runtime, just to make a purchase. (I think the runtime is about 40 megs)

    There your best choice would be the WAS (the A5 web application server). And let us remember, as Mario pointed out, that the A5 web application server already reads and WRITES to all databases without any coding.

    The desktop-web-application model, that I'm going to be using to develop my applications, will ALL be community based. Here's a few examples of what desktop-web-applications might be good for:

    1- Any kind of classified or ad oriented database. There's lots of new possibilities there, especially when you allow users to post URL's and embeded video references.

    2- A typical forum system, much like the vBulletin system this forum is using.

    3- Any kind of profile based community. Maybe we could share code on how to upload and manage jpg's.

    4- Any kind of internal mail, much like the internal mail you see on youTube, mySpace or even this forum.

    That was a good point from Barry411, about the time stamping. I hadn't thought that through, but now that you mention it... yes time zones would be a problem. I would probably look to poll the server for a time stamp. Or in a worst case scenario, use one of those little activeX controls to grab time from one of the many internet time servers.

    Doug had an interesting idea: that advanced synchronization logic is probably available somewhere as open source, and that logic, could be applied to table synchronization routines, which would allow for much more robust applications. Maybe some of us could work on that together.

    I am VERY encouraged that no one said this can't be done. The profit-model would be identical to most Java and PHP web applications. 1- New users get FREE access. 2- Income comes from premium services or advertisements.
    Last edited by neil_albala; 03-30-2007 at 02:29 PM.

  8. #8
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: A5 Desktop-Web-Applications: possibly a new model

    Neil:
    It certainly can be done. That's the magic of the internet, so long as you are aware of the limitations.

    And one other point:
    with it's Enterprise Passive Linked SQL capability might be used to power a web community application where tens or even hundreds of thousands of users, participate with little or no server, or bandwidth, constraints
    Remember, the bottleneck here will be...alpha itself.

    ..and yet another point, the main point:
    with little or no server.
    there will always be a server..data do not exist in vacuum. Those passive links SQL, connect to data on a server that exists somewhere...so you are substituting your own server with those server(s) indirectly through alpha!
    Why?
    Only advantage(s) would be:
    a-Bigger Server
    b-Better server
    c-No need to maintain the server.

    Otherwise, I don't see any other benefits.

    You are just using alpha to connect to and piggy-back on the "big boys".
    Last edited by G Gabriel; 03-30-2007 at 04:16 PM.

  9. #9
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: A5 Desktop-Web-Applications: possibly a new model

    ..Cut short of finishing the last reply:

    ...don't take me wrong: this is a great idea to "Leverage" alpha and tab into the big server(s), as if, they were your own.

Similar Threads

  1. Web applications
    By Conrad Lindes in forum Web Application Server v7
    Replies: 1
    Last Post: 11-06-2006, 02:51 PM
  2. On the LAN: desktop vs web applications
    By jmatienza in forum Web Application Server v7
    Replies: 16
    Last Post: 05-30-2006, 12:51 AM
  3. Web Applications
    By Paul Kendall in forum Alpha Five Version 6
    Replies: 3
    Last Post: 01-24-2005, 06:37 PM
  4. Desktop to Web conversion
    By Page Sands in forum Alpha Five Version 6
    Replies: 9
    Last Post: 12-09-2004, 11:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •