Results 1 to 4 of 4

Thread: VB6 Serverless-Functions (placed in the Cloud)

  1. #1

    Thread Starter
    Join Date
    Jun 2013

    VB6 Serverless-Functions (placed in the Cloud)

    Serverless Functions:

    ...well, are not really serverless (duh...)

    They are of course hosted behind Internet-servers, but "on systems you don't have to buy or maintain".

    They become more and more popular these days, and are (despite the hype), indeed useful...
    Especially since most big cloud-vendors offer them up with truly generous "free calling-contingents"
    (which are sufficient for most hobby-purposes, and smaller "professional usecases" as well).

    The problem with most cloud-vendors these days is, that they don't make it easy for "starters with cloud-stuff".
    Because to be able to test a few of these services (especially those they offer without costs), you'll have to:
    - give them a whole lot of personal data
    - along with your credit-card-infos, phone-number, home- or company-address and whatnot ...
    Makes you start wondering, why they don't ask for your "shoe-size or the name of your cat" as well...

    Took me a while, to find a decently large vendor, who made:
    - the "sign-up-process" as easy as can be (done by importing credentials from a normal GitHub-account)
    - offers good performance - also when the generous "free contingent" is used
    - and has a good reputation among developers

    Vercel (former Zeit/Now) fulfilled all that (homepage at Vercel.com) -
    but if you know other vendors, please let me know in this thread...

    As for "signing up" with this vendor - the only thing required, are credentials for an existing:
    GitHub, GitLab, or BitBucket account (which most devs already have these days).

    A few more infos about concrete Account- and Token-creation are contained in this thread over here:

    What you can do with it:

    Well - that depends...

    For example - the vendor in question specializes in "automatic builds for several different server-environments/serverside-languages"
    (using a tight connection with GitHub or other Repo-Providers, so that a simple "Git-Push" results in an automatically rebuild test-environment, which is then reachable via publically provided "Vercel-URLs" (but also behind your own domain-names, if you configured the Domain-mapping this way).

    The above is the main-usecase Vercel has specialized in, but one doesn't have to use that "automatic GIT-sync + rebuild feature" -
    one can use the provided Server-functions for other means as well (without incorporating any Git-Repos).

    What's also included is "Serverspace in the Cloud for the static parts of a build".
    (meaning, one can upload "static" Files with the Vercel-WebAPI as well, and thus use it as a FileStore which is always online,
    offering other Users public, internet-reachable Download-URLs (for images, *.html, *.css, *.js, *.json and *.zip).

    The serverless functions themselves work stateless, and are mainly used, to "manage workflow":
    - e.g. you can (event-)trigger them from other parts of a given workflow
    - passing data into them (usually JSON these days)
    - let them massage the received JSON-data internally
    - and the processed changes on the incoming data can then be:
    - either passed back to the caller in their entirety
    - or "passed further along" into other (serverless) functions on other Web-URLs

    So what's important apparently (to make good use of them), are EventProviders who emit "some initial JSON" to start a Workflow-processing.

    I guess the question you have now is probably:
    "Does Vercel (besides serverless function-hosting) also offer its own Events, to start something?"

    And the answer is:
    Kind of, via a special http-API-function, which offers a "streamed endless log",
    by triggering it via a long-running (only in case of an error, returning) https-request.

    One can "hook" to that Event-log-stream quite easily with the WinHttp5.1-Class in async-mode -
    and trigger Events by calling a serverless function (the function-name then showing up in the Eventlog).

    In the VB6-demo below, I've implemented a little Internet-Chat, which makes use of that EventLog-hooking,
    showing how one can use the Vercel-API as a Push-message-service (without any highfrequent Polling).

    Also included in the DemoZip-Folder is VercelAPI.vbp, which I suggest starting with first,
    because it describes the Web-API (function- and static-file deployment) in more detail.

    Here is the Demo-Code:

    Have fun,

    Last edited by Schmidt; May 4th, 2020 at 07:33 AM.

  2. #2
    Frenzied Member
    Join Date
    Dec 2014

    Re: VB6 Serverless-Functions (placed in the Cloud)

    you forgot to mention that we need vbRichClient5 to make it work.

  3. #3
    Addicted Member
    Join Date
    Jun 2016

    Re: VB6 Serverless-Functions (placed in the Cloud)

    very good work, very interesting and useful.
    I will have to study the code well to understand it.

    could be simplified, a cVercel class for important functions and events.
    and then separately the projects


  4. #4

    Thread Starter
    Join Date
    Jun 2013

    Re: VB6 Serverless-Functions (placed in the Cloud)

    Quote Originally Posted by yokesee View Post
    could be simplified, a cVercel class for important functions and events.
    and then separately the projects
    Not sure what you mean with the above text...

    cVercel encapsulates the Vercel-http-API in a VB-friendly manner...
    (well, 70-80% of the API, the most important parts).

    Do you mean to split the cVercel-Class itself up into separate parts?
    (wouldn't recommend to do that).


Posting Permissions

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


Click Here to Expand Forum to Full Width