Project-2 Communication Research ------------------------------------------------------------------------------------------------------------------ 1. Identify the primary programming language used in your application. Since we will be basing the simple social media on a web page, our primary programming language is going to be javascript. More specifically we will be focused on using nodeJS to create a server on odin. Within nodeJS we will also be using socketIO which is a javascript library which will allow us to connect clients on the browser to the nodeJS server that is being hosted on odin. ------------------------------------------------------------------------------------------------------------------ 2. Is your language compiled or interpreted? Scripting languages like Python and PHP are typically interpreted languages but javascript exists somewhere in between an interpreted language and a compiled language. Traditionally, javascript is also believed to be an interpreted language because when the code arrives at the browser an interpreter is used to run the code. As there became more development on javascript and development became more complex, browers have started to implement the use of compilers. For example, the V8 engine ran on Google Chrome which compiles the javascript into native machine code to get better performance. Whether the language is compiled or interpreted is based on which browser is used, what engine the browser is using, and what the programmer is trying to do with their code. ------------------------------------------------------------------------------------------------------------------ 3. Identify the underlying components of communication that will be used in your application. In using socketIO there will be the use of websockets which will allow for bidirectional realtime communication between the server and the clients. The use of websockets will simplify the app as it will only use http on initial setup. This mean we would not have to include unnecessary artifacts like headers and cookies. SocketIO also uses the Pub/Sub store which is a service that allows for asynchronous messaging. It is a sort of middleware to this allows for the communication service to be reliable and available. The server sockets will use http.listen() which takes a port to listen to when clients connect. ------------------------------------------------------------------------------------------------------------------ 4. Waiting... SocketIO has no set waiting function so we would have to create our own wait function for an even listener. The events we could use this wait would be for there to be a wait until there is a new post that needs to be shown to refresh the list of posts. We can also use a wait for a button click of the post buton to display the post on the list of other posts. We also need to wait for the client to disconnect from the server before closing the connection from the sockets. ------------------------------------------------------------------------------------------------------------------