cjackie / ActivitiesPrediction

Stony Brook University ESE 440/441 project. The implementation is according to journal paper: http://dl.acm.org/citation.cfm?id=2973752
0 stars 1 forks source link

Basic Socket communication from android to server #1

Closed kbumsik closed 7 years ago

kbumsik commented 7 years ago

I firstly added socket communication between phone and server. I will start building RawDB server then.

How to use

On server:

$ python3 backend/comm.py

and then run the app and try sending. If you want to test server without the app, use $ python3 backend/scripts/connection_test.py

cjackie commented 7 years ago

@kbumsik Let me test it before merging.

About the python script. Python 2 and 3 are not much different, but the thing is Python 3 is not backward compatible with Python 2. So, could you use Python 2 whenever possible. I will your script with Python 2 anyway.

Is there any reason you chose Python 3 instead of Python 2?

kbumsik commented 7 years ago

@cjackie oh is your project written in python2? Otherwise requested I use 3 cuz 2 is only looking at the end of life. There will be no update on 2 but only bugfixs. And most of Linux distros already dropping python 2.7 (e.g. Ubuntu as of 16.04 LTS). So I believe we don't need to care about backward compatibility anymore unless there is a cirtical package that is only written in 2. Is there any package only support 2? Anyway I will rewrite it for 2 if you want.

cjackie commented 7 years ago

@kbumsik I see, let's stick with Python 2 for now. I feel like most of people are still using Python 2.

kbumsik commented 7 years ago

@cjackie OK I changed it. You can use this with Python 2 interpreter :)