Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #94763

Re: how to

Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'socket': 0.07; 'orm': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'requested.': 0.09; '"global"': 0.16; 'corrupt': 0.16; 'hackers': 0.16; 'query.': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'services)': 0.16; 'socketserver': 0.16; 'sqlalchemy': 0.16; 'app': 0.16; 'frameworks': 0.18; 'suggested': 0.20; 'martin': 0.22; 'object.': 0.22; '(you': 0.23; 'second': 0.24; 'requests': 0.25; 'sort': 0.25; 'header:User-Agent:1': 0.26; '(which': 0.26; 'header:X -Complaints-To:1': 0.26; 'define': 0.27; '(such': 0.27; 'interface': 0.29; 'e.g.': 0.30; 'query': 0.30; 'implement': 0.32; 'anybody': 0.32; 'common': 0.33; 'usually': 0.33; 'open': 0.33; 'server': 0.34; 'behind': 0.35; 'could': 0.35; 'protocol': 0.35; 'tasks': 0.35; 'something': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'possible': 0.36; '(and': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'turn': 0.37; 'client': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'architecture': 0.38; 'someone': 0.38; 'data': 0.39; 'application': 0.39; 'easily': 0.39; 'rather': 0.39; 'build': 0.40; 'to:addr:python.org': 0.40; 'where': 0.40; 'still': 0.40; 'received:de': 0.40; 'some': 0.40; 'your': 0.60; 'provide': 0.61; 'clients': 0.61; 'real': 0.62; 'great': 0.63; 'received:217': 0.66; 'risk': 0.68; 'estate': 0.76
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From dieter <dieter@handshake.de>
Subject Re: how to
Date Thu, 30 Jul 2015 08:23:38 +0200
References <a7cdcd84-0a84-4705-9b8b-366e3d0979c0@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Gmane-NNTP-Posting-Host pd9e0ac16.dip0.t-ipconnect.de
User-Agent Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux)
Cancel-Lock sha1:a9BoPQGgyMVmrhdVPydDOdigFcs=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1087.1438237426.3674.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1438237426 news.xs4all.nl 2896 [2001:888:2000:d::a6]:42168
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4826
X-Received-Body-CRC 3195623836
Path csiph.com!usenet.pasdenom.info!news.stben.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Xref csiph.com comp.lang.python:94763

Show key headers only | View raw


Martin Spasov <suburb4nfilth@gmail.com> writes:
> ...
> i want to build a real estate app .
> ...
> Now i want there to be global database and when a broker updates a property i want to update the database so when a user requests the said property it would be updated.
>
> What i think i could do is write a socketserver and keep the data in the socket server object. then define a protocol and send the data when it is requested.
>
> Or i could use a database like MySQL with ORM like SQLAlchemy and then query the database from the server object. If i do that i would still need to come up with some sort of protocol to know what to query. 

I would go the second way.

You mentioned to have a "global" database. This suggests there is also
something "local". While is is possible to let distributed applications
access a "global" database, this usually is a great security risk
(you database communication endpoints are open to anybody - among
others hackers that may try to steal or corrupt your data).
Therefore, you usually use a client server architecture where the
database is hidden behind a server interface. The clients do not
directly connect to the database but to the server interface which in
turn access the database. Part of the server interface is
authentication (who wants my services) and authorization (which access
should I provide to the authenticated user).
Someone else already suggested to implement a web application for your
project. Web application frameworks (such as e.g. "Django") come with
components to easily (and rather safely) implement the common tasks
of authentication and authorization.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

how to Martin Spasov <suburb4nfilth@gmail.com> - 2015-07-29 11:27 -0700
  Re: how to alister <alister.nospam.ware@ntlworld.com> - 2015-07-29 19:12 +0000
  Re: how to dieter <dieter@handshake.de> - 2015-07-30 08:23 +0200

csiph-web