© 2009 by Eike Stepper; made available under the EPL v1.0 | 06-09-2009 The Net4j Signalling Platform Developing Pluggable Client/Server Applications Eike.

Slides:



Advertisements
Similar presentations
Games, chat, and finance Toward a truly interactive web with Comet, BAM, and HMTP Emil Ong Chief Evangelist.
Advertisements

CS Network Programming CS 3331 Fall CS 3331 Outline Socket programming Remote method invocation (RMI)
1 Working with the Bluetooth radio Nilanjan Banerjee Mobile Systems Programming University of Arkansas Fayetteville, AR
Exceptions Chapter Throwing and Catching Exceptions When a program runs into a problem that it cannot handle, it throws an exception. Exceptions.
Socket Programming ENTERPRISE JAVA. 2 Content  Sockets  Streams  Threads  Readings.
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.
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.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Bluetooth. Bluetooth is an open, wireless protocol for exchanging data between devices over a short distance. –managed by the Bluetooth Special Interest.
Web Proxy Server. Proxy Server Introduction Returns status and error messages. Handles http CGI requests. –For more information about CGI please refer.
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/
Web Security Programming I Building Security in from the Start Except where otherwise noted all portions of this work are Copyright (c) 2007 Google and.
Page AirVantage M2M Cloud Data Push Introduction 1.
© 2008 by Eike Stepper; made available under the EPL v1.0 | Connected Data Objects (CDO) The EMF Model Repository.
The Client-Server Model – part II
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.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae david streader, VUW Echo Networking COMP
Eike Stepper Berlin, Germany Scale, Share and Store your Models with CDO EclipseCon.
Running Servlets JSDK2.1 default.cfg : Web Server configuration information batch files to start and stop server Servlet properties in /webpages/WEB-INF.
1 Java RMI G53ACC Chris Greenhalgh. 2 Contents l Java RMI overview l A Java RMI example –Overview –Walk-through l Implementation notes –Argument passing.
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.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
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.
Eike Stepper ES-Computersysteme Berlin, Germany Net4j Signalling Platform Developing Pluggable Client/Server Applications.
1 ObjectRiver Metadata Compilers Programmatic WebSockets JavaOne 2014 – Steven Lemmo.
Practical Session 11 Multi Client-Server Java NIO.
Part 4: Network Applications Client-server interaction, example applications.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, Responds oriented other.
Mark Dixon 1 11 – Java Servlets. Mark Dixon 2 Session Aims & Objectives Aims –To cover a range of web-application design techniques Objectives, by end.
Getting Started with the Open Services Gateway Initiative (OSGi) CNT 5517 Dr. Sumi Helal, Ph.D. Professor Computer & Information Science & Engineering.
Eike Stepper Berlin, Germany Scale, Share and Store your Models with CDO Eclipse.
Eike Stepper Berlin, Germany CDO Model Repository Where Models Live SAP Modeling.
Prepared by Dr. Jiying Zhao University of Ottawa Canada.
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.
Agenda UCMA 3.0 Highlights Management PowerShell cmdlets to create and manage UCMA trusted applications and endpoints. Autoprovisioning Application.
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.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae david streader, VUW Echo Networking COMP
Randy Dalrymple HillyRoad, LLC
Last Class: Introduction
Threads in Java Two ways to start a thread
Thread Pools (Worker Queues) cs
Thread Pools (Worker Queues) cs
Eike Stepper Berlin, Germany
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.
// Please Setting App_name to Send Successful
Subscription to Multiple Stream Originators
Presentation transcript:

© 2009 by Eike Stepper; made available under the EPL v1.0 | The Net4j Signalling Platform Developing Pluggable Client/Server Applications Eike Stepper Berlin, Germany

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Agenda Requirements Architecture  Buffers  Channels  Connectors  Acceptors  Protocols  Signals Examples FileShare Demo

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Requirements High performance  java.nio.DirectByteBuffer, zero copying Good scalability  java.nio.channels.Selector, single I/O thread possible Multiple transports  Shipped with TCP, HTTP and JVM transports Pluggable protocols  Independent of chosen transport Server-initiated push services (agent paradigm)  Asynchronous and synchronous requests towards the client OSGi™ and stand-alone modes

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Architecture Acceptors OSGi / Eclipse TCP Utils Buffers Channels Connectors Signals Protocols JVM App 1 App 2

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Buffers IBuffer IBufferProvider IBufferPool extends IBufferHandler handles BufferState BufferInputStream BufferOutputStream reads writes

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Channels IChannel IBufferHandler receiveHandler IChannelMultiplexer ChannelInputStream ChannelOutputStream reads writes BufferInputStream BufferOutputStream extends

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Connectors ConnectorState IConnector TCPConnector ConnectorLocation implements IChannel IBufferHandler extends creates JVMConnector IChannelMultiplexer

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Acceptors IAcceptor TCPAcceptor implements IConnector accepts JVMAcceptor TCPConnector JVMConnector creates implements

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Protocols IProtocol IProtocolProvider IBufferHandler extends provides server protocolprovides client protocol IChannel uses

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Signals SignalProtocol Signal IProtocol implements SignalActor SignalReactor Request RequestWithConfirmation Indication IndicationWithResponse creates Thread extends runs in

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Examples public class JMSLogonRequest extends RequestWithConfirmation { private String userName; private String password; public JMSLogonRequest(IChannel channel, String userName, String password) { super(channel); 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(); }

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Examples 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); }

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Examples 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; }

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 Examples // 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 IChannel channel = connector.openChannel(JMSProtocolConstants.PROTOCOL_NAME); try { // Create a logon request and send it through the channel JMSLogonRequest request = new JMSLogonRequest(channel, "stepper", "secret"); boolean ok = request.send(); } catch (Exception ex) { OM.LOG.error("Problem during logon", ex); } finally { channel.close(); }

Developing Pluggable Client/Server Applications with Net4j | © 2009 by Eike Stepper; made available under the EPL v1.0 FileShare Demo