The document discusses the challenges of shared state concurrency using threads and how Erlang addresses these issues using message passing concurrency without shared state. It provides examples of war stories from developers struggling with threads and priority inversion issues. Erlang allows for easy concurrency through message passing between processes using features like Mnesia distributed database and hot code reloading. This model maps better to representing objects as independent actors. Erlang has been successfully used in large telecom systems requiring high reliability.
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARKTsuyoshi Horigome
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARK. English Version is http://www.spicepark.net. Japanese Version is http://www.spicepark.com by Bee Technologies.
During the session I would like to bring basic concepts about the performance testing and highlight the activities,
that we are running in CTCo. I believe, that primary audience for this session
would be test engineers, that do not have experience in this activity and would like to gain some knowledge in this area.
Keynote for the Yahoo! Frontend Developer's Summit 2008 held at the Yahoo! campus in Sunnyvale, CA. Looks at lessons from programming from the past and applies to web developer's today.
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARKTsuyoshi Horigome
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARK. English Version is http://www.spicepark.net. Japanese Version is http://www.spicepark.com by Bee Technologies.
During the session I would like to bring basic concepts about the performance testing and highlight the activities,
that we are running in CTCo. I believe, that primary audience for this session
would be test engineers, that do not have experience in this activity and would like to gain some knowledge in this area.
Keynote for the Yahoo! Frontend Developer's Summit 2008 held at the Yahoo! campus in Sunnyvale, CA. Looks at lessons from programming from the past and applies to web developer's today.
MongoDB 4.2 comes GA soon delivering some amazing new features on multiple areas. In this talk, we will focus on changes related to sharded clusters. We are going to cover distributed transactions & mutable shard keys providing examples that will reveal the internals of those new features. We will provide best practices around the new sharding features and we will cover other minor changes related to it.
Next Generation Indexes For Big Data Engineering (ODSC East 2018)Daniel Lemire
Maximizing performance in data engineering is a daunting challenge. We present some of our work on designing faster indexes, with a particular emphasis on compressed indexes. Some of our prior work includes (1) Roaring indexes which are part of multiple big-data systems such as Spark, Hive, Druid, Atlas, Pinot, Kylin, (2) EWAH indexes are part of Git (GitHub) and included in major Linux distributions.
We will present ongoing and future work on how we can process data faster while supporting the diverse systems found in the cloud (with upcoming ARM processors) and under multiple programming languages (e.g., Java, C++, Go, Python). We seek to minimize shared resources (e.g., RAM) while exploiting algorithms designed for the single-instruction-multiple-data (SIMD) instructions available on commodity processors. Our end goal is to process billions of records per second per core.
The talk will be aimed at programmers who want to better understand the performance characteristics of current big-data systems as well as their evolution. The following specific topics will be addressed:
1. The various types of indexes and their performance characteristics and trade-offs: hashing, sorted arrays, bitsets and so forth.
2. Index and table compression techniques: binary packing, patched coding, dictionary coding, frame-of-reference.
Get the best out of MySQL Cluster, presentation covers:
- Tuning and optimization to exploit the auto-sharded, distributed design of MySQL Cluster
- Using Adaptive Query Localization to scale cross-shard JOINs
- Data access patterns, schema and query optimizations
- Recommended tuning parameters
Tune in to the on-demand webinar: http://www.mysql.com/news-and-events/on-demand-webinars/display-od-719.html
MongoDB 4.2 comes GA soon delivering some amazing new features on multiple areas. In this talk, we will focus on changes related to sharded clusters. We are going to cover distributed transactions & mutable shard keys providing examples that will reveal the internals of those new features. We will provide best practices around the new sharding features and we will cover other minor changes related to it.
Next Generation Indexes For Big Data Engineering (ODSC East 2018)Daniel Lemire
Maximizing performance in data engineering is a daunting challenge. We present some of our work on designing faster indexes, with a particular emphasis on compressed indexes. Some of our prior work includes (1) Roaring indexes which are part of multiple big-data systems such as Spark, Hive, Druid, Atlas, Pinot, Kylin, (2) EWAH indexes are part of Git (GitHub) and included in major Linux distributions.
We will present ongoing and future work on how we can process data faster while supporting the diverse systems found in the cloud (with upcoming ARM processors) and under multiple programming languages (e.g., Java, C++, Go, Python). We seek to minimize shared resources (e.g., RAM) while exploiting algorithms designed for the single-instruction-multiple-data (SIMD) instructions available on commodity processors. Our end goal is to process billions of records per second per core.
The talk will be aimed at programmers who want to better understand the performance characteristics of current big-data systems as well as their evolution. The following specific topics will be addressed:
1. The various types of indexes and their performance characteristics and trade-offs: hashing, sorted arrays, bitsets and so forth.
2. Index and table compression techniques: binary packing, patched coding, dictionary coding, frame-of-reference.
Get the best out of MySQL Cluster, presentation covers:
- Tuning and optimization to exploit the auto-sharded, distributed design of MySQL Cluster
- Using Adaptive Query Localization to scale cross-shard JOINs
- Data access patterns, schema and query optimizations
- Recommended tuning parameters
Tune in to the on-demand webinar: http://www.mysql.com/news-and-events/on-demand-webinars/display-od-719.html
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
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.
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/
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
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.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
2. Threads
2
Concurrency = Threads, for most of you. So, what’s so hard about threads?
3. pthread_mutex_lock(mutex);
mutate_variable();
pthread_mutex_unlock(mutex);
3
Lock, mutate/access, unlock, on every access to the variable. Looks simple, right?
4. War Stories
4
Well, let’s hear some war stories from our own community that may indicate that concurrency
isn’t quite so easy… (2 minutes)
5. “A computer is a
state machine.
Threads are for
people who can’t
program state
machines.”
— Alan Cox
5
6. 6
Andrew Tridgell: Software Engineering Keynote at Linux.conf.au 2005. In the context of
techniques used in Samba 4 to handle multiple concurrent client connections.
9. “State machines send you mad.”
9
And this is why Alan Cox’s quip about state machines is, well, slightly incorrect. State
machines really do send you mad once you have to handle a metric boatload of states.
10. “Samba4: Choose your own
combination of evil, ugly and
mad.”
10
Similar to Apache: ofload the choice to the user. Why does a user have to choose between
apache-mpm-event, -itk, -perchild, -threadpool, and -worker threading models? Main
point: Tridge is unhappy with all these models.
11. “… I recall how I took a lock on a data structure
that when the system scaled up in size lasted 100
milliseconds too long, which caused backups in
queues throughout the system and deadly cascade
of drops and message retries…”
11
12. “… I can recall how having a common memory
library was an endless source of priority inversion
problems…”
12
13. “… These same issues came up over and over
again. Deadlock. Corruption. Priority inversion.
Performance problems. Impossibility of new people
to understand how the system worked…”
13
14. “After a long and careful analysis the results are
clear: 11 out of 10 people can't handle threads.”
— Todd Hoff,
The Solution to C++ Threading is Erlang
14
In light of how hard (shared state) concurrency is to do right, do we need concurrency at all?
(6 minutes)
15. 32 Cores
15
Reason 1: Performance, scalability. Servers already have 32 cores. Much bigger challenge to
write server code that can scale well to this size. (Apache? Samba?)
17. Processor Cores (source: Herb Sutter—”Software and the Concurrency Revolution”)
32
24
16
8
0
6
7
8
9
0
1
2
3
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
2
2
2
2
2
2
2
2
17
Reason 2: You’ll be required to. Desktops already have 2 cores. Multithreading not
important for a lot of applications, but some apps really benefit from them (Photoshop
GIMP!)
18. 18
Let’s talk about an industry that has had to face these problems in the past few years: games!
19. 19
In the talk, this is was a trailer for Company of Heroes, a state-of-the-art game in 2006
developed by Relic Entertainment. The video was designed to show the interaction of a lot of
objects and also the fantastic graphical detail that can be achieved today.
24. “If you want to utilize
all of that unused
performance, it’s
going to become
more of a risk to you
and bring pain and
suffering to the
programming side.”
— John Carmack
24
So what do games programmers think about concurrency? Do they find it easy? Apparently
not… (12 minutes).
25. 25
Tim Sweeney: lead programmer designer, Unreal Tournament (from the original to 2007).
Best game engine architect and designer, bar none. Unreal Engine 3 to be sustainable to
2010 (16 cores). 50+ games using UE series. Used in FPSs, RTSs, MMORPGs…
27. 27
Arguably the best games architect and designer in the world is calling shared-state
concurrency intractable. How on Earth are the rest of us puny humans meant to cope?
28. “Surely the most
powerful stroke
for software
productivity,
reliability, and
simplicity has been
the progressive
use of high-level
languages for
programming.”
— Fred P. Brooks
28
Perhaps a better programming paradigm can help with this?
29. 29
Erlang: a programming language developed at Ericsson for use in their big
telecommunications switches. Named after A. K. Erlang, queue theory mathematician. (16
minutes).
30. Hello, World
hello() - io:format( quot;hello, world!~nquot; ).
hello( Name ) - io:format( quot;hello, ~s!~nquot;, [ Name ] ).
30
Variable names start with capital letters. Variable names are single-assignment (const).
31. Hello, Concurrent
World
-module( hello_concurrent ).
-export( [ receiver/0, giver/1, start/0 ] ).
receiver() -
receive
diediedie - ok;
{ name, Name } - io:format( quot;hello, ~s~nquot;, [ Name ] ), receiver()
end.
giver( ReceiverPid ) -
ReceiverPid ! { name, quot;Andrequot; },
ReceiverPid ! { name, quot;Linux.conf.auquot; },
ReceiverPid ! diediedie.
start() -
ReceiverPid = spawn( hello_concurrent, receiver, [] ),
spawn( hello_concurrent, giver, [ ReceiverPid ] ),
start_finished.
31
Tuples, spawn used to start new threads, ! used to send messages, and receive used to
receive messages. No locking, no mutexes, no shared state at all…
32. Apache (Local) Apache (NFS) YAWS (NFS)
KB per Second
Number of Concurrent Connections
32
And how is Erlang’s performancece? Apache dies at 4,000 connections. YAWS? 80000+…
(and that’s one Erlang process per client connection!)
33. Erlang
VM
process process
(N threads) (M threads)
user space
kernel space
33
Userland (green) threads. Cooperative scheduler — but safe, because Erlang VM is in full
control. Erlang R11B uses multiple kernel threads for I/O and SMP eficiency. No kernel
threads means no context switching means very very fast threading.
34. War Stories
34
Flip our problem on its head: what can you do if threads are really easy, instead of being
really hard?
35. Concurrency-
Oriented
Programming
35
Reason 3: Threads can map onto the problem space better. What if every object here was its
own thread; its own actor? Wouldn’t that be a much more elegant solution than a big
gigantic state machine? (25 minutes)
36. Crashdump Viewer
36
Erlang has good tools required by industry, since it’s used in industry as well as academia.
e.g. An awesome Crashdump Viewer (or as Conrad Parker would say, Crapdump Viewer).
37. Hot Code Reloading
erl -rsh /usr/bin/ssh -remsh erlang_node@hostname
1 code:purge(module_name).
2 code:load_file(module_name).
37
How to do hot-code-reloading: two lines of Erlang! Existing modules will keep running until
they’re no longer used, all managed by the Erlang VM.
38. Mnesia
-record( passwd, { username, password } ).
mnesia:create_schema( [ node() ] ),
mnesia:start(),
mnesia:create_table( passwd, [] ),
NewUser = #passwd{ username=“andrep”, password=”foobar” },
F = fun() - mnesia:write( passwd, NewUser ) end,
mnesia:transaction( F ).
38
Mnesia is Erlang’s insanely great distributed database. Incredibly simple to use! No data
impedence mismatch. Store tuples, lists, any Erlang object: none of this SQL row/column
nonsense. Query language is just list comprehensions. Transactions are functions!
39. Mnesia
39
Mnesia is replicating. Add new node clusters on-the-fly. Nodes can go down and come back
up, and Mnesia will resync the database information to them automatically. With
programmer help, it can even recover from network partitioning.
40. Self-Healing
Architecture
40
Erlang gives you a complete framework for writing massive, robust, scalable applications.
Callback functions. OO analogy. OTP drives the application: you supply the “business logic”
as callbacks. This means that Erlang is a self-healing, self-sustaining system, and is the main
reason why Erlang applications are so robust. (30 minutes)
41. 41
AXD301 telephone switch. One to two million lines of Erlang code. Downtime of maybe a
few minutes per year, continuous operation over years. On-the-fly upgrades. Mnesia used
for _soft-real-time_ network routing lookup. Mnesia is just 30,000 lines of code. Impressed
yet?
42. 42
5,000-10,000 clients + 800 other Jabber servers all connected to one single machine. Load
average is rather low. Also doesn’t crash, unlike jabberd2!
43. o
N
pthread_mutex_lock(mutex);
y
a
S
mutate_variable();
t
s
u
pthread_mutex_unlock(mutex);
J
43
Shared state concurrency just doesn’t scale well, is hard to get right (especially if
performance is needed: what granularity of locks do you use?). Race conditions, deadlocks,
livelocks, no compiler help. Just say no!
44. 44
Prefer the messaging (actor) model: use it in your own language! You can do it in C, C++,
Python, Java, or whatever your other language is. You may have to write some infrastructure
code, but by God it’ll be easier in the end!