Stream connectors


Published on

Software Architecture and Design Presentation

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Stream connectors

  1. 1. Group Members: Jayaweera W.J.A.I.U. 100227D Kumarasiri M.K.D.S. 100285C Liyanage K.L.D.U. 100299X Sajeewa G.K.M.C. 100470N Wijewardane M.M.D.T.K. 100612E Stream Connector
  2. 2. What is a Connector?  A software connector provides one or more of four general classes of services: Communication Coordination Conversion Facilitation
  3. 3. What is a Stream?  Streams in a software are used to transfer large amount of data between autonomous processes.
  4. 4. What does the stream connectors do?  Stream connection provides communication services of the system to support transmission of data among components.
  5. 5. What other connector types which can be connected with stream?  Data Access Connectors  To provide composite connectors for performing database and file storage access  Event connectors  To multiplex the delivery of large number of events
  6. 6. Use of Stream Connectors
  7. 7. Examples of Stream Connector Unix Pipes TCP and UDP communication sockets Proprietary Client-Server protocols
  8. 8. Unix Pipes Keyboard Program 1 Program 3 Program 2 stdin Display stderr stdout/stdin stdout/stdin stderr stderr stdout
  9. 9. TCP/UDP Communication Sockets Process X Process Y …. Port N …. TCP …. Port N …. TCP IP IP
  10. 10. Example- Code public class StartGame { Socket gameServerSocket; InputStreamReader inputStreamReader; BufferedReader bufferedReader; PrintWriter printWriter; public void startGame(){ try { gameServerSocket = new Socket("", 6000); System.out.println( gameServerSocket.isConnected()); System.out.println("Connected!!!!!!!!!!!!!"); printWriter=new PrintWriter(gameServerSocket.getOutputStream()); printWriter.print("JOIN#");
  11. 11. Advantages of using Stream Disadvantages of using Stream
  12. 12. Variations of Stream Connector  So many options are available to a software engineer to construct a stream connector.  Stream can be described according to following dimensions, • Cardinality of communication • Format • Synchronicity • Locality • Identity • State • Throughput • Buffering • Bounds • Delivery
  13. 13. Variations of Streams According to Their Dimensions Cardinality – number of parties involve in communication. Format – format of data which is carried in the stream. Synchronicity- whether stream provides synchronicity or not Locality – scope of communication Identity – whether the stream-base connector is named or unnamed
  14. 14. Variations (ctd…) State - whether stream maintains communication state or not Throughput – number of data units transferred in unit time Bounds - whether the stream-base connector is bounded or unbounded Buffering - whether it contains a buffer or not for flow control Delivery - effort it takes to transfer data
  15. 15. Q & A