Comments (7)
A file can contain one or more resources. If a file contains resources then that file can be a service - with appropriate annotations as needed.
If a file has other things (like actors and functions) then those play no part of the service aspect.
from ballerina-lang.
Each file with one or more resources becomes a service.
from ballerina-lang.
Service name is not going to be the name of the file rather context defined as an annotation.
from ballerina-lang.
We might have to support service name annotation as this is useful in representing a given service (title) via OpenAPI spec.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#infoObject
from ballerina-lang.
We define the service at the beginning of the file as in the below example.
package samples.echo;
service EchoService;
@GET
@Path ("/*")
resource echoResource (message m) {
reply m;
}
from ballerina-lang.
Is the following correct:
A single file can contain resources with very different annotations. E.g. some resources have annotations that refer to HTTP parameters; some other resources have JMS annotations; etc.
I looks very strange to me to call that a single service: a single service that reacts to a bunch HTTP request, to JMS publish, etc.
Wrt Kasun's comment: In Swagger, the title field refers to the title of the application. And for me, an application may support more than one service.
Summary: we should not only decouple file name and service name, but also support multiple services within a single Balerina file.
from ballerina-lang.
Hi Frank - latest syntax does exactly what you said .. file name is irrelevant and a file can contain multiple services.
Closing the issue.
from ballerina-lang.
Related Issues (20)
- [Improvement]: Fix delay in code completions during VSCode startup.
- [Bug]: Alternate receive worker message passing hangs for nil return
- [Improvement]: Reorder top level node list
- [Bug]: When a transaction is marked for abort, the `xa_rollback()` is called on resources while the transaction is still in ACTIVE state.
- [Bug]: Remove `generateRecordDefaultFPLoadIns` instruction and add default values of record in to `typedesc`
- [Bug]: Getting `Idle timeout triggered before initiating outbound response` when doing load test
- [Bug]: Desugar crashes for mapping binding pattern in destructuring assignment with error binding pattern
- [Improvement]: Reduce the overhead of using `foreach` loop
- [Improvement]: Improve error message when there is a mismatch in worker send and recevie pairing
- [Bug]: Linkage error when loading interface implementation of a compiler plugin from a Ballerina Tool HOT 1
- Validate customer migration details HOT 1
- [Task]: Investigate the delay in the initial startup of the Eggplant project
- [Bug]: Testerina code coverage report does not allow horizontal scrolling
- [Bug]: Project fails when there are global variables declared with client invokes
- [Improvement]: Improve error message for multiple receive error return
- [Bug]: Add `error:NoMessage` only if it is there in the all the receive types in `alternative-receive-action`
- [New Feature]: Add parser changes for `stream-receive-action`
- [Task]: Create a comparison doc for XML navigation expressions with XPath
- [Task]: Codegen optimization for Ballerina
- Compilation error while pull the package ballerinax/github HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ballerina-lang.