This document discusses various programming language trends including functional programming languages like Haskell, purely object-oriented languages, and Scala. It also covers database trends like NoSQL databases Cassandra and MongoDB. Programming tools like Docker and Vagrant are mentioned. The document discusses paradigms like static vs dynamic typing and strong vs weak typing. It provides examples and resources for languages including Haskell, Erlang, Scala, and databases like Cassandra.
2. Agenda
Morphy Law?
Technology Trend
a. Programming languages
b. Database
c. Tools
Topics
a. Continuous Integration
b. Test Driven
c. Software as a service (saas) WorkDay
d. Platform as a service (paas) Hadoop,apprenda
e. Infrastructure as a service (iaas) AWS,Microsoft Azure
5. Pure Object Oriented
Languages called "pure" OO languages, because everything in them is
treated consistently as an object, from primitives such as characters and
punctuation, all the way up to whole classes, prototypes, blocks, modules,
etc. They were designed specifically to facilitate, even enforce, OO methods.
Examples: Eiffel, Emerald, JADE, Obix, Ruby, Scala, Smalltalk, Self.
6. Pure Object Oriented
Languages called "pure" OO languages, because everything in them is
treated consistently as an object, from primitives such as characters and
punctuation, all the way up to whole classes, prototypes, blocks, modules,
etc. They were designed specifically to facilitate, even enforce, OO methods.
Examples: Eiffel, Emerald, JADE, Obix, Ruby, Scala, Smalltalk, Self.
7. Pure Functional
Pure functional programming languages do not allow side effects (and are
therefore of little use in practice because any useful program does have side
effects, e.g. when it interacts with the external world).
Example Haskell
8. Pure Functional
In computer programming, a function may be considered a pure function if both of the following
statements about the function hold:
1. The function always evaluates the same result value given the same argument value(s). The
function result value cannot depend on any hidden information or state that may change
while program execution proceeds or between different executions of the program, nor can it
depend on any external input from I/O devices (usually—see below).
1. Evaluation of the result does not cause any semantically observable side effect or output,
such as mutation of mutable objects or output to I/O devices (usually—see below).
9. Java is not a pure Object oriented language,
It’s "Hybrid" language or FULLY OOP.
For any language to be pure object oriented it must follow these 6 points strictly...
1) It must have full support for Encapsulation and Abstraction
2) It must support Inheritance
3) It must support Polymorphism
4) All predefined types must be Objects
5) All user defined types must be Objects
6) Lastly, all operations performed on objects must be only through methods exposed at the objects.
10. Static VS Dynamic
Static/Dynamic typing is about when type information is aquired (Either at
compile time or at runtime)
Strong VS Weak
Strong/Weak typing is about how strictly types are distinguished (e.g. whether
the language tries to do implicit conversion from strings to numbers).
PHP => Dynamic & Weak
Ruby => Dynamic & Strong
Java =>Static & Strong
13. Every expression in Haskell has a type which is
determined at compile time. All the types composed
together by function application have to match up. If
they don't, the program will be rejected by the
compiler. Types become not only a form of guarantee,
but a language for expressing the construction of
programs.
Statically typed
14. You don't have to explicitly write out every type in a
Haskell program. Types will be inferred by unifying
every type bidirectionally. However, you can write
out types if you choose, or ask the compiler to write
them for you for handy documentation.
Type inference
15. Every function in Haskell is a function in the
mathematical sense (i.e., "pure"). Even side-effecting
IO operations are but a description of what to do,
produced by pure code. There are no statements or
instructions, only expressions which cannot mutate
variables (local or global) nor access state like time
or random numbers.
Purely functional
16. Haskell lends itself well to concurrent programming
due to its explicit handling of effects. Its flagship
compiler, GHC, comes with a high-performance
parallel garbage collector and light-weight
concurrency library containing a number of useful
concurrency primitives and abstractions.
Concurrent
17. Functions don't evaluate their arguments. This
means that programs can compose together very
well, with the ability to write control constructs
(such as if/else) just by writing normal functions.
The purity of Haskell code makes it easy to fuse
chains of functions together, allowing for
performance benefits.
Lazy
19. Scala
General purpose programming language
Multi-paradigm language (functional & object oriented)
Very strong static type system
Very rich language
Compiled language
Run in JVM
Can use any java package inside it directly
2003
23. Erlang
First release 1986, in Ericsson Company
While threads require external library support in most
languages, Erlang provides language-level features for
creating and managing processes with the aim of
simplifying concurrent programming.
Though all concurrency is explicit in Erlang, processes
communicate using message passing instead of shared
variables, which removes the need for explicit locks (a
locking scheme is still used internally by the VM)
Why Erlang => http://veldstra.org/whyerlang/
24. Thread VS Process
1. Threads are easier to create than processes since they don't require a separate address space.
2. Multithreading requires careful programming since threads share data structures that should only
be modified by one thread at a time. Unlike threads, processes don't share the same address space.
3. Threads are considered lightweight because they use far less resources than processes.
4. Processes are independent of each other. Threads, since they share the same address space are
interdependent, so caution must be taken so that different threads don't step on each other. This is
really another way of stating #2 above.
5. A process can consist of multiple threads.
25. Erlang
handle very large number of concurrent activities
be easily distributable over a network of computers
be fault-tolerant to both software & hardware errors
scale with the number of machines on the network
be upgradeable & reconfigurable without having to stop & restart
be responsive to users within certain strict timeframes
stay in continuous operation for many years
28. Database Trend
1. BigData and Hadoop
a. MapReduce
2. NoSql Databases
a. Cassandra
b. MongoDB
c. RethinkDB
3. Full Text Search
a. ElasticSearch
29. Column Oriented Database
A column-oriented DBMS is a database management system (DBMS) that stores
data tables as sections of columns of data rather than as rows of data. In
comparison, most relational DBMSs store data in rows. This column-oriented
DBMS has advantages for data warehouses, clinical data analysis, customer
relationship management (CRM) systems, and library card catalogs, and
other ad hoc inquiry systems where aggregates are computed over large
numbers of similar data items.
30. Cassandra
Massively scalable
partitioned row store
masterless architecture
linear scale performance
no single points of failure
read/write support across multiple
datacenters & cloud availability zones.
API / Query Method: CQL and Thrift,
replication: peer-to-peer,
written in: Java,
Concurrency: tunable consistency
built-in data compression
MapReduce support,
primary/secondary indexes
31. Cassandra
Decentralized
Every node in the cluster has the same role. There is no single point of failure. Data is distributed across the cluster (so each node
contains different data), but there is no master as every node can service any request.
Supports replication and multi datacenter replication
Replication strategies are configurable. Cassandra is designed as a distributed system, for deployment of large numbers of nodes
across multiple data centers. Key features of Cassandra’s distributed architecture are specifically tailored for multiple-data
center deployment, for redundancy, for failover and disaster recovery.
Scalability
Read and write throughput both increase linearly as new machines are added, with no downtime or interruption to applications.
Fault-tolerant
Data is automatically replicated to multiple nodes for fault-tolerance. Replication across multiple data centers is supported.
Failed nodes can be replaced with no downtime.
32. Cassandra
Tunable consistency
Writes and reads offer a tunable level of consistency,
all the way from "writes never fail" to "block for all
replicas to be readable", with the quorum level in the
middle
MapReduce support
Cassandra has Hadoop integration, with MapReduce
support. There is support also for Apache Pig and
Apache Hive.
Query language
Cassandra introduces CQL (Cassandra Query Language),
a SQL-like alternative to the traditional RPC interface.
CQL is simple API meant for accessing Cassandra.
33. ReThinkDB
NoSql for real time web applications.
Powerful query language
Very easy UI
Scale in seconds (r.table('games').reconfigure(shards=5, replicas=3))
Suitable for
Web + mobile apps
Multiplayer games
Real time marketplaces
36. Extra Steps
Read => Read =>Read=>......
More Knowledge more powerful
More Knowledge more productive
Follow developers in github
Read others source code
Answers questions in Stackoverflow
subscribe to any learning source
packtpub