Skip to content

Chamupathi Gigara's personal Blog

Just another Giga Network site

Menu
  • Blog
  • About Me
Menu

Ballerina ගැන සිංහලෙන් – Ballerina in Sinhala

Posted on July 21, 2019July 21, 2019 by gigara

මොකක්ද මේ Ballerina කියන්නේ?

Ballerina ගැන ගොඩක් අය දන්නේ නැති වුනාට, Ballerina කියන්නේ දැනගත යුතුම programming language එකක්. එකට ප්‍රධාන හේතුව තමයි මේක cloud සදහාම නිර්මාණය කරන ලද language එකක් විම. මිට කලින් අපි භාවිතා කරපු Java වැනි language භාවිතයේදී තිබ්බ ප්‍රධානම ගැටලුව තමයි cloud functions වලට බොහෝ වෙලාවට අමතර plugins යොදා ගැනීමට සිද්ද වෙනවා එහෙමත් නැත්නම් එවැනි plugin එකක් අපිටම නිර්මාණය කරගන්න සිද්ද වෙනවා.

හැබැයි අපි Ballerina භාවිතා කරොත් අපිට ඒ වගේ අමාරුවෙ වැටෙන්න වෙන්නේ නෑ. මොකද මේක අද කාලෙට ගැලපෙන විදියට අවශ්‍ය functions, inbuild ම තියෙන language එකක් නිසා. Virtual Machine එකක් මත programme එක run වෙන නිසා මේක ඕනෙම platform එකක ලේසියෙන්ම run කරගන්නත් පුලුවන්.

කාර්යක්ෂමතාවය සහ තවත් බොහෝ හේතුන් නිසා Microservices විදියට application නිර්මාණය කිරීමට හැමෝම වගේ යොමු වෙලා තියෙනවා. පරණ languages වලට microservices implement කරන්න කට්ට කනවට වඩා ඒ වෙනුවෙන්ම හදපු language එකක් භාවිතා කරන එක හරිම ලේසි වැඩක් කියන එක මම අමුතුවෙන් කියන්න ඕනේ නැහැනේ.

Related image
Microservices | Source – medium.com

කොහොමද මේ Ballerina එක්ක වැඩ කරන්නේ?

දැන් අපි බලමු මම කියපු තරම් ම Ballerina ලේසිද කියලා.

import ballerina/http;
import ballerina/log;
service hello on new http:Listener(9090) {

    resource function sayHello(http:Caller caller, http:Request req) {

        var result = caller->respond("Hello, World!");

        if (result is error) {
            log:printError("Error sending response", err = result);
        }
    }
}

මේ මම ලියල තියෙන්නේ Ballerina වලින් Hello World Service එකක්. API එකක් කියල කියමුකෝ. ඉතින් ඔයාලටම පේනවා ඇති පේලි 10 කටත් අඩු පේලි ගානකින් API service එක run කරන්න පුලුවන්.

ඉදිරි ලිපි වලින් මම කියන්නම් කොහොමද Ballerina එක්ක වැඩ කරන්නේ කියලා. ඔබේ අදහස් comment කරන්න වගේම අනිත් අයත් දැනුවත් කරන්න අමතක කරන්න එපා…

2 thoughts on “Ballerina ගැන සිංහලෙන් – Ballerina in Sinhala”

  1. [email protected] says:
    July 23, 2019 at 6:42 am

    පට්ට ඇ

    Reply
  2. Pingback: දේවාරූඩයෙන් Code කරන්න | Chamupathi Gigara's personal Blog

Leave a Reply to [email protected] Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • දේවාරූඩයෙන් Code කරන්න
  • මොනවද මේ Malware?
  • WhatsApp සදහටම නැති වෙයි?
  • Ballerina ගැන සිංහලෙන් – Ballerina in Sinhala
  • VPN ගැන ඔබ දැනුවත් ද?

Recent Comments

  • දේවාරූඩයෙන් Code කරන්න | Chamupathi Gigara's personal Blog on Ballerina ගැන සිංහලෙන් – Ballerina in Sinhala
  • Aruna Danuddara on මොනවද මේ Malware?
  • Nishiki Yapa on මොනවද මේ Malware?
  • Papaya on මොනවද මේ Malware?
  • Vidushika Ruwanpathirana on WhatsApp සදහටම නැති වෙයි?

Archives

  • February 2022
  • April 2020
  • December 2019
  • July 2019
  • April 2019
  • March 2019
  • February 2019
  • July 2018
  • March 2018
  • February 2018

Categories

  • Ballerina
  • Cyber Security
  • Java
  • Python
  • Uncategorized
© 2022 Chamupathi Gigara's personal Blog | Powered by Superbs Personal Blog theme