Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [ballerina]

For questions about the Ballerina programming language

1 vote
1 answer
56 views

Ballerina debugger starts only one server in my ballerina project

My Ballerina project contains multiple servers. HTTP server (runs on port 9095) GraphQL server (runs on port 9090) The HTTP server acts as a proxy server for the GraphQL server. When I start the ...
chathuranga siriwardhana's user avatar
1 vote
2 answers
29 views

How to make functions accessing a table thread safe?

I have the following code, and I want to make sure that the actions on the table are thread-safe (and make the accessor functions isolated). How should I go about it? final table<Patient> key(id)...
Gayal Dassanayake's user avatar
1 vote
1 answer
33 views

How to bypass Interceptors for a specific resource in a Ballerina Service?

I have a Ballerina HTTP service with several interceptors added. This service has multiple resources, and for a specific resource, I want to bypass the interceptors. Is there a way to achieve this ...
bhashinee's user avatar
  • 161
0 votes
2 answers
42 views

Is there any advantage of using a closed record with a rest descriptor over an open record?

Consider the scenario where we create a record for capturing a JSON payload. (application/json content type) Is there any benefit of using a closed record with a JSON type rest descriptor over an open ...
YUK7HI's user avatar
  • 3
0 votes
1 answer
27 views

Dependency versions are not updated for Custom repositories

Dependency versions of modules from custom repositories are not automatically updated. I have a custom repository and a module deployed (0.1.0) in it. I use this module in another Ballerina app as a ...
Jayanga Dissanayake's user avatar
1 vote
1 answer
52 views

Versions in the dependency graph in modules and the actual modules in the pack in Ballerina

What are the scenarios can a version of a dependency of module foo (let's say bar) differs from the version packed in the pack? Let's take crypto module. It is a dependency of module auth. When we ...
Dulaj Dilshan's user avatar
1 vote
1 answer
52 views

Is there a way to set other parameters in ballerina.observe or ballerinax.jaegger besides the documented?

There are just some documented parameters to configure Observability. In OpenTelemetry there are other parameters that can be set. For example, deployment.environment (https://opentelemetry.io/docs/...
Alexandre Akio's user avatar
1 vote
1 answer
42 views

How does Ballerina HTTP RetryConfig works?

I went through the Ballerina documentation and found the following document on the http:RetryConfig. It has a statusCode field, which I need a further clarification. statusCodes int[](default []) -...
Ayesh Weerasinghe's user avatar
2 votes
1 answer
86 views

Ballerina vs. Spring Boot Performance Discrepancy in Load Testing with JMeter

I'm currently conducting a research project comparing the performance of the Ballerina programming language with Spring Boot using JMeter for performance testing. I've run several load tests on my ...
Ricardo Coelho's user avatar
1 vote
2 answers
87 views

How to write sort by key function in ballerina?

string[] arr = ['abcd-4', 'abcd-1', 'abcd-3', 'abcd-2'] Here is my list. I need this array to be get sorted by the key as the last number after '-'. I know there is a sort function in ballerina but ...
Nareash Vijayaragavan's user avatar
4 votes
1 answer
142 views

Comparing Performance of Ballerina vs. Spring Boot: Should I Expect Consistency Across Different Environments?

I'm currently conducting a research project comparing the performance of Ballerina programming language with Spring Boot. I'm using JMeter tests to analyze various performance metrics. One concern I ...
Ricardo Coelho's user avatar
0 votes
1 answer
63 views

Locally testing OS environmental variables in Ballerina

When using Ballerina configurables we can use a config.toml to maintain the configurations and compile the service without any issue. If I need to use a os:getEnv("variable") in Ballerina, ...
shayanmalinda's user avatar
1 vote
1 answer
57 views

In the Ballerina Language how do I hot reload code via `bal run` without a server restart?

I can run a development server locally via bal run and interact with my API via Swagger in VSCode (very nice!), however, it seems that I have to kill & restart the server to reflect code changes? ...
rdmolony's user avatar
  • 731
1 vote
2 answers
86 views

Querying distinct values in Ballerina Query Expressions

Is it possible to query DISTINCT values using Ballerina Query Expressions? string[]|error connectorProducts = from record {string product;} {product} in products select product; ...
shayanmalinda's user avatar
0 votes
1 answer
68 views

How does the field access behave after cloning a constant map in Ballerina

Consider the following code: import ballerina/io; type User record {| string name; string email; |}; const USER = { name: "John Doe", email: "[email protected]" }...
Sasindu Dilshara's user avatar

15 30 50 per page
1
2 3 4 5
41