Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
8
Erster Beitrag:
vor 2 Jahren, 3 Monaten
Letzter Beitrag:
vor 2 Jahren, 3 Monaten
Beteiligte Autoren:
Allard, Aad Gouka, Peter Holemans, Jose Antonio Garrido, Fabrice Harari

connecting to a Hcs on the net

Startbeitrag von Allard am 16.11.2015 09:38

Hi,

I am investigating the possibility to host the db of my applicaion on the net. I am not sure what the do's and don't s are. I have heard some stuff though and I would like some input.

I Have an accounting software. I want the users be abl;e to host the db on my vps. This way their accountant can login to their administration as well. etc

I cannot conect to the db straigt away. for that would expose me to hackers I was told. I would have to use a webservice.

Ok how would that work.
I would have to instal the application server on my vps and run the webservice on that I guess?

Then I would have to sent something to the webservice (username - email adres and pasword mybe even companyname)
Based on that the webservice will check credentials and if succesvull the connection to the db will be made?
With every action on the db I would have to check the credentials I guess?

Same stuff would apply when I wan tto connect a mobile app?

regards
Allard

Antworten:

Hello Allard,

If you are interested, there is an example of that in WXReplication. Principle :
- all packets send/received are encrypted
- in the first packet, you have your id/password/ or any other kind of identifier
- then you receive a token in exchange (random value, like a GUID) for THAT session
- in each successive packet of this conection, you send the token and the packet number
- the webservice has open a sesion (reocrd in a file) for that session and will each time check that packet number is correct for that session
-of course, there is a time out for the session

With that, communication is encrypted, man in the middle cannot be done (packet number), and you can do whatever you need

Best regards

von Fabrice Harari - am 16.11.2015 11:15
Another approach is to use port forwarding through an SSH Tunnel

how to use ssh client:
http://quintagroup.com/services/support/tutorials/mysql-windows

as for how to install ssh server I cannot help, since I found it was already installed... but they are avaiable on windows and linux.

After that you can connect to your HFSQL/CS as if it where on localhost: 127.0.0.1:4900

von Jose Antonio Garrido - am 16.11.2015 12:20
Hi Thanks

I think I have to go with fabrice his way. Since donnot want to use any other software. For the customer there should be anything to do then to connect to the db wether it is local or it is remote.

Do you know anything about performance.? Moast customers will connect to the net with an adsl connection ( fast braodband connection ).

regards
Allard

von Allard - am 16.11.2015 13:34
Hi Allard,

I have several WinDev applications connection to a central HFCS on a VPS somewhere.
There are however some rules of thumb you need to follow:
- The port to connect to the remote HFC needs to be opened on the clients. Not all companies will allow you to do that. In that case you will have to wrap your requests via a web service (http port 80)
- Use an encrypted connection
- Use a compressed connection (Check my framework where in the WXApplication:DBConnect method the performance is first tested of a compressed and an uncompressed connection before determining it).
- It will not work very well (even nearly unusable) if you have tables (grids) in your windows that are directly bound to the dtabase and have a significant number of records (several hundreds). It will cause an immense amount of traffic between the client and the server making your application nearly unusable. I overcome this via an OO approach which you can also find in the published WX Framework on the PCSoft Repository.
- Ideally if you have large records (in terms of number of bytes per record) with potentially binary fields, limit the query definitions to the fields you need and only get BLOBS separately instead of retrieving them via the query.

I'll think of any other tips and will post them here when I think about it.

Cheers,

Peter Holemans

von Peter Holemans - am 16.11.2015 15:43
Hi Allard,

If I'm correct your using HFCS. Why not use a VPS with terminal services like TSPlus. There's only one application to update and HFCS can be used easily with different administrations/maps. Even the accountants can log in. Performance is great. No huge datatransfers over a ADSL connection.

Best regards,

Aad

von Aad Gouka - am 16.11.2015 23:15
Hi Aad,

Well someone on this forum posted a test application ones with tsplus and I found it not verry responding. To slow. Maybe you have better performance. For me that was a showstopper on the tsplus part.

So TSplus works for you?

regards

Allard

von Allard - am 17.11.2015 14:56
Yes for nearly two years. The version they offer now is stable en does the trick for me. I work with several databases (different maps) and it's fast. On the same server there is a webdev
application that uses the same files.It comes with a nice customable portal (HTML5) so you can start your application within your browser.

Best regards,

Aad

von Aad Gouka - am 17.11.2015 16:35
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.