I have just started to follow ballerina by reading https://ballerina.io/ documentation. when I try to run Hello World Parallel then I have no idea how internally it works?
import ballerina/io;
public function main() {
@strand {thread: "any"}
worker w1 {
io:println("Hello, World! #m");
}
@strand {thread: "any"}
worker w2 {
io:println("Hello, World! #n");
}
@strand {thread: "any"}
worker w3 {
io:println("Hello, World! #k");
}
}
- When I run this code how many threads are running behind that 4 or less than 4?
- Threads are very expensive in java, when we create a thread at the same time OS-level thread is created by the JVM and a lot of memory will be consumed. Does the ballerina also follow the same way (Native Thread Model)?
- Can we use lightweight threads in ballerina? Like which is going to be introduced by Project Loom(fibers)
- Does the ballerina fully supported for reactive programming?
- Does the ballerina provide packages to connect with MongoDB, Redis, and Cassandra without blocking? I mean reactive way