Example: bachelor of science

Comparing Languages for Engineering Server Software ...

Comparing Languages for Engineering ServerSoftware: Erlang, Go, and Scala with AkkaIvan Valkov, Natalia Chechina, and Phil TrinderSchool of Computing Science, University of Glasgow G12 8RZ, United { , are a key element of current IT infrastructures, and mustoften deal with large numbers of concurrent requests. The program-ming language used to construct the Server has an important rolein Engineering efficient Server Software , and must support massiveconcurrency on multicore machines with low communication andsynchronisation paper investigates 12 highly concurrent programming lan-guages suitable for Engineering servers, and analyses three repre-sentative Languages in detail: Erlang, Go, and Scala with have designed three Server benchmarks that analyse key per-formance characteristics of the Languages .}

Keywords Server applications, programming languages, Erlang, Go, Scala, Akka 1. Introduction ... Erlang is a functional programming language originally developed at the Ericsson Computer Science Laboratory in 1986 by Joe Armstrong [2] which was then released as open source in 1998.

Tags:

  Programming, Language, Programming language

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Comparing Languages for Engineering Server Software ...

1 Comparing Languages for Engineering ServerSoftware: Erlang, Go, and Scala with AkkaIvan Valkov, Natalia Chechina, and Phil TrinderSchool of Computing Science, University of Glasgow G12 8RZ, United { , are a key element of current IT infrastructures, and mustoften deal with large numbers of concurrent requests. The program-ming language used to construct the Server has an important rolein Engineering efficient Server Software , and must support massiveconcurrency on multicore machines with low communication andsynchronisation paper investigates 12 highly concurrent programming lan-guages suitable for Engineering servers, and analyses three repre-sentative Languages in detail: Erlang, Go, and Scala with have designed three Server benchmarks that analyse key per-formance characteristics of the Languages .}

2 The benchmark resultssuggest that where minimising message latency is crucial, Go andErlang are best; that Scala with Akka is capable of supporting thelargest number of dormant processes; that for servers that frequentlyspawn processes Erlang and Go minimise creation time; and that forconstantly communicating processes Go provides the best and Subject [ language Constructsand Features]: Concurrent programming structuresKeywordsServer applications, programming Languages , Erlang,Go, Scala, Akka1. IntroductionModern web service applications like social networks, online games,and chat applications get increasingly large loads to handle. Millionsof users can be simultaneously interacting with a Server . When thetraffic grows significantly, new hardware may be added (increasingoperating costs), or the system may be unable to meet the demandand must be redesigned.

3 To minimise the hardware requirementsand hence operating costs the Server programming language musteffectively utilize hardware early concurrency models were very low level, C withPThreads, and challenged the developer with issues like deadlock,livelock and race conditions. To minimise development time andreduce Software development costs many servers are now engineeredin Languages that combine high level computational models, to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full citationon the first page. Copyrights for components of this work owned by others than theauthor(s) must be honored.

4 Abstracting with credit is permitted. To copy otherwise, orrepublish, to post on servers or to redistribute to lists, requires prior specific permissionand/or a fee. Request permissions from 2018,SAC 2018: Symposium on Applied Computing, April 9 13, 2018. Pau, is held by the owner/author(s). Publication rights licensed to 978-1-4503-5191-1/18/04.. $ or object-oriented, with high-level coordination models, actors as in Erlang [2] or a process algebra as in Go [6]. Indeed,the success of some Server -based companies is even attributed totheir use of specific Languages . As examples WhatsApp s successis attributed to their use of Erlang [27]; the video streaming leaderTwitch uses Go to serve millions of users a day [13]. Researchcontributions of this paper include the following: A survey of programming language characteristics relevant forservers (Section ).

5 The design and implementation of three benchmarks to analysethe multicore Server capabilities of Erlang, Go, and Scala withAkka (Section 3). An evaluation of Erlang, Go, and Scala with Akka for keyserver capabilities, process communication latency, spawntime, maximum number of supported processes, and processcommunication throughput (Section 4).2. Server language CharacteristicsTable 1 analyses the features of Languages commonly used toimplement web services, like web servers or instant messagingservers. The table covers computation, coordination, compilation,and popularity. While assembling the table we did not aim to includeevery possible Server language in it, but rather to cover representativelanguages that reflect important characteristics of Server Languages in the table are presented in accordance with theircomputation modelsare well known.

6 Procedural Languages likeC, Go, and Rust encourage programming with data structures, andfunctions. Object oriented Languages like Java and C# encapsulatedata structures with the methods that operate on them to facilitatecomposition and re-use. Functional Languages like Clojure, Elixir,Erlang, and Haskell primarily use pure functions and immutable datastructures. Supporting multiple models, or paradigms, has recentlybecome popular, and some Server Languages follow this trend, # is considered both object oriented and majority of modern Languages are strongly typed,and hence report compile or runtime errors rather than failing inunexpected ways. Of the Languages considered only C is weaklytyped. Four of the Languages have significant dynamic typing:Erlang, Elixir, Scala with Akka (Scala/Akka), and Clojure.

7 Theremaining Languages are primarily statically typed, enabling earlyerror detection [20] and faster runtimes as there are no dynamic to the complexity, size of webapplications, and pressure to deliver services to the market quickly,low level Languages are rarely used for Engineering servers. Hencethe only low level language we consider is language CharacteristicsComputationCoordinationCo mpilationPopularityLanguageModelTypingAb stractionModelAbstractionDeterminismRunt imeenvironmentTiobeApr 2017 RedMonkJan 2017C + OpenMPProceduralWeakStaticLowAnnotations HighNoNative29C + PThreadsProceduralWeakStaticLowExplicitL owNoNative29 GoProceduralStrongStaticHighCSPHighNoNat ive1915 RustProceduralStrongStaticHighExplicitHi ghNoNative45 40C#ObjectOrientedStrongStaticHighExplic itHighNoNative45 JavaObjectOrientedStrongStaticHighExplic itHighNoJVM12F#FunctionalObj.

8 40 ClojureFunctionalStrongDynamicHighSTMHig hNoJVM5020 ElixirFunctionalStrongDynamicHighActorsH ighNoErlang VM50+ 40 ErlangFunctionalStrongDynamicHighActorsH ighNoErlang VM4226 Scala + AKKAF unctionalStrongStaticHighActorsHighNoJVM 3214 HaskellPureFunctionalStrongStaticHighEva l StratHighYesNative/GHCi4016 Coordination the capabilities of multicorearchitectures with massive concurrency is a key design goal forserver Software Engineering . The coordination model of a languagestrongly influences the performance achieved. Different modelsmake escaping common pitfalls like deadlock and livelock is used in Languages like Java, Rust, and Cwith PThreads. Here the programmer works with threads and usesmutexes to protect shared resources. This approach is relatively lowlevel and can lead to problems like race conditions, livelock, [12] is used in Languages like Erlang,Elixir, and the Akka framework.

9 The unit of computation is theactor, and actors communicate by passing messages. Moreover,actors are completely isolated from each other and do not sharememory. This provides a higher level of abstraction than the explicitmodel and makes creating complex systems easier. Go, on the otherhand, bases its concurrency model on the Communicating SequentialProcesses (CSP) process algebra [14]. The main building blocks inthe language are goroutines (that resemble lightweight threads) andchannels for communication between the for computation abstraction, lowlevel coordination abstraction makes building web applicationsdifficult. So, C with PThreads is the only programming languagewith low level coordination abstraction considered a pure functional language , onlyHaskell provides deterministic parallelism, guarantees thatthe parallel program computes the same value as a type of compilation either directly to ma-chine code or to some intermediate language for a Virtual Machine(VM) impacts performance.

10 Moreover VMs impose restrictions, on the number of threads that can be a measure of how widely the selected Languages areused, and we consider two popularity rankings. The Tiobe Index [33]measures the popularity of programming Languages based on thenumber of search engine results for queries containing their RedMonk [26] measures programming traction on GitHub andStack Selected LanguagesFor detailed investigation we select three representative Languages :Erlang (Section ), Scala/Akka (Section ), and Go (Sec-tion ). All three Languages have high level computation andcoordination models with excellent support for concurrency andare used in industry for Engineering scalable and high Languages selected enable us to compare the impact of differ-ent language characteristics on Server performance.


Related search queries