Scala (pronounced Skah-lah) is a scalable programming language targeting the JVM and the .NET platforms that is quickly gaining acceptance in a number of different domains and application areas ranging from trading to web programming. OpenSplice DDS is a high performance data distribution technology powering some of todays most challenging distributed systems in sectors including transportation, defense and finance. Scala and OpenSplice DDS share the same objective, namely simplifying the construction of complex systems, as a result their combination results in a very powerful platform for developing distributed systems. This Webcast will introduce you to Scala and OpenSplice DDS, and will take you through a series of examples showing how Scala can be used in combination with OpenSplice DDS to build distributed systems.
2. OpenSplice DDS
Delivering Performance, Openness, and Freedom
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Type Matters
3. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
The Type Systems Debate
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ The debate around type Programming Languages Type Systems
has animated computer scientist over several decades and is far
from being resolved
‣ New Programming Languages are continuing to appear on both
sides of the fence
Statically Typed (ex.) Dynamically Typed (ex.)
F #
4. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Are you a Type-Phobic Type?
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Proponents of Dynamically Typed Programming Languages
advocate against strong typing in favor of reduced verbosity
and added flexibility
Yet... Are they so sure that a type system always gets
between you and what you are trying to achieve?
5. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Strongly-Typed Type-Systems
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Well designed type-systems don’t add unnecessary verbosity to
your application since use sophisticated inference to derive
types
‣ Allow the detection of many errors at compile time, thus
improving productivity, code quality and reducing the potential
for run-time errors
‣ Enable the generation of more efficient code
6. OpenSplice DDS
Delivering Performance, Openness, and Freedom
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Type Matters in
Distributed Systems
7. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Type Systems and Distributed Systems
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ The Type System debate has not spared distributed systems
‣ Today we can find different technologies taking different
approaches: from completely untyped to strongly typed
‣ The differences are in this case more complex to organize:
‣ Some technologies support only one type, being a string or an array of
bytes (e.g. AMQP)
‣ Other technologies support some predefined types (e.g JMS)
‣ Other technologies allow the definition of user-specified types (e.g DDS)
8. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Types and Distributed Systems
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
T3
T1
T2 T2
T3
T4
? T1
T4
T1 T1
T3 T2
User Defined Types
T1 T2 T3 T4
9. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Types and Distributed Systems
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
T3
T1
T2 T2
Pub/Sub Types
T3 T1
octect sequence
T4 T4
T1 T1
T3
AMQP T2
User Defined Types
T1 T2 T3 T4
10. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Types and Distributed Systems
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
T3
T1
T2 T2
MapMessage
T3 ObjectMessage TextMessage T1
T4 StreamMessage T4
ByteMessage Pub/Sub Types
T1 T1
JMS
T3 T2
11. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Types and Distributed Systems
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
T3
T1 Pub/Sub Types == User Types!
T2 T2
T1 T1
T3 T1
T2 T3
T4 T3 T4
T4
T1 T1
DDS
T3 T2
12. OpenSplice DDS
Delivering Performance, Openness, and Freedom
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
My Manifesto
13. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
My Type-System Manifesto
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Modern Statically typed programming languages are very
valuable for building scalable, safe, and efficient applications
‣ Modern Statically typed middleware systems are very valuable
for building scalable, safe, and efficient distributed applications
14. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
...Thus
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
+
OpenSplice DDS =
The best choice for building
safe, efficient, and scalable
distributed systems
15. OpenSplice DDS
Delivering Performance, Openness, and Freedom
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Stepping into SCALA
16. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
What is Scala
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala (pronounced Skah-lah) stands for “Scalable language”
‣ It is a language that carefully and creatively blends Object
Oriented and Functional constructs into a statically typed
language with sophisticated type inference
‣ Scala targets the JVM and .NET runtime and is 100%
compatible with Java
17. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Why should you care?
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala is simple to write, extremely compact and easy to
understand
‣ Scala is strongly typed with a structural type system
‣ Scala uses a sophisticated type inference to deduce types
whenever possible
‣ Scala is an extensible language (many construct are build in
the standard library)
‣ Scala makes it easy to design Domain Specific Language
18. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Complex Numbers
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ To explore some of the nice features of Scala, let’s see how
we might design a Complex number class
‣ What we expect to be able to do is all mathematical
operations between complex numbers as well as scalar
multiplications and division
‣ [(1+i2)+2*(3-i5)*(i4)]/(1+i3)
‣ ~(1+i2) [Conjugate]
‣ !(3+i4) [Modulo]
19. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Constructor
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala allows to implicitly create constructors and attributes
starting from a simple argument list associated with the class
declaration
class Complex(val re: Float, val im: Float)
20. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
In Java
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
public class Complex {
! private final float re;
! private final float im;
! public Complex(float re, float im) {
! ! this.re = re;
! ! this.im = im;
! }
! public float re() { return re;}
! public float im() { return im;}
21. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Methods
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Everything in Scala is a method even operators
‣ Methods name can be symbols such as *, !, +, etc.
def + (c: Complex) : Complex = Complex(re + c.re, im + c.im)
or, taking advantage of type inference....
def + (c: Complex) = Complex(re + c.re, im + c.im)
23. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
As a result...
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
val result = Complex(1,2) + Complex(2,3)
Complex c1 = new Complex(1, 2);
Complex c2 = new Complex (3,4);
Complex c3 = c1.add(c2);
or...
Complex c3 = (new Complex(1, 2).add(new Complex (3,4));
24. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Negation and Scalar Multiplication
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ In order to design a Complex class that is well integrated in
our type system we should be able to support the following
cases:
‣ -(a+ib)
‣ c*(a+ib)
‣ (a+ib)*c
‣ How can we supporting something like -(a+ib) and c*(a+ib)?
25. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Scala Unary Operators
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala allows to define unary operators for the following
method identifiers +, -, !, ~
def unary_-() = Complex(-re, -im)
!
def unary_!() = Math.sqrt(re*re + im*im)
!
def unary_~() = Complex(re, -im)
as a result we can write:
val result = -Complex(1,2) + ~Complex(2,3)
26. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Scala Implicit Conversions
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ The expression:
val c3 = 3*Complex(5, 7)
‣ Is equivalent to:
val c3 = 3.*(Complex(5, 7))
‣ Yet, the method to multiply a Integer to a Complex is not
present in the Scala Int class
‣ What can we do to make the trick?
27. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Scala Implicit Conversions
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala does not support Open Classes, thus allowing to add
new methods to existing classes
‣ Yet Scala supports implicit conversions that can be used to
achieve the same result
‣ Lets see how...
32. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Functions
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala has first-class functions
‣ Functions can be defined and called, but equally functions can
be defined as unnamed literals and passed as values
def inc(x: Int) = x + 1 val vinc = (x: Int) => x+1
inc(5) vinc(5)
Notice once again the uniform access principle
33. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Playing with Functions
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
val list = List(1,2,3,4,5,6,7,8,9)
val g5 = list.filter((x: Int) => x > 5)
g5: List[Int] = List(6, 7, 8, 9)
Or with placeholder syntax
val list = List(1,2,3,4,5,6,7,8,9)
val g5 = list.filter(_ > 5)
g5: List[Int] = List(6, 7, 8, 9)
34. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Closures
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala allows you to define functions which include free
variables meaning variables whose value is not bound to the
parameter list
‣ Free variable are resolved at runtime considering the closure
of visible variable
‣ Example:
def mean(e : Array[Float]) : Float = { def mean(e : Array[Float]) : Float = {
var sum = 0.0F var sum = 0.0F
e.foreach((x: Int) => sum += x) e.foreach(sum += _)
return sum/e.length return sum/e.length
} }
35. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Currying
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala provides support for curried functions which are applied
to multiple argument lists, instead of just one
‣ Currying is the mechanism Scala provides for introducing new
control abstraction
def curriedSum(x: Int)(y: Int) = x + y
curriedSum(1) {
3 +5
}
37. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Traits
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala supports single inheritance from classes but can mix-in
multiple traits
‣ A trait is the unit of code reuse for Scala. It encapsulate
methods and field definitions
‣ Traits usually expect a class to implement an abstract method,
which constitutes the “narrow” interface that allows to
implement a rich behaviour
38. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Ordered Complex Numbers
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Our complex numbers are not comparable
‣ Let’s assume that we wanted to make them comparable, and
lets supposed that we define the total order as based on the
module of the complex number
‣ How can we implement this behavior?
39. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Ordered Trait
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ The Ordered[T] traits encapsulates the set of methods that
allow to define a total ordering over a type
‣ All the behaviour is defined in terms of an abstract method,
namely “compare”
‣ Classes that mix-in this trait have to implement the “compare”
method
class Complex(val re: Float, val im: Float) extends Ordering[Complex] {
def compare(x: Complex, y: Complex) = {
if (x == y) 0
else if (!x > !y) 1
else -1
}
}
41. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Type Parametrization
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala provides support for type parametrization and makes it
available for both classes as well as traits
trait Queue[T] {
def head: T
def tail: Queue[T]
def append(x: T) : Queue[T]
}
‣ Scala allows to annotate the parametrized type to control the
resulting type variance
42. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Type Variance
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ If S <: T is Queue[S] <: Queue[T]?
‣ By default Scala makes generic types nonvariant. This
behaviour can be changed using the following annotations:
‣ Queue[+T] indicates that the the sub-typing is covariant in the
parameter T
‣ Queue[-T] indicates that the the sub-typing is contravariant in
the parameter T
43. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Who is Using Scala
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Scala adoption has been propelled by some user of excellence
such as:
44. OpenSplice DDS
Delivering Performance, Openness, and Freedom
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Stepping into DDS
45. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
How Does it Work?
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
as a
c an be seen
Note: DDS NDA
n of the LI
relaxatio
odel
coord ination m
‣ DDS is based around the Brokers
concept of a fully distributed
Global Data Space (GDS)
DDS
‣ Applications can autonomously Global Data Space
and asynchronously read/
written data in the GDS
46. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
How Does it Work?
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Publisher Brokers Subscriber
‣ Publishers and
Subscribers can
DDS
join and leave the Subscriber
Publisher
GDS at any time Global Data Space
Publisher Subscriber
47. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
How Does it Work?
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Publishers and Publisher Brokers Subscriber
Subscribers express
their intent to
DDS
produce/consume Publisher
Subscriber
specific type of data, Global Data Space
e.g., Topics
Publisher Subscriber
48. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
How Does it Work?
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Publisher Brokers Subscriber
‣ Subscriptions are
matched by taking
into account topics DDS Subscriber
(name, data type and Publisher Global Data Space
QoS)
Publisher Subscriber
49. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
How Does it Work?
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Publisher Brokers Subscriber
‣ Subscriptions are
dynamically matched DDS
and Data flows from Publisher
Subscriber
Global Data Space
Publisher to
Subscribers
Publisher Subscriber
50. Tweeting
with
OpenSplice DDS
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Starting to Tweet
With OpenSplice DDS
51. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
A “Tweet” with DDS
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Topic: Tweet
‣ Unit of information
exchanged between Name
Publisher and Subscribers.
‣ An association between a Type Topic QoS
unique name, a type and a
{
QoS setting TweetType
Reliable,
Persistent,
...
}
52. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
A “Tweet” with DDS
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Topic Type:
‣ Type describing the data
associated with one or more
Topics struct TweetType {
string name;
string tweet;
‣ A Topic type can have a key };
represented by an arbitrary #pragma keylist Tweet userId
number of attributes
‣ Expressed in IDL (or XML)
53. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Tweeting With DDS
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
@bird @ocell
‣ Tweeters come... DDS
Global Data Space
‣ Tweeters go... @oiseau @lintu
@lind @vogel
54. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Tweeting With DDS
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
{@ocell, @oiseau}
@bird @ocell
‣ Tweeters follow DDS
(subscribe) to Global Data Space
@oiseau @lintu
other tweeters {@vogel} {@oiseau, @bird, ocell}
@lind @vogel
55. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Tweeting With DDS
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
{@ocell, @oiseau}
@birdTopic @ocellTopic
‣ Each Tweeter @bird @ocell
can be @oiseauTopic
represented @lintuTopic
@lintu
with a unique @oiseau @lindTopic
topic {@vogel}
@vogelTopic
{@oiseau, @bird, ocell}
@lind @vogel
56. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
can
rti tions
DS pa
Tweeting With DDS
D ng
Note: ied by usi
be specif weeter
.*
g. t
rds, e.
wildca
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
{@ocell, @oiseau}
‣ ...or each tweeter.bird tweeter.ocel
Tweeter can @TweetTopic @TweetTopic
@ocell
be represented @bird
with a unique @TweetTopic
tweeter.oiseau
partition @TweetTopic
@oiseau @lintu
@TweetTopic tweeter.lintu
‣ All tweeters {@vogel} tweeter.lind {@oiseau, @bird, ocell}
use the same @TweetTopic
tweeter.vogel
topic
@lind @vogel
57. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Tweeting With DDS
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
{@ocell, @oiseau}
‣ ...or all
Tweeters use
@ocell
the same topic @bird
‣ Content @TweetTopic
filtering or @oiseau @lintu
queries are {@vogel} {@oiseau, @bird, ocell}
used to extract
relevant data
@lind @vogel
58. OpenSplice DDS
Delivering Performance, Openness, and Freedom
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Who is Using DDS
59. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Some Use Cases
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Defense & Aerospace
‣ Naval Combat Management Systems
‣ Submarines
‣ Vetronics
‣ Tactical Links
‣ Simulation
‣ Cybercrime
‣ Flycatcher Systems
‣ Data Fusion
‣ Battle Transformation Center
61. OpenSplice DDS
Delivering Performance, Openness, and Freedom
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Scala and DDS
62. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
The Escalier Project
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ A new OpenSplice DDS technology
incubator recently launched to
develop a Scala binding for Escalier
OpenSplice DDS
http://code.google.com/p/escalier/
‣ The Scala Binding is being
developed by enhancing the current
Java Binding
‣ Project hosted on google code first
public release by the end of June
65. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Pick your “write”
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ We can also write as:
writer.write(tweet) => writer write tweet
66. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Pick your “write”
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Or if we want to let treat a writer like an actor:
writer ! tweet
67. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Pick your “write”
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ And if we have a lot to tweet:
writer ! (tweet1, tweet2, ..., tweetn)
69. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Pick your “read”
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ We can also write as:
val data = reader.read() => val data = reader read
70. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Pick your “read”
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ Or we can be a bit more functional...:
reader forEach((t: Tweet) => println(t.name + “: “ + t.msg))
71. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Setting QoS
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Example
‣ Setting Durability and History on the TopicQos
val qos = TopicQos() <= PersistentDurability() <= KeepLastHistory(tweetHistory)
val topic = Topic[Tweet](“Tweet”, qos, pub)
73. OpenSplice DDS
The Universal Data Bus
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
Summing-Up
+/-*
74. OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DDS OpenSplice DD
Summing Up
:: http://www.opensplice.org :: http://www.opensplice.com :: http://www.prismtech.com ::
‣ A good type system can help in the development of both
traditional and distributed applications, as it improves code
quality, productivity, safety and runtime efficiency
‣ Scala and OpenSplice DDS are a very powerful combination
since provide scalable language and middleware mechanism
for building large scale complex distributed systems