This document summarizes a talk about using the Scalaz library in real-world Scala applications. It begins by acknowledging common criticisms of Scalaz as being too complex or not immediately useful. It then provides examples of how the speaker's company uses Scalaz for tasks like JSON mapping and handling state. The speaker advocates using Scalaz intentionally and delineating pure and impure code. They discuss strategies for learning Scalaz incrementally and as a team. The document argues that with pragmatic use, Scalaz can make code more modular, testable and help reason about concurrency without adding undue complexity.
WebGL brings hardware accelerated 3D to your browser. The code may be complex, but the possibilities are amazing. Given as a lecture in the fh ooe in Hagenberg, Austria in December 2011.
WebGL brings hardware accelerated 3D to your browser. The code may be complex, but the possibilities are amazing. Given as a lecture in the fh ooe in Hagenberg, Austria in December 2011.
Microservices and functional programmingMichael Neale
A talk I did recently on microservices and functional programming. Microservices are small, single purpose apps that are run as a service, which are usually composed together to provide the real app.
"Microservices" is one of the hottest buzzwords and, as usual, everyone wants them, but few know how to build them. In this talk we will offer our interpretation of microservice architecture, and show how we are implementing these ideas: using Scala, Akka, sbt and Docker, we modularized Akka applications, Spark jobs and Play servers.
In the talk we will discuss design trade-offs and challenges that we faced in the process, and how we have overcome them. The focus is not on particular features of Scala language or a library, but on building modern applications using the Typesafe stack and other open-source tools.
Shift: Real World Migration from MongoDB to CassandraDataStax
Presentation on SHIFT's migration from MongoDB to Cassandra. Topics will include reasons behind choosing to move to Cassandra, zero downtime migration strategy, data modeling patterns, and the benefits of using CQL3.
Building microservices with Scala, functional domain models and Spring BootChris Richardson
In this talk you will learn about a modern way of designing applications that’s very different from the traditional approach of building monolithic applications that persist mutable domain objects in a relational database.We will talk about the microservice architecture, it’s benefits and drawbacks and how Spring Boot can help. You will learn about implementing business logic using functional, immutable domain models written in Scala. We will describe event sourcing and how it’s an extremely useful persistence mechanism for persisting functional domain objects in a microservices architecture.
Resilient Applications with Akka Persistence - Scaladays 2014Björn Antonsson
In this presentation you will learn how to leverage the features introduced in Akka Persistence: opt-in at-least-once delivery semantics between actors and the ability to recover application state after a crash. Both are implemented by storing immutable facts in a persisted append-only log. We will show you how to create persistent actors using command and event sourcing, replicate events with reliable communication, scale out and improve resilience with clustering.
Akka persistence == event sourcing in 30 minutesKonrad Malawski
Akka 2.3 introduces akka-persistence, a wonderful way of implementing event-sourced applications. Let's give it a shot and see how DDD and Akka are a match made in heaven :-)
Slides for my talk event-sourced architectures with Akka. Discusses Akka Persistence as mechanism to do event-sourcing. Presented at Javaone 2014 and Jfokus 2015.
A bird's eye view on some programming languages, focusing on concepts like typing, execution model or style. Presented on T3chFest 2016 in Leganés, Madrid, Spain.
This is a very ^2 basic introduction to R.
The purpose of this presentation is to prepare you with all that you have to know about fundamentals of using R to operate data frames, which you can easily get by importing data from relational database table or csv/text file.
From Java to Parellel Clojure - Clojure South 2019Leonardo Borges
Java still ranks at the top of the TIOBE index. The JVM is a trusted platform which has stood the test of time and is used widely to develop complex, reliable and high performing systems. By choosing to target the JVM, Clojure can leverage all of its power while bringing new ways of writing reliable software into the mix. But why should a Java developer care?
In this talk we will examine the main differences between Java and Clojure, pointing out new patterns and tools and finally ending with a discussion of the concurrency and parallelism abstractions provided by Clojure.
By the end of this talk you will have developed an understanding of Clojure’s fundamental building blocks for writing concurrent applications.
Microservices and functional programmingMichael Neale
A talk I did recently on microservices and functional programming. Microservices are small, single purpose apps that are run as a service, which are usually composed together to provide the real app.
"Microservices" is one of the hottest buzzwords and, as usual, everyone wants them, but few know how to build them. In this talk we will offer our interpretation of microservice architecture, and show how we are implementing these ideas: using Scala, Akka, sbt and Docker, we modularized Akka applications, Spark jobs and Play servers.
In the talk we will discuss design trade-offs and challenges that we faced in the process, and how we have overcome them. The focus is not on particular features of Scala language or a library, but on building modern applications using the Typesafe stack and other open-source tools.
Shift: Real World Migration from MongoDB to CassandraDataStax
Presentation on SHIFT's migration from MongoDB to Cassandra. Topics will include reasons behind choosing to move to Cassandra, zero downtime migration strategy, data modeling patterns, and the benefits of using CQL3.
Building microservices with Scala, functional domain models and Spring BootChris Richardson
In this talk you will learn about a modern way of designing applications that’s very different from the traditional approach of building monolithic applications that persist mutable domain objects in a relational database.We will talk about the microservice architecture, it’s benefits and drawbacks and how Spring Boot can help. You will learn about implementing business logic using functional, immutable domain models written in Scala. We will describe event sourcing and how it’s an extremely useful persistence mechanism for persisting functional domain objects in a microservices architecture.
Resilient Applications with Akka Persistence - Scaladays 2014Björn Antonsson
In this presentation you will learn how to leverage the features introduced in Akka Persistence: opt-in at-least-once delivery semantics between actors and the ability to recover application state after a crash. Both are implemented by storing immutable facts in a persisted append-only log. We will show you how to create persistent actors using command and event sourcing, replicate events with reliable communication, scale out and improve resilience with clustering.
Akka persistence == event sourcing in 30 minutesKonrad Malawski
Akka 2.3 introduces akka-persistence, a wonderful way of implementing event-sourced applications. Let's give it a shot and see how DDD and Akka are a match made in heaven :-)
Slides for my talk event-sourced architectures with Akka. Discusses Akka Persistence as mechanism to do event-sourcing. Presented at Javaone 2014 and Jfokus 2015.
A bird's eye view on some programming languages, focusing on concepts like typing, execution model or style. Presented on T3chFest 2016 in Leganés, Madrid, Spain.
This is a very ^2 basic introduction to R.
The purpose of this presentation is to prepare you with all that you have to know about fundamentals of using R to operate data frames, which you can easily get by importing data from relational database table or csv/text file.
From Java to Parellel Clojure - Clojure South 2019Leonardo Borges
Java still ranks at the top of the TIOBE index. The JVM is a trusted platform which has stood the test of time and is used widely to develop complex, reliable and high performing systems. By choosing to target the JVM, Clojure can leverage all of its power while bringing new ways of writing reliable software into the mix. But why should a Java developer care?
In this talk we will examine the main differences between Java and Clojure, pointing out new patterns and tools and finally ending with a discussion of the concurrency and parallelism abstractions provided by Clojure.
By the end of this talk you will have developed an understanding of Clojure’s fundamental building blocks for writing concurrent applications.
These are the outline slides that I used for the Pune Clojure Course.
The slides may not be much useful standalone, but I have uploaded them for reference.
Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It has established itself as one of the main alternative languages on the Java Virtual Machine, being used by companies like Twitter and LinkedIn. Scala fuses functional programming (from which it borrows higher-order functions and closures, generic typing and immutable data structures) and object-oriented programming programming (from which it takes inheritance and encapsulation). It interoperates fully with Java, allowing a smooth transition and access to all existing Java libraries.
Scala’s lightweight syntax makes it easy to extend the language through DSLs. In this talk we are going to have a quick overview of Scala’s main features (closures, higher-order functions, implicits), and collection classes in the standard library. We’ll see how a new concurrency model, such as actors, can be added to the language through a library.
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.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
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/
Welcome to the first live UiPath Community Day Dubai! Join us for this unique occasion to meet our local and global UiPath Community and leaders. You will get a full view of the MEA region's automation landscape and the AI Powered automation technology capabilities of UiPath. Also, hosted by our local partners Marc Ellis, you will enjoy a half-day packed with industry insights and automation peers networking.
📕 Curious on our agenda? Wait no more!
10:00 Welcome note - UiPath Community in Dubai
Lovely Sinha, UiPath Community Chapter Leader, UiPath MVPx3, Hyper-automation Consultant, First Abu Dhabi Bank
10:20 A UiPath cross-region MEA overview
Ashraf El Zarka, VP and Managing Director MEA, UiPath
10:35: Customer Success Journey
Deepthi Deepak, Head of Intelligent Automation CoE, First Abu Dhabi Bank
11:15 The UiPath approach to GenAI with our three principles: improve accuracy, supercharge productivity, and automate more
Boris Krumrey, Global VP, Automation Innovation, UiPath
12:15 To discover how Marc Ellis leverages tech-driven solutions in recruitment and managed services.
Brendan Lingam, Director of Sales and Business Development, Marc Ellis
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
A tale of scale & speed: How the US Navy is enabling software delivery from l...
Real World Scalaz
1. REAL
W⊛RLD
SCALAZ
http://speakerdeck.com/u/jrwest/p/real-world-scalaz
changed talk title (“practical scalaz” by Chris Marshall http://skillsmatter.com/podcast/scala/practical-scalaz-2518)
2. “If you are thinking of using
Scalaz, stop now while you
still have your sanity"
* context: java devs learning scala
* source: http://zeroturnaround.com/blog/scala-sink-or-swim-part-1/#scalaz
3. “How does this help
you ship features or
improve your product?”
* context: commenting on the use of lenses
* source: https://twitter.com/#!/coda/status/167794305107361796)
4. “It will not immediately
help you write better
programs that are easy to
understand”
* hear/read this often
* source: http://zeroturnaround.com/blog/scala-sink-or-swim-part-1/#scalaz
5. “There are two types of
[libraries]: the ones people hate
and the ones nobody uses”
- unknown
* applies to scala too
* know correct attribution? contact me
6. HOW
&
WHY?
* those quotes pretty much boil down to these two questions:
* how: apply tools given by scalaz to real world problems? to handle human scale?
* why would we choose this solution over other ones?
7. @_jrwest
github.com/jrwest
blog.loopedstrange.com
* a little context before we talk about the “how & why?”
8. I
WORK @
* small team, < 15 engineers
* many have java bg, but not all, most w/ little to no scala experience
* most have oop bg, varying knowledge of FP topics
9. WE USE SCALA
{ a lot }
* 15+ public facing services supported by many other internal modules/libs
* most built on netty, also I/O bound
* originally java, now > 70% scala
10. libraryDependencies +=
“org.scalaz” %% “scalaz-core” % “6.0.3”
* almost all our services depend on scalaz
* usage levels and parts of scalaz used vary among services
* blocked on upgrading to 6.0.4 b/c of binary compatibility issues
12. JSON Mapping
def Fi
leMani
def re festJS
ad(jso ONR =
ma n: JVa new JS
nifest lue) = ONR[ Ap
NoId.a p I D= > F
field( pplyJS ileMan
jsonMa O N( ifest]
f i e l d( nifest {
)(json change K e y) ,
) LogEnt
} ryCach
edJson
} K e y)
* lift-json-scalaz (https://github.com/lift/framework/tree/master/core/json-scalaz)
* validationnel applicative, error accumulation = better user-facing errors & debugging
* composition
13. S @-@ A / State[S,A]
for
{
mbE
_ xis
<- ts
_ man <-
<- ife man
} y cha stF ife
iel nge ile stF
d m Log s - ile
bEx Ent = p s m
ist ryF ath emb
s ile er
s - pat
=? h
(pa
th,
mbE
xi sts
>|
fal
se
| t
rue
)
* easy manipulation of highly nested case classes (ex: file manifests)
* better implementation hiding
* rich libraries (e.g. MapLens, SetLens, & provided state actions)
14. sideEffect.pure[IO]
ble ,X]
[ Thr owa = {
io n NEL in g]) _))
al i dat st [ Str mai n] (
X ]=V : Li mDo
y pe V[ s (ke ys [Cu sto
t tch K ey
t .fe tch ain ]])
def fe buc ke tom Dom
ap ( Cus
ke y s.m pti on[
qu e nce ce[ V,O
.se seq uen
(_.
. map
}
* can’t guarantee purity, can delineate impurity
* examples: storing data in riak, uploading files to s3 and phonegap build svc
* composition of IO makes side-effecting code much more reusable
15. Kle
]
i sli
]
OptionW[A] Tree[A]
F[_
[M
[_]
le[
,A, Pure[P[_]
B] ]
ab
MAB[M[
_],A,B]
ld
Bind[Z[ [A]
_ ]] ro
Fo
Ze t[ A]
Tra ty Lis
ver Identity ] NonEmp
p [ A
e [T s u
Fun [_]] r o
ctor mig Appl
[F[_] Se y[A[_
] MA[ M[_ ],A] ]]
* we make use of a lot more as well
* data structures like Validation and NonEmptyList
* most type classes and “enrichments”
16. ITS NOT ALL OR NOTHING
* shades of grey, not black and white
* scalaz is really many libraries, use the parts you want
* we started using “encrichments” and some data structures, grew from there
--
original image: http://www.chicagonow.com/chicago-tough/files/2012/03/chipsallin.jpg
17. MAKE BORDERS
* don’t abuse scala’s flexibility & power
* toss pure/impure code into a salad bowl & mixing is a bad idea
* define borders where pure code meets impure code
--
original image: http://media.nowpublic.net/images//59/4/59455eabd625a15e2afb583dcfbb27ce.jpg
18. Public Interface
Implementation
Dependency Calls
* your code can be pure
* public interface is the border, it runs IO, throws exceptions, etc
* existing libraries probably aren’t pure -- many are java after all
19. Outside World
Business Logic
* communicate with clients via HTTP
Data Access
* the most important part -- your code -- make pure*
* perform side-effects like talk to database, read/write files, etc
20. Impure
Pure
Impure
* “the sandwich” - common pattern in our code
--
original image: http://fastfood.ocregister.com/files/2010/05/ice-cream-sandwich1.jpg
21. :)
* code has become much more DRY/modular and as a result more unit testable
* concurrent code becomes “simpler” to reason about when pure
* FP makes reasoning about bugs simpler, narrow down cause faster
22. :(
* scala hardsips: bin. compatability problems, tooling deficiencies, type inference limits
* import scalaz._; import Scalaz._ adds a lot of clutter in the current scope
* lack of docs/related content (in Scala!)
23. scalaz7
* not currently used in our production systems but one or two of my side projects
* much better for teaching (explicit type class instance usage -- w/o syntax ext.)
* addresses some of the issues we have like importing “the scalaz world”
25. “Human Scale”
* the complexity comments may be FUD, but that does not mean there is not stuff to learn here
* how do we help new employees learn scala & scalaz?
26. HIRE PEOPLE WHO
WANT TO LEARN
* hiring from all backgrounds instead of hiring a “scala or java developer” is much easier
* those people need to be open to exploring and learning new tech/methods
27. Shared Resources
* easy win, shares effort in finding good resources
* dropbox full of downloaded papers and books purchased by the company
* internal talks available on github
28. * code review/pull requests
LEARN TOGETHER
* face to face discussion on a whiteboard
* team talks on fridays, any one can attend, anyone can talk, neither mandatory
29. ON YOUR OWN
* RTFC -- in the end it all just code
* apply what you know, this is what really makes you learn it
* internal talks mostly make you aware of it, give you starting point, application is key
30. ITS NOT ALL OR NOTHING
* focus on understanding a part of the library
* break that part down, use it in the repl in a few cases (w/ a few types, examples, etc)
* as you learn more about each part and then more parts the bigger picture emerges
--
original image: http://www.chicagonow.com/chicago-tough/files/2012/03/chipsallin.jpg
31. Learn You a
??
* not necessary
* understanding syntax, basics can be useful while learning concepts until scala docs fill out
--
haskell logo: http://www.haskell.org/wikistatic/haskellwiki_logo.png
33. BREAK
RULES
* you may hear things you cannot do, “validation is not a monad”
* ignore and explore yourself -- these are the real learning opportunites
* understand how to implement validation monad and why no error accum. happens
34. PAYING
UPFRONT
* of course this have some upfront cost
* so does writing tests and similarly a good balance pays off
35. L3
L2
L1
A3
Level
A2
A1
Up
* scalaz covers most advanced features in scala language
* great guide for library and code design (to an extent). Scalaz guys have done serious amount of research in this regard
37. SOME RESOURCES
• Atlassian’s Typeclassopedia - http://typeclassopedia.bitbucket.org
• Apocalisp Blog - http://apocalisp.wordpress.com/
• “Functional Programming in Scala” MEAP - http://manning.com/bjarnason/
• Eric Torreborre’s Blog - http://etorreborre.blogspot.com/
• StackMob Engineering Blog - http://www.stackmob.com/category/engineering/
• Learn You a Scalaz (my WIP, about to undergo major rework) -
https://github.com/jrwest/learn-you-a-scalaz
• Chris Marshall’s “Practical Scalaz” Talk - http://skillsmatter.com/podcast/scala/
practical-scalaz-2518