AJP Report Msbte 5th Sem
AJP Report Msbte 5th Sem
Certificate
This is to certify that Mr. Ansari Saeed Roll no. 220408 of
fourth semester of Diploma in Computer Engineering of
institute M.H. Saboo Siddik Polytechnic(code:0002) has
completed microproject satisfactorily in the subject: AJP
(22517) for the academic year 2024-25 as prescribed in the
curriculum.
SEAL OF
INSTITUDE
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to certify that Mr. Fawwaz Shaikh Roll no. 220413
of fourth semester of Diploma in Computer Engineering of
institute M.H. Saboo Siddik Polytechnic(code:0002) has
completed microproject satisfactorily in the subject: AJP
(22517) for the academic year 2024-25 as prescribed in the
curriculum.
SEAL OF
INSTITUDE
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to certify that Mr. Aman Khan Roll no. 220419 of
fourth semester of Diploma in Computer Engineering of
institute M.H. Saboo Siddik Polytechnic(code:0002) has
completed microproject satisfactorily in the subject: AJP
(22517) for the academic year 2024-25 as prescribed in the
curriculum.
SEAL OF
INSTITUDE
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to certify that Mr. Ganesh Jaiswar Roll no. 220416
of fourth semester of Diploma in Computer Engineering of
institute M.H. Saboo Siddik Polytechnic(code:0002) has
completed microproject satisfactorily in the subject: AJP
(22517) for the academic year 2024-25 as prescribed in the
curriculum.
SEAL OF
INSTITUDE
Acknowledgment
We wish to express our profound gratitude to our guide Prof. GHAZALA KHAN
who guided us endlessly in the framing and completion of the micro project. He
guided us on all the main points in that micro project. We are indebted to his/her
constant encouragement, cooperation, and help. It was his/her enthusiastic
support that helped us in overcoming various obstacles in the micro-project.
We are also thankful to our Principal, HOD, faculty members and classmates of
COMPUTER ENGINEERING department for extending their support and motivation
in the completion of this micro-project.
I. Aims/Benefits of microproject
A Java Talk Tuah microproject provides hands-on experience with real-time text
communication, focusing on networking, multithreading, and client-server architecture.
It teaches managing simultaneous connections, secure data transmission, and real-time
responsiveness. Key benefits include mastering Java's Socket programming, TCP/IP
protocols, concurrency with threads, and UI design, while enhancing skills in secure,
scalable software development.
1. To search the information about the project. (Collect relevant data from different
sources (books/internet/market/suppliers/experts and others through
surveys/interviews etc.).
2. To collect all relevant content / materials to complete the project.
3. To prepare the report of micro project.
4. To deliver presentation/ appear for viva-voice
V. Resources required
Name of
Sr. no. Specifications Qty Remarks
resources
Learning resources and
1. Online 3 sites
various websites
Microsoft word, Tools with
2. Desktop 1 for each
internet facility.
Names of Team Members with Roll Nos.
Approved by:
Sign of Faculty:
Name of faculty: PROF. GHAZALA KHAN
Annexure-II
Microproject Report
Title of Micro-project: Talk Tuah
I. Rationale
The rationale for developing a Talk Tuah in a Java microproject is to provide practical
experience in building a real-time communication system, which is vital in modern
networking and distributed applications. It allows learners to apply key Java concepts
such as socket programming, multithreading, and client-server architecture in a hands-
on manner, simulating real-world scenarios where multiple users exchange data
concurrently. This project strengthens the understanding of managing network
connections, data synchronization, and handling errors while also introducing
essential security concepts. Ultimately, it equips developers with the skills to build
scalable, efficient systems and prepares them for more advanced, real-world
software development.
Talk Tuah in Java highlights key areas such as socket programming for client-server
communication using TCP/IP protocols, and multithreading for handling multiple
client connections simultaneously. Research emphasizes the importance of client-
server architecture for scalable distributed systems and explores the role of UI design
through tools like Swing and JavaFX. Security studies focus on encryption techniques
such as SSL/TLS for secure communication, while data transmission efficiency is
improved using data serialization methods. These studies provide foundational
knowledge for building efficient and secure chat systems.
V. Actual Methodology Followed
We were assigned with the microproject topic and time was assigned to us to complete
the project in 11 weeks. All team members worked together in these 11 weeks together
in order to complete this microproject. Data was collected according to our topic.
Presentation was prepared and finally at last technical report was prepared.
Name of
Sr. no. Specifications Qty Remarks
resources
1. Software MS-Word 1 for each
www.geeksforgeeks.com,
2. Websites www.tutorialspoint.com, 1 for each
CODE :
username: '',
receivername: '',
connected: false,
message: ''
});
useEffect(() => {
console.log(userData);
}, [userData]);
const connect =()=>{
stompClient = over(Sock);
stompClient.connect({},onConnected, onError);
setUserData({...userData,"connected": true});
stompClient.subscribe('/chatroom/public', onMessageReceived);
stompClient.subscribe('/user/'+userData.username+'/private', onPrivateMessage);
userJoin();
const userJoin=()=>{
var chatMessage = {
senderName: userData.username,
status:"JOIN"
};
switch(payloadData.status){
case "JOIN":
if(!privateChats.get(payloadData.senderName)){
privateChats.set(payloadData.senderName,[]);
setPrivateChats(new Map(privateChats));
break;
case "MESSAGE":
publicChats.push(payloadData);
setPublicChats([...publicChats]);
break;
console.log(payload);
if(privateChats.get(payloadData.senderName)){
privateChats.get(payloadData.senderName).push(payloadData);
setPrivateChats(new Map(privateChats));
}else{
list.push(payloadData);
privateChats.set(payloadData.senderName,list);
setPrivateChats(new Map(privateChats));
console.log(err);
const {value}=event.target;
setUserData({...userData,"message": value});
const sendValue=()=>{
if (stompClient) {
var chatMessage = {
senderName: userData.username,
message: userData.message,
status:"MESSAGE"
};
console.log(chatMessage);
setUserData({...userData,"message": ""});
const sendPrivateValue=()=>{
if (stompClient) {
var chatMessage = {
senderName: userData.username,
receiverName:tab,
message: userData.message,
status:"MESSAGE"
};
privateChats.get(tab).push(chatMessage);
setPrivateChats(new Map(privateChats));
setUserData({...userData,"message": ""});
const handleUsername=(event)=>{
const {value}=event.target;
setUserData({...userData,"username": value});
const registerUser=()=>{
connect();
return (
<div className="container">
{userData.connected?
<div className="chat-box">
<div className="member-list">
<ul>
{[...privateChats.keys()].map((name,index)=>(
))}
</ul>
</div>
<ul className="chat-messages">
{publicChats.map((chat,index)=>(
<div className="message-data">{chat.message}</div>
</li>
))}
</ul>
<div className="send-message">
</div>
</div>}
<ul className="chat-messages">
{[...privateChats.get(tab)].map((chat,index)=>(
<div className="message-data">{chat.message}</div>
</li>
))}
</ul>
<div className="send-message">
</div>
</div>}
</div>
<div className="register">
<input
id="user-name"
name="userName"
value={userData.username}
onChange={handleUsername}
margin="normal"
/>
connect
</button>
</div>}
</div>
}
• ABOVE IS APP JS :
return (
<ChatRoom />
body {
margin: 0;
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
code {
monospace;
input {
padding: 10px;
font-size: 1.2em;
button{
border: none;
padding: 10px;
background: green;
color:#fff;
font-size: 1.2em;
font-weight: bold;
.container{
position: relative;
.register{
position: fixed;
padding:30px;
box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.034),0 6.7px 5.3px rgba(0, 0, 0, 0.048),0 12.5px 10px
rgba(0, 0, 0, 0.06),0 22.3px 17.9px rgba(0, 0, 0, 0.072),0 41.8px 33.4px rgba(0, 0, 0, 0.086),0 100px
80px rgba(0, 0, 0, 0.12);
top:35%;
left:32%;
display: flex;
flex-direction: row;
.chat-box{
box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.034),0 6.7px 5.3px rgba(0, 0, 0, 0.048),0 12.5px 10px
rgba(0, 0, 0, 0.06),0 22.3px 17.9px rgba(0, 0, 0, 0.072),0 41.8px 33.4px rgba(0, 0, 0, 0.086),0 100px
80px rgba(0, 0, 0, 0.12);
margin:40px 50px;
height: 600px;
padding: 10px;
display: flex;
flex-direction: row;
}
.member-list{
width: 20%;
.chat-content{
width:80%;
margin-left: 10px;
.chat-messages{
height: 80%;
.send-message{
width: 100%;
display: flex;
flex-direction: row;
.input-message{
width:90%;
border-radius: 50px;
ul {
padding: 0;
list-style-type: none;
.send-button{
width:10%;
border-radius: 50px;
margin-left: 5px;
cursor: pointer;
}
.member{
padding: 10px;
background: #eee;
border:#000;
cursor: pointer;
.member.active{
background: blueviolet;
color:#fff;
.member:hover{
background: grey;
color:#fff;
.avatar{
background-color: cornflowerblue;
border-radius: 5px;
color:#fff;
.avatar.self{
color:#000;
background-color: greenyellow;
.message{
padding:5px;
width: auto;
display: flex;
flex-direction: row;
.message-data{
padding:5px;
.message.self{
justify-content: end;
• CONFIQ JAVA :
package com.involveininnovation.chat.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/ws").setAllowedOriginPatterns("*").withSockJS();
}
@Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
registry.setApplicationDestinationPrefixes("/app");
registry.enableSimpleBroker("/chatroom","/user");
registry.setUserDestinationPrefix("/user");
}
}
• CONTROLLER :
package com.involveininnovation.chat.controller;
import com.involveininnovation.chat.model.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.stereotype.Controller;
@Controller
public class ChatController {
@Autowired
private SimpMessagingTemplate simpMessagingTemplate;
@MessageMapping("/message")
@SendTo("/chatroom/public")
public Message receiveMessage(@Payload Message message){
return message;
}
@MessageMapping("/private-message")
public Message recMessage(@Payload Message message){
simpMessagingTemplate.convertAndSendToUser(message.getReceiverName(),"/private",message);
System.out.println(message.toString());
return message;
}
}
• MESSAGE :
package com.involveininnovation.chat.model;
import lombok.*;
import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
@ToString
public class Message {
private String senderName;
private String receiverName;
private String message;
private String date;
private Status status;
}
• STATUS :
package com.involveininnovation.chat.model;
package com.involveininnovation.chat;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ChatApplication {
package com.involveininnovation.chat;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ChatApplicationTests {
@Test
void contextLoads() {
}
}
OUTPUT :
CONCLUSION
- DATA COLLECTION - Collect relevant data from different sources (books/the internet/the
market/suppliers/experts and others through surveys/interviews)
- COLLABORATIVE TOOLS: It can be integrated into collaborative tools for remote teams,
allowing instant communication alongside project management and file sharing.
- CUSTOMER SUPPORT SYSTEMS : Provides a basis for live chat systems used in e-
commerce or service websites where customers can get assistance in real-time.
Micro Project Evaluation Sheet