80 likes | 191 Views
AIS Final Project Web2.0 Conference Room. Lixing Pan, Jian Wang, Ming Wang. Functional Framework.
E N D
AIS Final ProjectWeb2.0 Conference Room Lixing Pan, Jian Wang, Ming Wang
Functional Framework • Create web service that facilitates the communication among people as long as they have access to the internet. In contrast, most IM required local client installed. Our implementation is hence much more convenient and accessible. • Private/public conference room with short description • Room member control/list • Message log
Functional Framework (cont.) • To Do • Voting for user-defined poll • File sharing among room members • Scratch board (what you do is what you see) • Multiple owners of single room • Voice • Video • … …
Technical Framework • Cloud Platform: Google AppEngine for Python • Web Server maintained by Google for us • High reliability and scalability • Pay as you go • Explore commercial cloud service • Language: Python2.7, html, JavaScript(Ajax) • Framework: Django-nonrel • Django enables rapid deployment of web application • Django-nonrel is an independent Django branch with NoSQL support for ORM • Database: Google’s High Replication Datastore • High Reliable non-relational database
Features • Rooms: public and private • Users: join rooms, create rooms, delete rooms • In rooms: send message, see history, see member list • Room owners: edit room comment, change privacy, change password, enable or disable room members, delete room
Data Models • Room owner, created(time), roomName, comment, public, password, deleted • Message Room(foreignKey), type, author, message, timestamp • RoomUser rname, uname, talk_permission, inroom
How Ajax works • function sync_messages() { • $.ajax({ • type: 'POST', • data: {id:window.chat_room_id}, • url:'/rooms/sync/', • dataType: 'json', • success: function (json) { • last_received = json.last_message_id; • last_time = json.last_message_time; • } • }); • setTimeout("get_messages()", 1000); • }
How controller works • @login_required • def sync(request): • if request.method != 'POST': • raise Http404 • post = request.POST if not post.get('id', None): • raise Http404 r = Room.objects.get(id=post['id'])