"The joy of Scala" - Maxim Novak / Wix
Around eight years ago I started my journey as a developer. Since then, I've played around with many languages and thought that C# offers the best developer productivity. After joining Wix two years ago, I was exposed to the amazing world of Scala and Functional Programming and never looked back.
In Scala the code is much more concise, less ceremonious, immutable by default, combines functional with object oriented, seamlessly interoperates with Java, and many software engineering patterns are already baked into the language. Most importantly - Scala is FUN! By the end of the session you too will, hopefully, convert to Scala and never look back.
Recording of the lecture (Hebrew) - https://youtu.be/TcnYTwff2xU
This is brief presentation on the Scala programming language. It is aimed at Java developers who are curious about Scala. It was given at a San Francisco Java User Group in January 2009.
Slides from my talk at the Junction (Jan 24, 2013)
Single-core performance has hit a ceiling, and building web-scale multi-core applications using imperative programming models is nightmarishly difficult. Parallel programming creates a new set of challenges, best practices and design patterns. Scala is designed to enable building scalable systems, elegantly blending functional and object oriented paradigms into an expressive and concise language, while retaining interoperability with Java. Scala is the fastest growing JVM programming language, being rapidly adopted by leading companies such as Twitter, LinkedIn and FourSquare.
This presentation provides a comprehensive overview of the language, which managed to increase type safety while feeling more dynamic, being more concise and improving readability at the same time. We will see how Scala simplifies real life problems by empowering the developer with powerful functional programming primitives, without giving up on the object oriented paradigm. The overview includes tools for multi-core programming in Scala, the type system, collection framework and domain-specific languages. We’ll explore the power of compile-time meta-programming, which is made possible by the newly released Scala 2.10, and get a glimpse into what to expect from 2.11 in 2014.
We will also see how Scala helps overcome the inherent limitations of Java, such as type erasure, array covariance and boxing overhead.
Multiple examples emphasize how Scala pushes the JVM harder than any other mainstream language through the infinite number of boilerplate busters, increased type safety and productivity boosters from a Java developer’s perspective.
"The joy of Scala" - Maxim Novak / Wix
Around eight years ago I started my journey as a developer. Since then, I've played around with many languages and thought that C# offers the best developer productivity. After joining Wix two years ago, I was exposed to the amazing world of Scala and Functional Programming and never looked back.
In Scala the code is much more concise, less ceremonious, immutable by default, combines functional with object oriented, seamlessly interoperates with Java, and many software engineering patterns are already baked into the language. Most importantly - Scala is FUN! By the end of the session you too will, hopefully, convert to Scala and never look back.
Recording of the lecture (Hebrew) - https://youtu.be/TcnYTwff2xU
This is brief presentation on the Scala programming language. It is aimed at Java developers who are curious about Scala. It was given at a San Francisco Java User Group in January 2009.
Slides from my talk at the Junction (Jan 24, 2013)
Single-core performance has hit a ceiling, and building web-scale multi-core applications using imperative programming models is nightmarishly difficult. Parallel programming creates a new set of challenges, best practices and design patterns. Scala is designed to enable building scalable systems, elegantly blending functional and object oriented paradigms into an expressive and concise language, while retaining interoperability with Java. Scala is the fastest growing JVM programming language, being rapidly adopted by leading companies such as Twitter, LinkedIn and FourSquare.
This presentation provides a comprehensive overview of the language, which managed to increase type safety while feeling more dynamic, being more concise and improving readability at the same time. We will see how Scala simplifies real life problems by empowering the developer with powerful functional programming primitives, without giving up on the object oriented paradigm. The overview includes tools for multi-core programming in Scala, the type system, collection framework and domain-specific languages. We’ll explore the power of compile-time meta-programming, which is made possible by the newly released Scala 2.10, and get a glimpse into what to expect from 2.11 in 2014.
We will also see how Scala helps overcome the inherent limitations of Java, such as type erasure, array covariance and boxing overhead.
Multiple examples emphasize how Scala pushes the JVM harder than any other mainstream language through the infinite number of boilerplate busters, increased type safety and productivity boosters from a Java developer’s perspective.
I used these slides for a Scala workshop that I gave. They are based on these: http://www.scala-lang.org/node/4454. Thanks to Alf Kristian Støyle and Fredrik Vraalsen for sharing!
Its conciseness, versatility and DSL capabilities makes Scala desirable for scripting. In this report we show how we implemented a JSR223 compliant script engine for Scala which runs inside OSGi environments.
While the Scala compiler needs a class path to load class files, OSGi only provides class loaders. To overcome this we implemented a file system abstraction on top of OSGi bundles effectively providing a class path. Furthermore, JSR223's dynamic approach for passing arguments does not play well with Scala's static types. We need to make all types of arguments visible to scripts. Our implementation generates a preamble of adequate implicit conversions which allows scripts to use statically typed variables in a manner resembling dynamic types. Finally performance constraints require caching of pre-compiled scripts.
Apache Sling, an OSGi based web application framework with a scriptable application layer, uses our implementation for type safe templating via Scala's XML support.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
The Scala programming language has been gaining momentum recently as an alternative (and some might say successor) to Java on the JVM. This talk will start with an introduction to basic Scala syntax and concepts, then delve into some of Scala's more interesting and unique features. At the end we'll show a brief example of how Scala is used by the Lift web framework to simplify dynamic web apps.
Scala is becoming the language of choice for many development teams. This talk highlights how Scala excels in the world of multi-core processing and explores how it compares to Java 8.
Video Presentation: http://youtu.be/8vxTowBXJSg
Short (45 min) version of my 'Pragmatic Real-World Scala' talk. Discussing patterns and idioms discovered during 1.5 years of building a production system for finance; portfolio management and simulation.
Scaladroids: Developing Android Apps with ScalaOstap Andrusiv
Android is a fast-growing mobile operating system with millions of users worldwide.
Scala is a modern programming language designed to express common programming patterns in a concise, elegant, and type-safe way. Why not combine both of them?
Bacteria LENRs-and isotopic shifts in Uranium-Larsen-Lattice Energy Dec 7 2010Lewis Larsen
The attached paper provides a description of a theoretical W-L LENR Actinide nucleosynthetic network and selected examples of published mainstream, peer-reviewed experimental data which provide evidence that this network may well be operating in a variety of different environments on earth --- hidden in plain sight. In particular, we show how some or all of the Actinide network pathways could potentially be present in soils, ocean sediments, dusty chemical explosions, volcanic eruptions, and extraterrestrial impact events.
I used these slides for a Scala workshop that I gave. They are based on these: http://www.scala-lang.org/node/4454. Thanks to Alf Kristian Støyle and Fredrik Vraalsen for sharing!
Its conciseness, versatility and DSL capabilities makes Scala desirable for scripting. In this report we show how we implemented a JSR223 compliant script engine for Scala which runs inside OSGi environments.
While the Scala compiler needs a class path to load class files, OSGi only provides class loaders. To overcome this we implemented a file system abstraction on top of OSGi bundles effectively providing a class path. Furthermore, JSR223's dynamic approach for passing arguments does not play well with Scala's static types. We need to make all types of arguments visible to scripts. Our implementation generates a preamble of adequate implicit conversions which allows scripts to use statically typed variables in a manner resembling dynamic types. Finally performance constraints require caching of pre-compiled scripts.
Apache Sling, an OSGi based web application framework with a scriptable application layer, uses our implementation for type safe templating via Scala's XML support.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
The Scala programming language has been gaining momentum recently as an alternative (and some might say successor) to Java on the JVM. This talk will start with an introduction to basic Scala syntax and concepts, then delve into some of Scala's more interesting and unique features. At the end we'll show a brief example of how Scala is used by the Lift web framework to simplify dynamic web apps.
Scala is becoming the language of choice for many development teams. This talk highlights how Scala excels in the world of multi-core processing and explores how it compares to Java 8.
Video Presentation: http://youtu.be/8vxTowBXJSg
Short (45 min) version of my 'Pragmatic Real-World Scala' talk. Discussing patterns and idioms discovered during 1.5 years of building a production system for finance; portfolio management and simulation.
Scaladroids: Developing Android Apps with ScalaOstap Andrusiv
Android is a fast-growing mobile operating system with millions of users worldwide.
Scala is a modern programming language designed to express common programming patterns in a concise, elegant, and type-safe way. Why not combine both of them?
Bacteria LENRs-and isotopic shifts in Uranium-Larsen-Lattice Energy Dec 7 2010Lewis Larsen
The attached paper provides a description of a theoretical W-L LENR Actinide nucleosynthetic network and selected examples of published mainstream, peer-reviewed experimental data which provide evidence that this network may well be operating in a variety of different environments on earth --- hidden in plain sight. In particular, we show how some or all of the Actinide network pathways could potentially be present in soils, ocean sediments, dusty chemical explosions, volcanic eruptions, and extraterrestrial impact events.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
This is an quick introduction to Scalding and Monoids. Scalding is a Scala library that makes writing MapReduce jobs very easy. Monoids on the other hand promise parallelism and quality and they make some more challenging algorithms look very easy.
The talk was held at the Helsinki Data Science meetup on January 9th 2014.
Scala er et Java-relateret, statisk typet programmeringssprog i hastig fremmarch. Sproget kombinerer aspekter fra objekt- og funktionsorienterede sprog og fokuserer på skalerbarhed og effektivitet, både på det kodemæssige og afviklingsmæssige niveau. Syntaksen er elegant og koncis. Samtidig indeholder sproget stærke konstruktioner til understøttelse af parallelle applikationer, der udnytter fremtidens hardwarearkitekturer.
Java som sprog har ikke bevæget sig meget de seneste år. Vi har stadig ikke closures eller funktionelle aspekter som f.eks. C# har haft siden version 3. Er Scala svaret på enhver Javaudviklers bønner eller er sproget kun interessant for tågehoveder som mig, som begynder at synes bedre og bedre om funktionsorientering? Er den store portion syntaktisk sukker, Scala bringer på bordet, bare tomme kalorier?
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
1. Scala in Nokia Places API
Lukasz Balamut - Places API Team
17 April 2013
2. Purpose of this talk
Why are we spending time migrating to a new language?
How are we doing that?
What have we learned?
and of course: we are hiring.
3. Our scala story.
Our migration in lines of code
We’ve discovered more and more things on the way.
4. The Concordion tests problem
In June 2011 we had problems with Concordion (HTML based acceptance test
framework),
hard to integrate
HTML tests were not readable
Solution:
Multi-line Strings in Scala
Continue using JUnit
val expectedBody = """
{
"id":"250u09wh-83d4c5479b7c4db9836602936dbc8cb8",
"title" : "Marfil (Le)",
"alternativeNames" : [
{
"name" : "Le Marfil",
"language" : "fr"
}
]
}
"""
5. The test names problem
JUnit + camel case - not that readable for long names
@Test
def preservesSearchResponseItemOrder() { /* ... */ }
JUnit + underscores - violates naming convention, but better to read
@Test
def preserves_search_response_item_order() { /* ... */ }
ScalaTest
test("preserves search response’s item order") { /* ... */ }
It is supported by tools we use and produces nice output when run (as a bonus)
[info] DiscoverAroundAcceptanceTest:
[info] - calls nsp with 15Km radius
[info] - preserves search response’s item order
[info] - when requesting zero results, no request to search is made
6. Lift-Json
JSON (de)serialisation can be done in really nice way
e.g. getting place id:
{
"place": {
"a_id": "276u33db-6f084959f97c45bc9db26348bafd4563"
}
}
Also there is a generic way of parsing json, that gives you XPath like access:
val id = (json "place" "a_id").extract[String]
Lift-json provides also easy and efficient case class JSON (de)serialisation,
hance case classes
7. Scala case classes in the model
We model our upstream and downstream datamodels as case classes.
case class Place (
name: String,
placeId: PlaceID
//(...)
)
Each case class is a proper immutable data type - the new Java Bean ;),
A lot of boilerplate code is generated by the compiler e.g.:
accessors,
equals/hashCode,
copy methods,
toString
apply/unapply (for pattern maching),
After decompiling the scala code above we will end up with 191 lines of Java:
package pbapi.model.api;
import scala.*;
import scala.collection.Iterator;
import scala.runtime.BoxesRunTime;
import scala.runtime.ScalaRunTime$;
8. Scala case classes - Configuration
Easy to update configuration
Easy to compare environments’ configuration
case class HttpClientConfig(
serviceName: String,
serviceBaseUrl: URL,
readTimeout: Int = 0,
connectionTimeout: Int,
proxy: Option[ProxyConfig] = None,
oauthKeys: Option[OAuthConfig] = None,
displayUrl: Option[String] = None
)
"httpConfig":{
"serviceName":"recommendations",
"serviceBaseUrl":"http://nose.svc.ovi.com/rest/v1/recommendations/near
"readTimeout":4000,
"connectionTimeout":500,
"displayUrl":"http://nose.svc.ovi.com/rest/v1/recommendations/nearby/"
}
9. The Scala Type System
A great way to express assumptions
Have them checked by the compiler through the whole codebase
At every point in the code know what to expect or you will be reminded by
compiler.
10. The Scala Type System - Options 1
Avoid null references (see The Billion Dollar Mistake )
This will not compile!
case class UpstreamResponse ( unreliableField: Option[String] )
case class MyResponse ( reliableField: String )
def transform(upstream: UpstreamResponse) =
MyResponse(
reliableField = upstream.unreliableField //<-- incompatible type
)
11. The Scala Type System - Options 2
But this will:
case class UpstreamResponse ( unreliableField: Option[String] )
case class MyResponse ( reliableField: String )
def transform(upstream: UpstreamResponse) =
MyResponse(
reliableField = upstream.unreliableField.getOrElse("n/a") // enf
)
12. The Scala Type System - Options 3
how we were learning e.g.: to transform string when it is defined
def transform(str: String): String
reliableField =
if (upstream.unreliableField.isDefined)
transform(upstream.unreliableField.get)
else "n/a"
reliableField =
upstream.unreliableField match {
case Some(f) => transform(f)
case None => "n/a"
}
reliableField =
upstream.unreliableField.map(transform) | "n/a"
13. The Scala Type System - Standard Types
Immutable Map, List, Sets
val map: Map[String, String] = Map("a" -> "a", "b" -> "b")
val list: List[String] = "a" :: "b" :: Nil
Tuples to express Pairs, Triplets etc.
val pair: Pair[String, Int] = ("a", 1)
val (a, b) = pair // defines a:String and b:Int
14. The Scala Type System - error handling
Types can help with exceptional cases
val parsed: Validation[NumberFormatException, Int] = someString.parseInt
val optional: Option[Int] = parsed.toOption
val withDefault: Int = optional.getOrElse(0) //if there was parsing prob
Exception to Option
val sub: Option[String] =
allCatch.opt(line.substring(line.indexOf("{"")))
or Either
val parsed: Either[Throwable, Incident] =
allCatch.either(new Incident(parse(jsonString))
and handle it later
parsed match {
case Right(j) => Some(j)
case Left(t) => {
println("Parse error %s".format(t.getMessage))
None
15. The Scala Type System - functions
we defer translation (Translated) and text rendering (FormattedText) to
serialisation time using function composition so we don’t need to pass user
context through the whole stack e.g.:
case class Place (
//(...)
attribution: Option[Translated[FormattedText]],
//(...)
)
case class Translated[A](translator: TransEnv => A) {
def apply(env: TransEnv): A = translator(env)
def map[B](f: A => B): Translated[B] =
new Translated[B](env => f(apply(env)))
//(...)
}
16. XML literals
XML can be part of the code and compiler is checking syntax of it:
def toKmlCoordinates(style: String): String =
(<Placemark>
<name>{"bbox " + this}</name>
<styleUrl>{style}</styleUrl>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>
{west + "," + north + ",0"}
{east + "," + north + ",0"}
{east + "," + south + ",0"}
{west + "," + south + ",0"}
{west + "," + north + ",0"}
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>).toString
17. Scalacheck
Automatic testing of assumptions, using set of generated values.
e.g. the code below tests if
BBox.parse(a.toString) == a
is true for any a
val generator: Gen[BBox] =
for {
s <- choose(-90.0, 90.0)
n <- choose(-90.0, 90.0)
if (n > s)
w <- choose(-180.0, 180.0)
e <- choose(-180.0, 180.0)
} yield new BBox(w, s, e, n)
property("parse . toString is identity") {
check {
(a: BBox) =>
BBox.parse(a.toString) == a
}
}
may yield this failing test message after several evaluations.
18. Scala (Scalding) in our analytics jobs
e.g. popular places job
class PopularPlacesJob(args: Args) extends AccessLogJob(args) {
implicit val mapMonoid = new MapMonoid[String, Long]()
val ord = implicitly[Ordering[(Long, String)]].reverse
readParseFilter()
.flatMap(’entry -> ’ppid) {
entry:AccessLogEntry => entry.request.ppid
}
.mapTo((’entry, ’ppid) -> (’ppid, ’time, ’app)) {
arg: (AccessLogEntry, String) => (arg._2, arg._1.dateTime, a
}
.groupBy((’ppid, ’app)) {
_.min(’time -> ’minTime)
.max(’time -> ’maxTime)
.size(’num)
}
.groupBy((’ppid)) {
_.min(’minTime)
.max(’maxTime)
.sum(’num)
19. Not so good in Scala
Almost whole team needed to learn the new language - luckily we have
Toralf ;)
Tools are not as mature as those in Java (but they are getting better very
fast)
Longer compilation, compiler has a lot more to do (e.g. type inference)
Multiple inheritance (traits)
Operators
changes in every language release
20. What we have learned, discovered?
When done right - it’s possible to painlessly migrate code to new
language, developing new feautres in the same time
How to use good typesystem and enjoy it
Take advantage form whole great immutable world of painless
programming
Use functions as first class citizens of language
21. Plans
Scala 2.10
Run Transformations in Futures, Validations etc.
Akka actors, Futures composition
Kill last Java files?
Stop using Spring
22. Thank you!
project site:
places.nlp.nokia.com
My contact:
lukasz.balamut@nokia.com
@lbalamut
open position in our team: