Apache Mina Dima Ionut Daniel. Contents What is Apache Mina? Why Apache Mina? Mina Architecture Mina Core Mina Advanced JMX Support Spring Integration.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

Categories of I/O Devices
MIT Lincoln Laboratory A Service-Oriented Approach to Application Development Robert Darneille & Gary Schorer WPI MQP Presentations ICS Group 10 October.
CCNA – Network Fundamentals
Network Programming Chapter 11 Lecture 6. Networks.
Socket Programming.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
1 Java Networking – Part I CS , Spring 2008/9.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
VoIP on a Wireless LAN Orly Goren Tomer Shiran Lior Nir.
Server Architecture Models Operating Systems Hebrew University Spring 2004.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
CSE451 Section 6: Spring 2006 Web server & preemption.
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital.
1 Java Server Programming zLecture 1 focuses on: yIntroduction to web services y Web Services using Axis y The bigger Picture: Introduction to J2EE y Java.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
Network Architecture and Protocol Concepts. Network Architectures (1) The network provides one or more communication services to applications –A service.
Socket Programming -What is it ? -Why bother ?. Basic Interface for programming networks at transport level It is communication end point Used for inter.
Presentation on Osi & TCP/IP MODEL
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
Jaringan Komputer Dasar OSI Transport Layer Aurelio Rahmadian.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
Introduction to MINA Trustin Lee
Integration Broker PeopleTools Integration Broker Steps –Introduction & terminologies –Application Server PUB/SUB services (Application Server)
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
1 Version 3.0 Module 11 TCP Application and Transport.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Introduction to MINA A M ultipurpose I nfrastructure for N etwork A pplications April 2005, Trustin Lee, ASF.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
Web Services Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Concrete Architecture of Mozilla Firefox (version ) Iris Lai Jared Haines John,Chun-Hung,Chiu Josh Fairhead July 06, 2007.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
E81 CSE 532S: Advanced Multi-Paradigm Software Development Venkita Subramonian, Christopher Gill, Ying Huang, Marc Sentany Department of Computer Science.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 2, 3: Communication 1/30/20161Distributed Systems - COMP 655.
© 2008 by Wind River; made available under the EPL v1.0 | 19-Nov-2008 TCF The Target Communication Framework Michael Scharf, Wind River wiki.eclipse.org/DSDP/TM/TCF_FAQ.
LECTURE 11 Networking Part 2. NETWORKING IN PYTHON At this point, we know how to write a simple TCP client and simple TCP server using Python’s raw sockets.
Jetty 9 Dima Ionut Daniel. Contents What is Jetty? History Jetty 9 new features Jetty Configuration Deployment Arhitecture JMX SPDY Handlers WebSocket.
Introduction to MINA Trustin Lee NHN Corporation
Java Networking I IS Outline  Quiz #3  Network architecture  Protocols  Sockets  Server Sockets  Multi-threaded Servers.
Google Code Libraries Dima Ionut Daniel. Contents What is Google Code? LDAPBeans Object-ldap-mapping Ldap-ODM Bug4j jOOR Rapa jongo Conclusion Bibliography.
Apache Solr Dima Ionut Daniel. Contents What is Apache Solr? Architecture Features Core Solr Concepts Configuration Conclusions Bibliography.
COMPUTER NETWORKS Hwajung Lee. Image Source:
SPL/2010 Reactor Design Pattern 1. SPL/2010 Overview ● blocking sockets - impact on server scalability. ● non-blocking IO in Java - java.niopackage ●
OE-NIK HP Advanced Programming Web services Standards and protocols Using web services Using web services with asynchronous calls.
Last Class: Introduction
Netscape Application Server
.NET Remoting Priyanka Bharatula.
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
MCA – 405 Elective –I (A) Java Programming & Technology
Trustin Lee Introduction to MINA Trustin Lee
Grizzly 2.0 Initial propose overview
Processes The most important processes used in Web-based systems and their internal organization.
#01 Client/Server Computing
High-performance network applications
IS 4506 Server Configuration (HTTP Server)
An XML-based System Architecture for IXA/IA Intercommunication
Exceptions and networking
#01 Client/Server Computing
The reactor design pattern
Thread per client and Java NIO
Presentation transcript:

Apache Mina Dima Ionut Daniel

Contents What is Apache Mina? Why Apache Mina? Mina Architecture Mina Core Mina Advanced JMX Support Spring Integration Who uses Mina? Conclusions Bibliography

What is Apache Mina? Apache MINA is a network application framework. MINA stands for Multipurpose Infrastructure Networked Applications. It helps users develop high performance and high scalability network applications easily. It provides an abstract event-driven asynchronous API over various transports such as TCP/IP and UDP/IP via Java NIO.

Why Apache Mina? The big difference between BIO (Blocking IO) and NIO (Non-Blocking IO) is that in BIO, you send a request, and you wait until you get the response. On the server side, it means one thread wil be associated with any incoming connection, so you won't have to deal with the complexity of multiplexing the connections. In NIO we to have to deal with the synchronous nature of a non-blocking system, wich means that your application will be invoked when some events occur. Mina provides a common IO layer to an application that needs to communicate over TCP, UDP. MINA makes the focus on the two parts that are important for the application: the applicative code and the application protocol encoding/decoding.

Mina Architecture MINA is the glue between your application (be it a client or a server) and the underlying network layer, which can be based on TCP, UDP. We just have to design your application on top of MINA without having to handle all the complexity of the newtwork layer.

Mina Architecture (cont.) MINA based applications are divided into 3 layers – I/O Service - Performs actual I/O – I/O Filter Chain - Filters/Transforms bytes into desired Data Structures and vice-versa – I/O Handler - Here resides the actual business logic

Mina Core The IoAcceptor object is used for listening for incoming connections. Filters needs to be added to the configuration. A handler needs to be configured for the configuration. Also session parameters configuration can be customized before starting the network service.

Mina Core (cont.) The implementation of the IoHandlerAdapter defines certain situtations like: exceptions, receiving of the messages, session is idle.

Mina Core (cont.) IoService is the base class supporting all the IO services, either from the server side or the client side. It will handle all the interaction with your application, and with the remote peer, send and receive messages, manage sessions, conections. IoFilter filters all I/O events and requests between IoService and IoHandler.. Custom IoFilters: LoggingFilters, ProtocolCodecFilter, SSLFilter, CompressionFilter, BlacklistFilter, KeepAliveFilter,etc. The IoHandler handles all I/O events fired by MINA. IoHandler methods: sessionCreated, sessionOpened, sessionClosed, sessionIdle, exceptionCaught, messageReceived, messageSent.

Mina Advanced The IoBuffer represents a byte buffer used by Mina applications. MINA does not use NIO ByteBuffer directly for two reasons: – It doesn't provide useful getters and putters such as fill, get/putString, and get/putAsciiInt(). – It is difficult to write variable-length data due to its fixed capacity To allocate IoBuffer, we need to use one of the two allocate() methods. The default buffer allocation is handled by SimpleBufferAllocator.

Mina Advanced (cont.) The ProtocolCodecFactory class has useful methods like getEncoder, getDecoder that returns Encoder and Decoder custom implementations. The ExecutorFilter class is used to spread the incoming events to a pool of threads. This will allow an application to use more effeciency the processors if some task is CPU intensive. Apache Mina uses SLF4J(Simple Logging Facade for Java) as logging.

JMX Support JMX is used for managing and monitoring java applications. JMX enables MINA applications to perform the following: – Create/get MBean server. – Instantiate desired MBeans(IoAcceptor, IoFilter). – Register MBeans with MBean server. Example: IoServiceMBean mBean = new IoServiceMBean(acceptor);

Spring Integration Spring is a powerfull IoC(Inversion of Control) framework. XML Spring file configuration can be used to create MINA applications.

Who uses Mina? Apache Mina is used by frameworks like: Apache Directory Project: LDAPv3, ChangePW, Kerberos, DNS, NTP, DHCP. Xfire + AsyncWeb (SOAP over HTTP) AMQP(Advanced Message Queuing Protocol) QuickFIX/J (Financial Information eXchange) RED5 Server (Macromedia Flash Media RTMP). ObjectRADIUS FreeCast (P2P media streaming) Jstyx (NFS-like file sharing protocol) Projects like: XMPP, SMS + MMS Gateways

Conclusions We can create client and server scalable applications using Apache MINA. Apache MINA is documented and easy to use. Apache MINA can be integrated with Spring, PicoContainer.

Bibliography