เนื่องจากช่วงนี้ ห่างหายจาก SIP & IMS พอสมควร เพราะมัวไปทำ Graph traversal กับ JXTA P2P อยู่นิดหน่อย ขอเอา code มา ฝากไว้ที่นี้ก่อนกันลืมครับ
- Graph Traversal (BFS & DFS) and Dijkstra Shortest Path
Graph Traversal (BFS & DFS) and Dijkstra Shortest Path (Original from CodeProject.com http://www.codeproject.com/KB/java/BFSDFS.aspx)
Download: http://gotoknow.org/file/wwarodom/GraphTraversal-ShortestPath.zip
- Read NS2 topology file
NS2 topology files can be generated by several topology generators (e.g., GT-ITM, BRITE, Tiers, I-net 3.0). I created this program for reading a NS2 topology file and put them (node connection) in edge variables (graph data structure) for creating a graph.
Download: http://gotoknow.org/file/wwarodom/ReadNS2-Topology.zip
- Jxta Multicast (JXTA 2.5)
Jxta Multicast, there are 2 projects:
#1) To demonstrate how to send simple message between client and server using Jxta network (Original from https://jxta.dev.java.net/ )
#2) I created simple chat GUI using multicast via Jxta network. Server can send back an unicast message to a lastest client who is communicated with the server.
To compile:
C:\JxtaMulticastChat> javac -classpath ../lib
/jxta.jar;../lib/bcprov-jdk14.jar pleX/*.java
To run:
C:\JxtaMulticastChat>java -classpath ../lib/jxta.jar;../lib/bcprov-jdk14.jar;. pleX.JxtaMulticastChat
To test:
- Run program -> Setup -> Start Server
- Run another instance (client) -> Setup -> Start Client (You can run at the same or different machine)
- Start to chat between them (press Ctrl + Enter to send a message).
- You can start many clients and run as clients to see how messages are propagated via the multicast socket but you can run only one server.
- At Server mode, you can choose "Send mode" menu that uses to reply back to an only lastest communicated client (for unicast mode) or reply to all connected clients (for broadcast).
any question, feel free to leave me a comment. :-)
ไม่มีความเห็น