Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Golo pour l'Alpes JUG

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Golo pour l'Alpes JUG

Avatar for Philippe CHARRIERE

Philippe CHARRIERE

January 20, 2015

More Decks by Philippe CHARRIERE

Other Decks in Programming

Transcript

  1. #gololang #alpesjug Golo, quoi, qui, pourquoi, … (au fait, c’est

    un langage) Golo in action, particularités, Java (du code, du code, du code) Hacking Golo (le langage dont vous êtes le héros) … Nous parlerons de …
  2. #gololang #alpesjug 1 langage dynamique pour la JVM à base

    d’Invokedynamic facile à utiliser facile à modifier Golo? Golo, quoi, qui, pourquoi, …
  3. #gololang #alpesjug Golo? Golo, quoi, qui, pourquoi, … module hello

    function hello = |who| { println("Hello " + who) } function main = |args| { let salut = |qui| -> println("Salut " + qui) salut("John") hello("Bob") }
  4. #gololang #alpesjug Créé par @jponge (aka “le doc”) Boss de

    TypeUnsafe Golo? Golo, quoi, qui, pourquoi, …
  5. #gololang #alpesjug Léger 530 kb Golo <3 Java Golo est

    rapide dans un contexte dynamique #notroll Golo? … à savoir Golo, quoi, qui, pourquoi, …
  6. #gololang #alpesjug Golo, quoi, qui, pourquoi, … Temps de démarrage

    - plateforme : RPI B+ / Java 8 Un programme simple: afficher “Hello”
  7. #gololang #alpesjug Golo, quoi, qui, pourquoi, … Approche de PI

    - plateforme : RPI B+ / Java 8 Durée totale du traitement (lancement + calcul) et temps de calcul (compris dans la durée de traitement)
  8. #gololang #alpesjug Golo, quoi, qui, pourquoi, … Si vous avez

    besoin de: Java + dynamique + délais courts + mémoire (IOT) -> Golo Conclusion
  9. #gololang #alpesjug pour le fun pour apprendre (pas que Golo)

    pour expérimenter & prototyper pour “partager” & participer pour de l’embarqué pour avoir son propre langage … Pourquoi faire du Golo? Golo, quoi, qui, pourquoi, …
  10. #gololang #alpesjug Un langage développé sur le temps libre, la

    bonne volonté et la passion … et en peu de temps Golo? … à savoir Golo, quoi, qui, pourquoi, …
  11. #gololang #alpesjug Générer un projet Golo Simple: golo new hello

    Maven: golo new hellomvn --type maven Gradle: golo new hellogrd --type gradle Préambule Particularités, Java
  12. #gololang #alpesjug Applications class BasicSimulation extends Simulation {
 
 val

    httpConf = http
 .baseURL("http://localhost:9000")
 
 val scn = scenario("Add Humans").repeat(10) {
 exec(
 http("add human")
 .post("/humans")
 .body(StringBody("{\"_id\":\"@john_doe\",\"firstName\":\"John\",\"lastName\":\"Doe\"}"))
 .asJSON
 .check(status.is(201))
 
 )
 .exec(
 http("add human")
 .post("/humans")
 .body(StringBody("{\"_id\":\"@jane_doe\",\"firstName\":\"Jane\",\"lastName\":\"Doe\"}"))
 .asJSON
 .check(status.is(201))
 )
 .exec(
 http("add human")
 .post("/humans")
 .body(StringBody("{\"_id\":\"@bob_morane\",\"firstName\":\"Bob\",\"lastName\":\"Morane\"}"))
 .asJSON
 .check(status.is(201))
 )
 }
 
 setUp(scn
 .inject(rampUsers(1000) over (60)).protocols(httpConf))
 }
  13. #gololang #alpesjug Applications class BasicSimulationGetAll extends Simulation {
 val httpConf

    = http
 .baseURL("http://localhost:9000")
 
 val scn = scenario("Get All Humans").repeat(100) {
 exec(
 http("get humans")
 .get("/humans")
 .check(status.is(200))
 )
 }
 
 setUp(scn
 .inject(rampUsers(5000) over (300)).protocols(httpConf))
 }
  14. #gololang #alpesjug Il y a aussi … tout ce dont

    je n’ai pas eu le temps de parler http://golo-lang.org/documentation/next/ Particularités, Java
  15. #gololang #alpesjug @NinjaSquad @HGomez Et tous les autres: testeurs, conférences,

    JUG, … https://github.com/golo-lang/golo-lang#contributing Mention spéciale Univers Golo