Top Banner
2000 Internet Access Methods, Inc Peer-To-Peer Shared Components Gerry Seidman IAM Consulting [email protected] om http://iamx.co m 212-580-2700
28

(c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting [email protected] 212-580-2700.

Mar 27, 2015

Download

Documents

Tyler McFadden
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 1

Peer-To-Peer Shared Components

Gerry Seidman

IAM [email protected]

http://iamx.com212-580-2700

Page 2: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 2

What are we doing?

Banking/Finance Commerce Design Publishing Consulting Education

Page 3: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 3

What is the problem? Dissemination of information

– Text/images » PDF, HTML

– Reports» CGI

– Interactive » Data Entry / Analysis

Page 4: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 4

Mechanisms of Information Presentation

Asynchronous– User works independently

» Books, reports, Web, applications, videos, tapes

Synchronous– User works with one or more other person

» In Person Classroom Consultant

» Remote Call to Call Center Direct Call to Person Conference Call Video Conference Instant Messaging

Page 5: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 5

Relative Benefits Asynchronous

– Pros» User Paced

– Cons» Onus is on user to find solutions to any problems» No Filter of information

Synchronous– Pros

» Immediate answers

– Cons» Scheduling» All material must be present» Ability to share material» May not be the right person

Page 6: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 6

Application Sharing

Dedicated Communication Channel– Instant Message– Shared White Board

Non-Dedicated Applications– Web– Applications– Presentations

Page 7: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 7

Methods of Application Sharing Remote Web Control

Screen Replication over Sockets– PC-Anywhere

– Java Based

Hand Coded interactivity– A couple of 100K lines of code you can do anything

Dynamic Sharing– Java Magic

URL url = new URL("http://www.iamx.com");AppletContext ac = myApplet.getAppletContext();ac.showDocument(url);

Page 8: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 8

Issues Behind Application Sharing

Difficulty of implementation Extensibility Performance Quality of Feedback The Voice Issue

– None– Telephone– IP Telephony

Page 9: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 9

Development Issues

Location of Partners Data Model Location Permission Security

Page 10: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 10

Digression on Communication Messaging

– Stream based

– Packet Based (UDP)» Inappropriate for shared applications

Connected Sockets– Requires writing a server

– Firewall Restrictions

HTTP– Connectionless

» Batch mode

– Piggyback on existing server

– Little/No Security Restrictions

Page 11: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 11

Direct Sockets in Java Client Side

Server SideServerSocket ss = new ServerSocket(port);for(;;) {

Socket s = ss.accept();InputStream in = s.getInputStream();OutputStream out = s.getOutputStream();// process interaction, probably multithreaded

}

Socket s = new Socket(host, port);InputStream in = s.getInputStream();OutputStream out = s.getOutputStream();// process interaction, possibly multithreaded

Page 12: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 12

HTTP Interaction from Java

URL url = new URL("http://www.iamx.com/findPartner");URLConnection connect = url.openConnection();

connect.setDoOutput(true);connect.setDoInput(true);

OutputStream out = connect.getOutputStream();// send all informationout.close();

InputStream in = connect.getInputStream();// get entire resultin.close();

Page 13: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 13

Location of Partners

Generic Joining– No logic, maintain a list of users

Named Joining– Partner must be known– Partner must be available

Context Joining– User State determines partner

Page 14: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 14

Context Joining Session Based

– Arbitrary amount of metric information» User ID» Location (in application)» State of Application

Matching algorithms– User Based– Current State– Past history

» Server Side State warehousing

Inversion of Call Center– Control of Call Origination

Page 15: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 15

Implementations of Joining Algorithm

HTTP using Servlet/CGI– Piggyback on existing server– Little/No security restrictions

Direct Sockets– Only if no HTTP option is available– You only join once, so performance isn't an

issue

Page 16: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 16

Java Shared Developer Toolkit

Messaging Framework Channel Management Session Management

http://java.sun.com/products/jsdt

Page 17: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 17

Data Model Location

Issue:– Distributed Multithreading– VERY HARD PROBLEM!!

Implementation Options– Multiple Copies of Data Model

» Single Master

» Multi Master

– Single View Data Model Access

Page 18: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 18

Multiple Data Model Copies

Every partner has an identical copy of the data Best solution for document based applications

– i.e., where the model is an independent entity

– Shared Word Processor

Allows for disconnect/reconnect strategies Data model synchronization is application specific

– Multi-User Diff for Word Processor Synching

Page 19: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 19

Replicated Data Models: Single Master Mode

Only one partner can work on model at a time– Control is passed back and forth

All partners can view and notate– glass pane whiteboard, etc.

GUI for obtaining and reporting master mode ownership

Page 20: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 20

Replicated Data Models: Multi-Master

Very hard to implement Requires rollback and user feedback for

lagged transaction clashes Not worth the bother

Page 21: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 21

<< Demo of Shared Editor >>

Page 22: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 22

Single Data Model Access Only one view has actual access to the data Note: Don't confuse single model with single model access

– Two partners with concurrent access to a CORBA/RMI object is NOT single partner access

– Model may be locally accessed by the partner or remote via RMI/CORBA/Sockets

Single master view into the model– Master View into Data

One (or more) Partner (Peer) Views– Views into Master View– GUI to GUI communication

View is on a Sub-Component level feedback – i.e. you see text field typing/selecting

Page 23: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 23

<< Demo of Shared Component >>

Page 24: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 24

Java is Great <Almost>

– You still have to rely on library implementations

Reflection– Dynamically determine object types/structure

Introspection– Dynamically inspect data– Security controlled

» private is still private

– Accessor functions safer

Object Serialization– Copying objects over streams

» Good for Models

» Bad for GUI (Ironically) Swing is not currently Serializable Model would go with GUI through Object Graph

Page 25: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 25

Dynamic Loading and Instantiation

Dynamic Loading of classes

Dynamic Instanciation

Polymorphic UsageComponent c = (Component) x;

Object x = cl.newInstance();

Class cl = Class.forName("iam.talks.Foo");

Page 26: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 26

Java GUI Model

Nested Container/Component Model Traversable GUI tree

Component comp = ...if (comp instanceof Container) {

Container cont = (Container) comp;Component c[] = cont.getComponents();

for(int i=0; i < c.length; i++) {// do something with c[i]

Page 27: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 27

Security and Firewalls User access security is done at location time

– This can be reinforced by passwords and encryption

Firewall restrictions– Outward connections no problem in Browser

– Possibly a problem at the firewall

Solutions– Work behind the firewall

– Open Firewall

– Kluge a port 80 server» Frowned upon but works

– HTTP Tunnelling» You would then need a periodic or manual refresh

Yuck, but it works

Page 28: (c) 2000 Internet Access Methods, Inc1 Peer-To-Peer Shared Components Gerry Seidman IAM Consulting seidman@iamx.com  212-580-2700.

(c) 2000 Internet Access Methods, Inc 28

That’s All Folks

Gerry Seidman

Internet Access [email protected]

212-580-2700

http://www.iam-there.comhttp://www.iamx.com