Introduction to the. Programming Language

Similar documents
Hudson configuration manual

SparkLab May 2015 An Introduction to

Content. Development Tools 2(63)

Jenkins on Windows with StreamBase

Multi-threaded FTP Client

Hudson Continous Integration Server. Stefan Saasen,

How To Set Up Wiremock In Anhtml.Com On A Testnet On A Linux Server On A Microsoft Powerbook 2.5 (Powerbook) On A Powerbook 1.5 On A Macbook 2 (Powerbooks)

Creating a Java application using Perfect Developer and the Java Develo...

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

2013 Satisfaction Survey. How are we doing? Easier to Read Version

Fuse ESB Enterprise Installation Guide

Nupic Web Application development

Eclipse installation, configuration and operation

Using jlock s Java Authentication and Authorization Service (JAAS) for Application-Level Security

2 The first program: Little Crab

Service Integration course. Cassandra

Client-server Sockets

1 Building, Deploying and Testing DPES application

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Setting up an online Java Jmonitor. server using the. EXPERIMENTAL code from. John Melton GØORX/N6LYT

The Benefits of Modular Programming

How to use the Eclipse IDE for Java Application Development

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part...

CSC 551: Web Programming. Spring 2004

SafeNet KMIP and Amazon S3 Integration Guide

Final Year Project Interim Report

ICON UK 2015 node.js for Domino developers. Presenter: Matt White Company: LDC Via

Lab Exercise Part II: Git: A distributed version control system

Effective Java Programming. efficient software development

NLP Programming Tutorial 0 - Programming Basics

Configuring the BBj Jetty Web Server (rev10.02) for OSAS

Practice Fusion API Client Installation Guide for Windows

How to Install Java onto your system

The first program: Little Crab

System Structures. Services Interface Structure

VOC Documentation. Release 0.1. Russell Keith-Magee

HP Cloud Service Automation

Programming IoT Gateways With macchina.io

The next step in test automation: computer-generated tests

IBM Tivoli Workload Scheduler Integration Workbench V8.6.: How to customize your automation environment by creating a custom Job Type plug-in

Enterprise Service Bus

Tutorial 5: Developing Java applications

An Oracle White Paper June, Provisioning & Patching Oracle Database using Enterprise Manager 12c.

Configuration Manual Yahoo Cloud System Benchmark (YCSB) 24-Mar-14 SEECS-NUST Faria Mehak

Setting up your new Live Server Account

Java applets. SwIG Jing He

Advanced Computing Tools for Applied Research Chapter 4. Version control

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

Porting VNC to Mobile Platforms

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 1 Android SDK & Development Environment. Marco Picone

Checking IE Settings, and Basic System Requirements for QuestionPoint

Java Application Developer Certificate Program Competencies

Division of Informatics, University of Edinburgh

Using GitHub for Rally Apps (Mac Version)

Creating a Simple, Multithreaded Chat System with Java

Oracle Enterprise Manager

To reduce or not to reduce, that is the question

Computer and Set of Robots

CafePilot has 3 components: the Client, Server and Service Request Monitor (or SRM for short).

Sample copy. Introduction To WebLogic Server Property of Web 10.3 Age Solutions Inc.

Integrating Secure FTP into Data Services

SDK Code Examples Version 2.4.2

Tutorial Reference Manual. Java WireFusion 4.1

Introduction to Android Programming (CS5248 Fall 2015)

Supplement I.C. Creating, Compiling and Running Java Programs from the Command Window

Remote Desktop With P2P VNC

Version Control with Git. Dylan Nugent

1 First Steps. 1.1 Introduction

Shark Installation Guide Week 3 Report. Ankush Arora

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Using Git for Project Management with µvision

Troubleshooting AVAYA Meeting Exchange

EJB & J2EE. Component Technology with thanks to Jim Dowling. Components. Problems with Previous Paradigms. What EJB Accomplishes

How To Write A Network Operating System For A Network (Networking) System (Netware)

Exploiting the Web with Tivoli Storage Manager

Unifying Information Security. Implementing TLS on the CLEARSWIFT SECURE Gateway

How To Manage A Multi Site In Drupal

Continuous Integration. CSC 440: Software Engineering Slide #1

Oracle Enterprise Manager

Version Control with. Ben Morgan

How To Manage Source Code With Git

Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1.

INNOVATOR S PLAYBOOK A TALK WITH GLOBAL LEADERS BRITISH TELECOM (BT)

18.2 user guide No Magic, Inc. 2015

Official Android Coding Style Conventions

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3

Version Control using Git and Github. Joseph Rivera

Using JMeter for Testing a Data Center. Siegfried Goeschl

MarkLogic Server. Java Application Developer s Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

Software development life cycle. Software Engineering - II ITNP92 - Object Oriented Software Design. Requirements. Requirements. Dr Andrea Bracciali

CSC 2405: Computer Systems II

Application Compatibility Best Practices for Remote Desktop Services

A Practical Guide to creating, compiling and signing an Android Application using Processing for Android.

Code::Blocks Student Manual

Installing Booked scheduler on CentOS 6.5

Transcription:

Introduction to the Jolie Programming Language Introduction to the Programming Language Saverio Giallorenzo sgiallor@cs.unibo.it 1

What is Jolie? A Service-Oriented Programming Language 2

Why SOC and Jolie? Jolie is perfect for fast prototyping. In little time a small team of developers can build up a full-fledged distributed system. But I already know Java! Why shall I use Jolie? 3

Why SOC and Jolie? SocketChannel socketchannel = SocketChannel.open(); socketchannel.connect( new InetSocketAddress("http://someurl.com", 80)); Buffer buffer =...; // byte buffer while( buffer.hasremaining() ) { channel.write( buffer ); } Happy? Ok, but you did not even close the channel or handled exceptions 4

Why SOC and Jolie? SocketChannel socketchannel = SocketChannel.open(); try { socketchannel.connect(new InetSocketAddress("http://someurl.com", 80)); Buffer buffer =...; // byte buffer while( buffer.hasremaining() ) { channel.write( buffer ); } } catch( UnresolvedAddressException e ) {... } catch( SecurityException e ) {... } /*... many catches later... */ catch( IOException e ) {... } finally { channel.close(); } Happier now? Yes, but what about the server? 5

Why SOC and Jolie? Selector selector = Selector.open(); channel.configureblocking(false); SelectionKey key = channel.register(selector, SelectionKey.OP_READ); while(true) { int readychannels = selector.select(); if(readychannels == 0) continue; Set<SelectionKey> selectedkeys = selector.selectedkeys(); Iterator<SelectionKey> keyiterator = selectedkeys.iterator(); while(keyiterator.hasnext()) { SelectionKey key = keyiterator.next(); if(key.isacceptable()) { // a connection was accepted by a ServerSocketChannel. } else if (key.isconnectable()) { // a connection was established with a remote server. } else if (key.isreadable()) { // a channel is ready for reading } else if (key.iswritable()) { // a channel is ready for writing } keyiterator.remove(); } } Here you are 6

Why SOC and Jolie? Well, ok, but again, you are not handling exceptions. And what about if different operations use the same channel? And if we wanted to use RMIs instead of Sockets? In what format are you transmitting data? And if we need to change the format after we wrote the application? Do you check the type of data you receive/send? 7

Why SOC and Jolie? Programming distributed systems is usually harder than programming non distributed ones. Concerns of concurrent programming. Plus (not exhaustive): handling communications; handling heterogeneity; handling faults; handling the evolution of systems. 8

Why SOC and Jolie? Applications in a distributed system can perform a distributed transaction. Example: - a client asks a store to buy some music; - the store opens a request for handling a payment on a bank; - the client sends his credentials to the bank for closing the payment; - the store sends the goods to the client. Looks good, but a lot of things may go wrong, for instance: - the store (or the bank) could be offline; - the client may not have enough money in his bank account; - the store may encounter a problem in sending the goods. 9

Why SOC and Jolie? Things can be made easier by hiding the low-level details. Two main approaches: - make a library/tool/framework for an existing programming language; - make a new programming language. Can you tell the difference between the two approaches? 10

Service-Oriented Programming 3 Commandments Everything is a service; A service is an application that offers operations; A service can invoke another service by calling one of its operations. 11

Service-Oriented Programming 3 Commandments Everything is a service; Recalling the Object-Oriented creed A service is an application that offers operations; A service can invoke another service by calling one of its operations. Service-Oriented Services Operations Object-Oriented Objects Methods 12

Why Jolie? A Service-Oriented Programming Language Service-Oriented Object-Oriented Services Objects Operations Methods 13

Why Jolie? Because it is Full Stack Formal foundations from Academia Taught also in: 14

Why Jolie? Because it is Full Stack Tested and used in the Real World 15

Why Jolie? Because it is Full Stack It is a live open source project with continuous updates and a well documented codebase https://github.com/jolie/jolie This is the programming language you are looking for 16

Why Jolie? Because it is Full Stack Comprehensive and ever-growing documentation and Standard Library. http://docs.jolie-lang.org 17

Why Jolie? Because it is Full Stack Cool Logo 18

Hello World! in Jolie Let us get our hands dirty. Hello World! is enough to let you see some of the main features of Jolie and Service-Oriented Programming. include "console.iol" Include a main program entry point { service println@console( "Hello, world!" )() } operation service 19

Hello World! in Jolie Let us get our hands dirty. Hello World! is enough to let you see some of the main features of Jolie and Service-Oriented Programming. include "console.iol" main { println@console( "Hello, world!" )() } hello_world.ol $ jolie hello_world.ol 20

Let us see some Jolie in Action Everything starts with a calculator 21

Resources Online Official Website: http://www.jolie-lang.org Official Docs: http://docs.jolie-lang.org Official Codebase: https://github.com/jolie/jolie 22

Resources The Jolie Interpreter Last release http://www.jolie-lang.org/downloads.html Requires JRE 1.6+ Download jolie-installer.jar open a console and run java -jar jolie-installer.jar 23

Resources The Jolie Interpreter Compile the last version from the repository (requires JDK1.6+ and ant) $ git clone https://github.com/ jolie/jolie.git $ cd jolie $ ant && sudo ant install 24

Resources Editors Sublime Text https://github.com/thesave/ sublime-jolie + = https://github.com/thesave/ SublimeLinter-jolint 25