Eike Stepper ES-Computersysteme Berlin, Germany Net4j Signalling Platform Developing Pluggable Client/Server Applications.

Slides:



Advertisements
Similar presentations
CS Network Programming CS 3331 Fall CS 3331 Outline Socket programming Remote method invocation (RMI)
Advertisements

Eike Stepper Berlin, Germany CDO Model Repository 4.1 Release Review.
Multiplexing/Demux. CPSC Transport Layer 3-2 Multiplexing/demultiplexing application transport network link physical P1 application transport network.
1 Chapter 5 Threads 2 Contents  Overview  Benefits  User and Kernel Threads  Multithreading Models  Solaris 2 Threads  Java Threads.
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
System Programming Practical session 11 Multiple clients server Non-Blocking I/O.
Stromchat Extendable, Modable, Multifunction Peer-to-Peer Chat Server/Client.
Client Server Model and Software Design TCP/IP allows a programmer to establish communication between two application and to pass data back and forth.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Web Proxy Server. Proxy Server Introduction Returns status and error messages. Handles http CGI requests. –For more information about CGI please refer.
Chapter 31 File Transfer & Remote File Access (NFS)
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
Practical Session 11 Multi Client-Server Java NIO.
Chapter 2 Architectural Models. Keywords Middleware Interface vs. implementation Client-server models OOP.
Socket Programming -What is it ? -Why bother ?. Basic Interface for programming networks at transport level It is communication end point Used for inter.
CS 352-Socket Programming & Threads Dept. of Computer Science Rutgers University (Thanks,this slides taken from er06/
TCP/IP protocols Communication over Internet is mostly TCP/IP (Transmission Control Protocol over Internet Protocol) TCP/IP "stack" is software which allows.
© 2008 by Eike Stepper; made available under the EPL v1.0 | Connected Data Objects (CDO) The EMF Model Repository.
Eike Stepper Berlin, Germany The CDO Model Repository Perfect for the Enterprise.
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
© 2009 by Eike Stepper; made available under the EPL v1.0 | The Net4j Signalling Platform Developing Pluggable Client/Server Applications Eike.
Online Service 1. Authorization Request (Start URL) 2. Login page 3. Credentials 4. Authorization page 5. User decision 6. Authorization.
Eike Stepper Berlin, Germany Scale, Share and Store your Models with CDO EclipseCon.
 TCP (Transport Control Protocol) is a connection-oriented protocol that provides a reliable flow of data between two computers.  TCP/IP Stack Application.
Running Servlets JSDK2.1 default.cfg : Web Server configuration information batch files to start and stop server Servlet properties in /webpages/WEB-INF.
Practicum: - Client-Server Computing in Java Fundamental Data Structures and Algorithms Margaret Reid-Miller 13 April 2004.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
1 (Worker Queues) cs What is a Thread Pool? A collection of threads that are created once (e.g. when a server starts) That is, no need to create.
Threading Servlets Can handle multiple clients concurrently Shared resources must be synchronized or create a servlet that handles one request at a time.
Li Tak Sing COMPS311F. Case study: consumers and producers A fixed size buffer which can hold at most certain integers. A number of producers which generate.
1 ObjectRiver Metadata Compilers Programmatic WebSockets JavaOne 2014 – Steven Lemmo.
Practical Session 11 Multi Client-Server Java NIO.
Introduction to Server-Side Web Development Introduction to Server-Side Web Development Session II: Introduction to Server-Side Web Development with Servlets.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, Responds oriented other.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
Eike Stepper Berlin, Germany Scale, Share and Store your Models with CDO Eclipse.
Thread A thread represents an independent module of an application that can be concurrently execution With other modules of the application. MULTITHREADING.
Eike Stepper Berlin, Germany CDO Model Repository Where Models Live SAP Modeling.
Eike Stepper ES-Computersysteme Berlin, Germany CDO 2.0 Preview Power to the People Appealing to a Broader Community.
Eike Stepper ES-Computersysteme Berlin, Germany CDO Model Repository A Model Repository for EMF A Framework for.
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
Network Programming: Servers. Agenda l Steps for creating a server Create a ServerSocket object Create a Socket object from ServerSocket Create an input.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
CSC 480 Software Engineering Lab 2 – Multi-Threading Oct 18, 2002.
OOSD Using Java CBTS Framework. 11/2/04CBTS2 Servlet  A servlet is a Java program that can extends Web server’s functionality.  Servlets interact with.
R Some of these slides are from Prof Frank Lin SJSU. r Minor modifications are made. 1.
Randy Dalrymple HillyRoad, LLC
Servlets.
Last Class: Introduction
Threads in Java Two ways to start a thread
Thread Pools (Worker Queues) cs
Thread Pools (Worker Queues) cs
Lecture 22 – April 9, 2002 Subprotocols – static and dynamic.
Eike Stepper Berlin, Germany
Scale, Share and Store your Models with CDO
Client/Server Example
Connected Data Objects (CDO)
Generating the Server Response: HTTP Status Codes
CDO Model Repository Where Models Live
null, true, and false are also reserved.
HTTP/2.
Issues in Client/Server Programming
JavaScript Reserved Words
A Model Repository for EMF A Framework for Distributed Shared Models
Multiplexing/Demux.
Subscription to Multiple Stream Originators
Presentation transcript:

Eike Stepper ES-Computersysteme Berlin, Germany Net4j Signalling Platform Developing Pluggable Client/Server Applications

Agenda 1.Requirements 2.Architecture  Buffers  Channels  Connectors  Acceptors  Protocols  Signals Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v Examples  Request  Indication  SignalProtocol  Client Usage 4.Discussion

Requirements  High performance  java.nio.DirectByteBuffer, zero copying  Good scalability  java.nio.channels.Selector, single I/O thread possible  Multiple physical transports  Shipped with TCP, HTTP and JVM transports  Pluggable application protocols  Independent of chosen transport  Server-initiated push services (agent paradigm)  Asynchronous and synchronous requests from the server  OSGi and stand-alone modes Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.03

Architecture Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.04 Acceptors OSGi / Eclipse TCP Utils Buffers Channels Connectors Signals Protocols JVM App 1 App 2

Buffers Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.05 IBuffer IBufferProvider IBufferPool extends IBufferHandler handles BufferState BufferInputStream BufferOutputStream reads writes

Channels Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.06 IChannel IBufferHandler receiveHandler IChannelMultiplexer ChannelInputStream ChannelOutputStream reads writes BufferInputStream BufferOutputStream extends

Connectors Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.07 ConnectorState IConnector TCPConnector ConnectorLocation implements IChannel IBufferHandler extends creates JVMConnector IChannelMultiplexer

Acceptors Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.08 IAcceptor TCPAcceptor implements IConnector accepts JVMAcceptor TCPConnector JVMConnector creates implements

Protocols Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.09 Protocols IProtocol IProtocolProvider IBufferHandler extends provides server protocolprovides client protocol IChannel uses

Signals Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.010 SignalProtocol Signal IProtocol implements SignalActor SignalReactor Request RequestWithConfirmation Indication IndicationWithResponse creates Thread extends runs in

// Start a TCP acceptor that is configured through extension points IAcceptor acceptor = TCPUtil.getAcceptor(IPluginContainer.INSTANCE, " :2036"); // Open a TCP connection that is configured through extension points IConnector connector = TCPUtil.getConnector(IPluginContainer.INSTANCE, "localhost:2036"); // Open a channel with the JMS protocol JMSClientProtocol protocol = new JMSClientProtocol(infraStructure); IChannel channel = protocol.open(connector); channel.addListener(channelListener); // Create a logon request and send it through the channel JMSLogonRequest request = new JMSLogonRequest(protocol, "user", "pw"); boolean ok = request.send(); Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.011 Client Example

Request Example public class JMSLogonRequest extends RequestWithConfirmation { private String userName; private String password; public JMSLogonRequest(JMSClientProtocol protocol, String userName, String password) { super(protocol); this.userName = userName; this.password = password; protected short getSignalID() { return JMSProtocolConstants.SIGNAL_LOGON; protected void requesting(ExtendedDataOutputStream out) throws IOException { out.writeString(userName); out.writeString(password); protected Boolean confirming(ExtendedDataInputStream in) throws IOException { return in.readBoolean(); } Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.012

public class JMSLogonIndication extends IndicationWithResponse { private boolean protected short getSignalID() { return JMSProtocolConstants.SIGNAL_LOGON; protected void indicating(ExtendedDataInputStream in) throws IOException { String userName = in.readString(); String password = in.readString(); ok = JMSServer.INSTANCE.logon(userName, password); protected void responding(ExtendedDataOutputStream out) throws IOException { out.writeBoolean(ok); } Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.013 Indication Example

public class JMSServerProtocol extends SignalProtocol { public String getType() { return JMSProtocolConstants.PROTOCOL_NAME; protected SignalReactor doCreateSignalReactor(short signalID) { switch (signalID) { case JMSProtocolConstants.SIGNAL_SYNC: return new JMSSyncIndication(); case JMSProtocolConstants.SIGNAL_LOGON: return new JMSLogonIndication(); } return null; } Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.014 SignalProtocol Example

public final class JMSServerProtocolFactory extends ServerProtocolFactory { public static final String TYPE = JMSProtocolConstants.PROTOCOL_NAME; public JMSServerProtocolFactory() { super(TYPE); } public JMSServerProtocol create(String description) { return new JMSServerProtocol(); } Net4j Signalling Platform | © 2008 by Eike Stepper, Berlin, Germany | Made available under the EPL v1.015 ProtocolFactory Example