What is a context for client server model?

All we need is an easy explanation of the problem, so here it is.

I am working on a C++ program running on linux machine. I am new to client server architecture. I recently get to know that the program I’m working on use something called context, so that the client can set the various configuration like access-mode etc to communicate with the server accordingly.

I want to know if it is something that is specific to my program or it is the same concept anywhere? And is it called context as a general term or it has some other common names? Any guide in the right direction will be helpful.

Update:
I can feel that it is too broad of a concept to answer. I am particularly curious about where this concept fits in the client-server architecture?

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

Many protocols use a context which is changed with the commands sent by the client. If you program a FTP, POP, or IMAP server, the context will contains wether the user is successful logged, and who is he. Then, the command which ask a list of files or a list of emails can either return a list depending of who is logged or reject this command.

If you implement the server with a multithread program, each thread will have an object given as a parameter which contains the context each thread will read and update. If you program the server with a multi process program (like Apache), a set of global variables (different between each process) can contain the context.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply