PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Advice needed
Advice needed
Débuté par StefanK., 13 nov. 2016 16:36 - 11 réponses
Posté le 13 novembre 2016 - 16:36
Hi Forum,

I have following problem, where I need some advice, what would be the best way:

I am developing a new application, which has 2 parts:

1. Part: A normal Windev Client Server application, using HF CS, may be at a later stage I will switch to MSSQL Server.

The Software does order processing, there will be about 250 orders per day, 80% will be manually entered by the customer.

2. Part: A web portal, which shows the order status and some order related documents as PDF, and some customers can enter there orders (this will be about 20%)

My question now: Should I use one database for the In House app and the web app (means: I host the database on a rented web Server, and the in house Clients connect thru port 4900 over Internet, or shall I install a web Server In House and host the database and the web Server in house) or should I use 2 separate databases and replicate them.

How do you solve that?

Best Regards


Stefan.
Posté le 13 novembre 2016 - 21:29
Hi,

Do they have a good internet connection?

If so I would go on hosting it all inhouse. and use 1 db. Because this is the easyest way to go.

You could also go with replication. But As I see it that would bring quite some things with it that are might not be easy. Do the order numbers have to come after each other? or can you use a web order numer and a ofiline order numer? In thesecond case you donnot have to check on the other db if a number is already in use etc.

I would not go with connecting to the db over the internet. That is not verry save in my opinion.You could make the windev app connet to a webservice an let that webservice on the app server do the db read write ( more save )

regards
Allard
Posté le 13 novembre 2016 - 22:16
Hello Stefan

Replication - using Fabrice's replication engine software has many advantages:

The replication software is done and works very well so no need to re-invent. There are three versions, one to run in Windev on your inhouse server, another for Android and another for IOS.
The inhouse data stays where it is. The replication engine moves the only the data required for the portal to a web server running Webdev and has a portal web site to display the data.
Totally secure because the portal users never come anywhere near the actual data.
The performance for inhouse clients remains fast.
You will be well setup for an eventual future where orders are taken remotely by phone or tablet. In that case the remote device transmits to the web server using a version of the replication engine running on the phone. The replication engine running on the inhouse server will pull in the remote order data. If the data needs transforming for the portal to use you would then process the data and the replication engine will send the data out to the web server for the portal web site to use.

I speak from experience because we are doing exactly this now.

Regards
Al
Posté le 14 novembre 2016 - 11:43
Hi,

you need tell us more
1. number of client will connect . for in-house and for web
2. size of data grow (est daily grow size) . for in-house and for web . this effect bandwidth
3. is this going to be 24/7 usage
4. from your post , my guess you going build windows application and web application . why not just web application
5. do your customer has IT staff to maintenance the server ?
Posté le 14 novembre 2016 - 17:32
Hi all,

thanks for our reply.

Regarding the questions:

@ccc2
There will be about 5 - 10 in house users and about 20 - 50 web users

Data size: 200 Records per day, each record Needs to store PDF documents, about 5 docs per record

Yes 24/7 usage, but upon advice maintenance downtime for a few hours is no Problem

Yes, it will be a Windows and a web application, this is a requirement of the customer, as they need a very quick data entry

Yes, there is staff available to manage the Server

@ Allard
My idea is that the order numbers are generated by the in house System. So if a web user enters an order every order Needs manually to be confirmed by an in house user, and the confirmation will generate the id. As Primary key I use GUIDs


One question to Fabrice replication:
Is it only master / slave or can it manage master / master replication?


Best Regards


Stefan.
Posté le 14 novembre 2016 - 18:56
Hi Stefan,

2 things:

The most important question to ask yourself is this one: If the main site (windev) looses internet access, a solution with a central DB on a server meas that nobody in the main site will be able to work at all. Is it acceptable?

If like me you think that the answer is no then you NEED to implement a replication -OR- to have your DB hosted locally, and your web site accessing it remotely. However, considering the asymmetry of most internet connection, such configuration would means that the web data access could be potentially VERY slow.

As for your question about master and slave, I have no idea what you mean. My replication system currently allows to configure what is sent and received for each and every DB. The web DB just act as a communication hub.

Best regards
Posté le 14 novembre 2016 - 20:21
Hi Fabrice,

Thanks for your reply.
What I mean with Master/Master is:
If there is a entry in db1 it is visible in db2 and Vice Versa?

IF I understood the native PC Soft Replikation can only Handle a Master dB which Allows Input and a Slave which is Read only?

Best regards

Stefan.
Posté le 14 novembre 2016 - 21:43
Hi again

you understood wrong. PcSoft replicationS (all 4 of them if I count correctly) are potentially bidirectional (it's up to you how you set them up).

The same thing is true with mine, of course. The main difference is that you get the sources of mine, adn therefore can adapt it finely to your needs, and even more important, debug it if there is a problem, which you cannot do with the pcsoft ones.

Best regards
Posté le 15 novembre 2016 - 00:09
Hi Stefan,

1. from the info , the system usage consider small . having 2 database and replicator is over kill.

2. use MSSQL from start
- since you are going to save alot pdf files , then I suggest that you use MSSQL from beginning.
unlike other database, which save blob like a string into database, MSSQL internally store the files in filesystem which why the performance is better in this.
- save hassle of compatible issue when switching to MSSQL

3. don't use GUID as primary key. unless really really no choice .
reason ?
- using string as primary key will slow down search and join
- data send down to client become big.
for example.
let say you create webservice to send down data in json format
if you using int as primary key , sending 10 records will cost you 11 characters
but if you using GUID , sending 10 records will cost you 320 characters.
Posté le 15 novembre 2016 - 23:03
Dear all,

Thanks for your advices.
I had a quick Look at Fabrices WX Replication.
Might be it is over kill, bunt I think I will use it, as at a later Stage number of Users might grow and mobile devices will be added later.

Fabrice, thanks for the work you offer the community
Posté le 21 mars 2017 - 10:19
Hi guys,

Where i can find Fabrice's Replication system, im using PCSOFT replication of HFSQL Servers, but only work fine 1 day. I'm replicating 6 servers bidirectionally on a few tables. Only 2 servers are replicating fine to my centralized server, the other 3 just stop the replication. And my centralized server doesn't replicate bidirectional to the other 5 servers, only receive replicated information from the 2 servers mentioned above; but dont send that information to none of the other servers. Pls help me...!!!
Posté le 21 mars 2017 - 13:27
Hi Brayan

as stated in my signature, WXReplication is available on my web site.

Just look in the open source section of the menu

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 3/21/2017 à 4:19 AM, Brayan Romero a écrit :
Hi guys,

Where i can find Fabrice's Replication system, im using PCSOFT
replication of HFSQL Servers, but only work fine 1 day. I'm replicating
6 servers bidirectionally on a few tables. Only 2 servers are
replicating fine to my centralized server, the other 3 just stop the
replication. And my centralized server doesn't replicate bidirectional
to the other 5 servers, only receive replicated information from the 2
servers mentioned above; but dont send that information to none of the
other servers. Pls help me...!!!