Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #94748 > unrolled thread
| Started by | Martin Spasov <suburb4nfilth@gmail.com> |
|---|---|
| First post | 2015-07-29 11:27 -0700 |
| Last post | 2015-07-30 08:23 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
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
| From | Martin Spasov <suburb4nfilth@gmail.com> |
|---|---|
| Date | 2015-07-29 11:27 -0700 |
| Subject | how to |
| Message-ID | <a7cdcd84-0a84-4705-9b8b-366e3d0979c0@googlegroups.com> |
Hello, i have been learning python for the past year and i did a few projects. Now i want to step up my game a bit and i want to build a real estate app . Its not going to be commercially released, its just for learning. My idea is the following, the app can have 2 types of users - brokers that would be able to add, remove and edit properties and clients that would be able to search and view different properties and send messages that the broker would be able to answer through the app. Its not said that i would do all of that in one go, its just the plan. Until now all my projects used shelve as my database, so everything was in memory and there was no need to share the data between users. For example > User A has his own notes , User B has his own notes and so on. 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. Can you please give me ur 2 cents, i know that i haven't explained myself very clearly and I am sorry about that. Please ask if there is something unclear. Thank you.
[toc] | [next] | [standalone]
| From | alister <alister.nospam.ware@ntlworld.com> |
|---|---|
| Date | 2015-07-29 19:12 +0000 |
| Message-ID | <mpb8jq$26h$1@speranza.aioe.org> |
| In reply to | #94748 |
On Wed, 29 Jul 2015 11:27:48 -0700, Martin Spasov wrote: > Hello, > > i have been learning python for the past year and i did a few projects. > Now i want to step up my game a bit and i want to build a real estate > app . Its not going to be commercially released, its just for learning. > My idea is the following, the app can have 2 types of users - brokers > that would be able to add, remove and edit properties and clients that > would be able to search and view different properties and send messages > that the broker would be able to answer through the app. Its not said > that i would do all of that in one go, its just the plan. Until now all > my projects used shelve as my database, so everything was in memory and > there was no need to share the data between users. > > For example > User A has his own notes , User B has his own notes and so > on. > > 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. > > Can you please give me ur 2 cents, i know that i haven't explained > myself very clearly and I am sorry about that. Please ask if there is > something unclear. > > Thank you. Personally i would suggest this would be best served a a web app, then the DB can reside on the server & no transfer protocol would be req. the app could still be written in python using the WSGI interface. -- Saint: A dead sinner revised and edited. -- Ambrose Bierce
[toc] | [prev] | [next] | [standalone]
| From | dieter <dieter@handshake.de> |
|---|---|
| Date | 2015-07-30 08:23 +0200 |
| Message-ID | <mailman.1087.1438237426.3674.python-list@python.org> |
| In reply to | #94748 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web