Computing in the Real World

quicksandwalleyeInternet και Εφαρμογές Web

31 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

62 εμφανίσεις

Computing in the Real World

Dave Elliman

10/31/2013

G53ELC

1

It follows certain laws


Garbage IN garbage OUT


Lubarsky's Law of Cybernetic Entomology:


There's always one more bug


Adding manpower to a late software project makes it later
(Fred Brooks: The mythical man
-
month)


Premature optimization is the root of all evil. (Donald Knuth)


Murphy’s Second Law:


If something can go wrong it will:


Sod’s corollary: and at the worst possible moment


O’Toole’s Commentry: Murphy was an optimist

Truisms


Any given program, when running, is obsolete


Any given program costs more and takes longer to
develop than expected


If a program is useful, it will have to be changed


Program complexity grows until it exceeds the
capabilities of the programmer who must
maintain it

10/31/2013

G53ELC

4

Woltman's Law:


Never program and drink alcohol at
the same time

10/31/2013

G53ELC

5

More Truisms


@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fo
rk;map{$P=$P[$f^ord ($p{$_})&6];$p{$_}=/
^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait
until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep
rand(2)if/
\
S/;print



"What is that, swearing?" Larry Wall’s daughter


Using Perl is always a mistake.

10/31/2013

G53ELC

6

What were the goals?


Six sigma availability


Fast response time


High reliability


High resilience
-

hardware failure & attacks


Scalability


Maintainability & Testability


Strong security

10/31/2013

G53ELC

7

Sound strategies


Quality Hardware


Testing
-

you need a test environment


Redundancy


RAID disk arrays


Multiple independent
communications
links


Multiple (Virtual?) Servers
-

e.g.
Xen

http://
xen.org
/


Use enterprise design patterns


Web services (
esp

REST)


MVC (Model View Controller)


DI


(Dependency Injection


MOM (Message
-
oriented middle ware)


ORMs (Object relational mappings)


Put it in the cloud


What about the software?

Organise as components with well defined interfaces

Use the best design patterns

Consider SOA where possible

Use an OO approach with ORM and Dependency
Injection

Use agile development process (XP/Scrum) but not in
a lazy way....

Platform


Operating System


Hardware

Platform


Operating System


Hardware

Application

Application

Middleware

(Distributed System Services)

Application Programming Interfaces

Platform Interfaces

Implies middleware

10/31/2013

G53ELC

10

Three
-
Tier Client/Server

GUI

Client

Data

Server

Fat

Server

Fat

Client

Application

Business

Logic

Thin

Client

10/31/2013

G53ELC

11

Deciding on the Client is Important

Pros and cons of thin and thick clients

Can we defer the decision?

There is now a wide range of possibilities

Communication Paradigms


Synchronous


Remote Procedure Calls


Distributed Objects


Asynchronous


Message Oriented Middleware


Publish/Subscribe, Event Technologies

Remote Procedure Call

Client

stubs

Client

Server

Request

Response

Error

Processing

Server

stubs

RPC

RPC

10/31/2013

G53ELC

14

SOA uses MOM


Deferred communication


Complex message semantics


Java Messaging Service (JMS) and
WCF


RabbitMQ

or
NSOperationsQueue

(Cocoa)

Dequeuing

Module

Queue

Manager

Application

Queue

Enqueuing

Module

Enqueuing

Module

10/31/2013

G53ELC

15

Event Notification


Publish and subscribe


Scalability


Data backbone


Decoupled solution

Event

Manager

Generator

Generator

Generator

Consumer

Consumer

Subscriptions

Event

Action

Event

Action

10/31/2013

G53ELC

16

Distributed Objects


Microsoft DCOM


EJBs in Java
-

now attributed POJOs


Microsoft .NET Components (POCOs)


Python POPOs (See Twisted Library)
Celery objects


NSOPeration (Cocoa)


Web services


Web frameworks (Django, Grails, Rails)

Components


Objects but more “plug and
playable”


Contractually specified

by

interfaces


Can be managed by a container


Dependency Injection pattern


Systems built like a model with
Lego bricks

10/31/2013

G53ELC

18

Component Models

Microsoft

Sun

OMG

Client
-
Oriented

COM: OLE,
OCX, ActiveX

.Net
components

Java Objects

CORBA Object

Server
-
oriented

.Net
components

Microsoft
Transaction
Server (MTS)

Servelets

Enterprise
Java
Beans/J2EE

CORBA
Component
Model

10/31/2013

G53ELC

19

Component Architectures

Component A

Component B

Interface C

Component C1

Component C2

Component C3

Component C4

Are implementations of

Depend upon

Component Execution Environment

10/31/2013

G53ELC

20

Application Servers


Core application
services


Transactions


Persistence


Security


Business component
container


Microsoft included
in O/S e.g.
Transaction Server
(MTS)


Java: GlassFish,
BEA WebLogic,
IBM WebSphere,
iPlanet, JBoss

10/31/2013

G53ELC

21

The is a bit grey now...

Tomcat has many of the features of an application server

Spring can run within an application server, but it also offers
some appServer features

Virtualisation does much of what was previously done by
Application servers e.g. Xen

The cloud can be a huge application container in the sky

Web Services (last week)


Components that interact with one
another
dynamically

and use standard
Internet technologies (wsdl or restful)


Advertise the presence of business
processes, information, or tasks


Simple Object Access Protocol (SOAP) or simple
XML or JSON

10/31/2013

G53ELC

23

Business Process Layer


Translate business flow
to processes, tasks, or
services


Enterprise modelling


Rules for
chaining/interaction of
components


Process modelling,
workflow, simulation

Ÿ



10/31/2013

G53ELC

24

Summary


Design Patterns


Client and Server


Thin or thick?


Middleware and patterns


Synchronous vs. asynchronous


SOA, MOM Transactions


Web services


Application servers and component models


Services and containers


Java Beans; .Net Components and DCOM



ORMs, D.I. and Web Frameworks


Enterprise Architectures


Enterprise application integration