+ All Categories
Home > Documents > 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All...

1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All...

Date post: 02-Jan-2016
Category:
Upload: job-mitchell
View: 214 times
Download: 0 times
Share this document with a friend
46
1 Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public Introduction to Etch Scott Comer Technical Leader [email protected]
Transcript
Page 1: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

1Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Introduction to Etch

Scott Comer

Technical Leader

[email protected]

Page 2: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

2Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Welcome

Introduction to Etch

– what it is

– how to use it to build a network service

– where it is going

Page 3: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

3Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

What is a network service?

Messages and formats

Action: query or control; Event

Definitions / abstractions / rules

Players / authorization / transports

Page 4: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

4Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

What is Etch?

Network service description language

Compiler

Runtime

Page 5: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

5Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Why Etch?

Language independence

Transport independence

Small and quick – high performance

Symmetric

Page 6: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

6Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Relationship to Cisco Unified Application Environment

Application environment is a federation of services

Formalized APIs

Programmable and extensible

Enhances the Developer Experience

Page 7: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

7Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Demos

Hello World

Page 8: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

8Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Hello World Example Overview

Client Server

Etch Etch

Page 9: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

9Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Hello World C# Demo

Create etch interface

Generate server and client code

Implement the hello message in the server

Call the hello message from the client

Build the server and client

Run the server and client

Page 10: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

10Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Sequence Diagram

Client Listener Server

Listen

Page 11: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

11Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Sequence Diagram

Client Listener Server

Connect

Listen

Page 12: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

12Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Sequence Diagram

Client Listener Server

Create ServerSession

Connect

Listen

Page 13: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

13Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Sequence Diagram

Client Listener Server

Create ServerSession

Connect

Listen

Sends HelloTo Server

Page 14: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

14Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Sequence Diagram

Client Listener Server

Create ServerSession

Disconnect

Connect

Listen

Sends HelloTo Server

Page 15: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

15Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary Hello World C# Demo

Etch generated most of code.

Generated code does all of the plumbing.

Developer only needs to be concerned with implementing and using the interfaces.

Less than 5 minutes to build a simple client / server application.

Page 16: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

16Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Hello World Java Demo

Show using Etch in Eclipse

Start with existing demo

Add client callback

Page 17: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

17Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary Hello World Demo

Java has similar experience to C#

Message sending looks just like procedure calls

Generated codes may be easily integrated

Page 18: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

18Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Language

Page 19: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

19Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Language

Messagesint add( int x, int y )

Native typesboolean, byte, short, int, long, float, double, string, object, List, Map, Set, arrays of those things

Structured data typesstruct Point( double x, double y, double z )

External data types@Extern( java, “com.company.User”, … )

extern User

Page 20: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

20Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Language, part 2

Constantsconst int ZERO = 0

Enumerationsenum PrimaryColor ( RED, GREEN, BLUE )

Exceptionsexception LoginFailed( int code, string msg )

Page 21: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

21Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Language, part 3

Attributes@Direction( which ) – server, client, both

@Oneway

@Timeout( millis )

@Authorize( method, args … )

Page 22: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

22Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Language, part 4

Formal Comments

/** * Adds two numbers together. * @param x the first number. * @param y the second number. * @return the sum of the arguments. */int add( int x, int y )

Page 23: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

23Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Language, part 5

Mixins

service Foo{

mixin Barmixin Baz

}

Page 24: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

24Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Language Example

module com.acme

service GeoFun{

const double DEFAULT_HOW_FAR = 10 // miles

const int DEFAULT_NUM_LANDMARKS = 20

struct Point( double latitude, double longitude )

struct Landmark( Point where, string description )

void addLandmark( Landmark landmark )

void removeLandmark( Landmark landmark )

Landmark[] searchLandmarks( Point where, double how_far, int count )

}

Page 25: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

25Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Nitty Gritty Details

Compiler, architecture

Page 26: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

26Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Compiler

Written in Java (runs anywhere)

Uses Templates (easier to port)

Bindings (java, csharp, …)

Page 27: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

27Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Process

Etch Source EtchCompiler

Interface

StubRemote

ValueFactory

Helper

Base

Main Impl

Page 28: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

28Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Inheritance

Interface

Remote Base

Impl

Page 29: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

29Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Architecture

Stub

Remote

Transport

Impl

Main

Stub

Remote

Transport

Impl

Main

Page 30: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

30Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Architecture

Stub

Remote

Transport

Impl

Main

Stub

Remote

Transport

Impl

Main

Page 31: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

31Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Architecture

Stub

Remote

Transport

Impl

Main

Stub

Remote

Transport

Impl

Main

Page 32: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

32Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Architecture

Stub

Remote

Transport

Impl

Main

Stub

Remote

Transport

Impl

Main

Page 33: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

33Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch Architecture

Stub

Remote

Transport

Impl

Main

Stub

Remote

Transport

Impl

Main

Page 34: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

34Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Runtime

Message model

Compiler support

Transport

Utilities

Page 35: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

35Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Message Model

Representation (type, fields & values)

Meta data

Generated code is transport independent

Page 36: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

36Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport

URI specification

Manages session

Moves messages

Message format is generic or transport specific(binary, xml, soap, …)

Page 37: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

37Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport, part 2

Transport services and propertiesAuthentication, session, logging, rate control, filtering

ProtocolsNow: TCP, TLS

Planned: JSON, UDP, AES, SOAP

ExtensibleJMS, REST, …

Page 38: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

38Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Transport, part 3

ValueFactory

StubRemote

Messagizer

Mailbox Manager

Packetizer

Stream

Security

Filter Chainauth

log

session

keep alive

Page 39: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

39Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

More Demos

Distributed Map

Page 40: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

40Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Distributed Map Demo

Provides access to a shared Map

Add notification when values change

Example of session management

Page 41: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

41Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Roadmap

JSON, Python, C, Ruby bindings

More transports and transport modes

Web Services Gateway

Better Integration with IDEs, Maven

Page 42: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

42Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Etch will be Open Source!!!is

Page 43: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

43Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Where from here?

Distribution:

http://developer.cisco.com/web/cuae/etch

Source

https://etchproj.svn.sourceforge.net

Page 44: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

44Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Summary

Etch is a powerful tool that formalizes APIs used to access and extend Cisco Unified Application Environment

Etch automates many tedious and distracting tasks

Etch may be used in your own projects, and embedded in your own systems.

Page 45: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

45Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public

Q and A

Page 46: 1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.

46Cisco Unified Application Environment Developers Conference 2008 © 2008 Cisco Systems, Inc. All rights reserved. Cisco Public


Recommended