Official Content

FestivalTickets is a Web application that allows participants to register for events. 

A key characteristic of this system is that it must be able to handle massive numbers of users, scaling properly for 1 user as well as for millions of users. In addition, this system must be deployed in the Cloud, using the Cloud services provided for maximum scalability at the lowest possible cost. 


In this example, you can see an application with an architecture that involves multiple components, the GeneXus model to generate those software elements, and the code that was written to create the infrastructure on which the application runs.

The architecture of the application obtained has the following components:

  • Single-page application (SPA) hosted on a serverless environment (Amazon S3/Azure Storage)
  • Functions running on a serverless, event-driven compute service (AWS Lambda/Azure Functions), served through an API gateway (Amazon API Gateway/Azure API Management)
  • Message Queues on a serverless service bus (Amazon SQS/Azure Storage Queue)
  • Data stored depending on its nature and purpose in a:
    • Key-value NoSQL database service (Amazon DynamoDB/Azure CosmosDB)
    • Serverless object storage service (Amazon S3/Azure Storage)
    • Relational database service (MySQL on Amazon RDS/Azure SQL Server)

In this first version of the sample, the SPA was generated with Angular, and the rest using the Java Generator; everything runs on Amazon WebServices (AWS) and Azure.

Live demo, etc.

Demo: (Spanish audio)
KB Tour: (Spanish audio)
AWS step by step setup: 
Azure step by step setup:

Angular App
Amazon AWS:

Note: FestivalTicketsHome is the Main Object for Angular. BOHome is the Main Object of the backoffice.


Since it is a highly scalable application, it was decided to use a serverless solution similar to the one used in the “Coronavirus UY” app.

Amazon AWS


Microsoft Azure


Why Serverless?

Because it allows us to scale the computation indefinitely through the AWS Lambda or Azure Functions, paying only for what is used. If there are no requests, the cost is 0. It also allows us to use services managed by the cloud, which don't require intervention from our team.

The solution has the following features:

  • Frontend (HTML/JS/CSS)
    • Generated in Angular and stored cloud storage ( AWS Amazon S3/Azure Storage). 
  • Frontend services backend
    • Angular App services are hosted on AWS (Lambda using API Gateway as API Mediator) or Azure (Azure Functions and API Management). Generated using Java technology. 

Data reading is performed against a non-relational database (Amazon DynamoDB/Azure Cosmos DB)

Why cloud non-relational database?

Because it allows us to scale indefinitely in terms of data storage. 

As for writing, when a ticket is created, it is sent to a message queue ( Amazon SQS/Azure Srorage Queue), and in this way the response is immediate. This message queue will be automatically processed by a function (AWS Lambda or Azure Function) called "ProcessTicketQueue." It will store the tickets in non-relational db and MySQL.

The draw is performed by another function (AWS Lambda or Azure Function) function called "ProcessTicketRaffle" of timer type that checks periodically if there is a closed event. When it finds a closed event, it performs the ticket drawing, assigns the winning tickets, and ends the event.

The services used for storage, queue, backend and process and non-relational database services are serverless by definition. For this reason, it is not necessary to manage servers and the application will have a predictable performance, for any number of users.

Source code and requirements



Sketch file: It is the 'ScalabilitySample_gxsketch' File object in the KB.


KB: FestivalTicketsKB
License: Apache License 2.0


GeneXus 18 Upgrade 3

Angular Generator requirements.

Amazon AWS

Microsoft Azure

Steps to run the application

  • Create KB from Server
  • In Frontend, select Angular in Main Platform and set "FestivalTicketsHome" as main object
  • Create the necessary infrastructure in AWS/Azure (described below) and set the following properties in the KB
  • Rebuild All

Infrastructure as Code (IaC)

To make it easier to build the necessary infrastructure in production, the infrastructure is created from code (IaC).

GitHub repository:

In the repository, you can find the requirements and steps needed to create the infrastructure. At the end of this process, the necessary data will be returned to fully configure the KB.

Amazon AWS

For AWS, an AWS CDK project was created to handle this task, generating and executing a CloudFormation Stack.


  • Endpoint and credentials for database access
    • To do so, access Secrets Manager in the AWS console
       There you will find the generated user and password
  • DynamoDB datastore user ID and password
    • This is returned after the infrastructure is created
    • If using other aws region than us-east-1, please add "Additional connection string attributes": region=us-west-1
  • AWS SQS Queue Connection Information
    • Set EnvironmentVariable: GX_FESTIVALTICKETS_QUEUEURL with the QueueURL provided by the CDK. Or just change it in Procedure: 'BusinessLogic.SQSUrlGet'. 

The deployment will be performed as follows with each deployment unit:

  • ProcessTicketQueue
    • Target: AWS Lambda Functions
    • Trigger Type: Queue
  • TicketRaffle
    • Target: AWS Lambda Functions
    • Trigger Type: Timer
  • App
    • Target: Static Front end
  • App
    • Target: AWS Serverless Deploy (backend services)
  • Backoffice
    • It will be possible to select Beanstalk or another such as Docker or EC2 instance


For Azure, the infrastructure is created using Terraform.

The deployment will be performed as follows with each deployment unit:

  • ProcessTicketQueue
    • Target: MicrosoftAzureFunctions
    • Trigger Type: Queue
  • TicketRaffle
    • Target: MicrosoftAzureFunctions
    • Trigger Type: Timer
  • App
    • Target: Static Front end
  • App
    • Target: Microsoft Azure Serverless (backend services)
  • Backoffice
    • It will be possible to select WebApp or Docker

Development process

Several features and criteria of the development process are highlighted below.

Import from Sketch

The design was made in Sketch and then imported into the GeneXus KB through the Design Import option.

Once imported from Sketch, some minor adjustments were made to the layouts to achieve maximum consistency in each layout.
The import from Sketch functionality allowed the development process to be more focused on the business logic.

Development with a coding standard

It was originally developed in GeneXus 17 Beta following the GeneXus Development Guide to create consistent, high-quality code.

StoneFramework Community

The StoneFramework Community Edition module, developed by Daniel Monza, was included because it provides procedures, user controls, and data patterns commonly used in systems.

Unit testing

The example has unit tests to certify the drawing. They can be reviewed in the “MakeWinnersUnitTest” object.

UI tests

A UI test called "FrontendTest" was developed to test the entire ticket creation cycle. It runs through the registration and status check for the created ticket.

Subscribe to KB feed
KnowledgeBase FestivalTicketsKB
GeneXus Server URL here
No news available on this feed
Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant