-
[Newbie] Cloud database on VB6
Hi master/guru/suhu
Can someone help me explain or recommend me.
I was asked by friend to create vb6 application (inventory/accounting) and this part I have no problem
The problem lies when he asked me to make it cloud, so they won't need server to maintain, easy for access, bla bla blah
I want to make the database in accdb format (Access 2007), what should I do to make this cloud ?
Thank you
Very very newbiw for cloud database
Regards
-
Re: [Newbie] Cloud database on VB6
If you want to develop the client-frontend (the GUI) in VB6, whilst the Data is
(in *.mdb or *.accdb format) hosted "on some server in the internet", then
you will need:
1) either a "managed-server"-contract with some internet-hoster who offers MS-Windows as the Server-OS
2) or a CloudService-Provider who offers entire Virtual-Machines (which in the end run MS-Windows as well)
The latter part (#2) could be e.g. an MS-Azure Worker-Role - but those are usually much more
expensive than a normal virtual (managed) server from a normal Web-Provider (as listed in point #1).
To give you an impression, how #1 above performs and behaves - here's VB6-Code
which can perform SQL-Requests against a Test-Database (NWind.mdb), hosted online
(on vbRichClient.com - "powered" by a normal "about 10Euro-per-month" Windows-WebHosting-contract).
To run the code below, you will only need an "MS Hierarchical Flexgrid" on an otherwise empty Form,
so after you placed the Grid-Control on the Form (as MSHFlexGrid1), you can click the Form and make
a secure https-Request, which hands out an ADODB.Recordset (which then is set as the datasource of the FlexGrid).
Code:
Option Explicit
Private Sub Form_Click()
On Error GoTo 1
Set MSHFlexGrid1.DataSource = PerformNwindRequest("Select * From Customers")
1 If Err Then MsgBox Err.Description
End Sub
Function PerformNwindRequest(SQL As String) As Object
Dim Req As Object, B() As Byte
Set Req = CreateObject("Winhttp.WinHttpRequest.5.1")
Req.Open "POST", "https://vbRichClient.com/asp/ADODBTest.asp", False
Req.SetRequestHeader "Content-Type", "application/json"
Req.Send "{""DBName"": ""/data/NWind.mdb"", ""SQL"": """ & SQL & """}"
B = Req.ResponseBody
If B(0) = 123 Then Err.Raise vbObjectError, , StrConv(B, vbUnicode)
Set PerformNwindRequest = GetRsFromByteContent(B)
End Function
Function GetRsFromByteContent(Data) As Object
Dim Stream As Object
Set Stream = CreateObject("ADODB.Stream")
Stream.Type = 1 '<- 1 = adTypeBinary
Stream.Open
Stream.Write Data
Stream.Position = 0
Set GetRsFromByteContent = CreateObject("ADODB.Recordset")
GetRsFromByteContent.Open Stream
End Function
Olaf
-
Re: [Newbie] Cloud database on VB6
great scott..thank you very much
By the way, for part 1. can you provide clearer example. what host/website/etc that can provide cloud database mdb/accdb ??
i read before for this : www.xeround.com ?
can you give me more basic explanation for part 1.. i dont think you refer to IIS or public IP some sort like that ...right ??
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
jedifuk
By the way, for part 1. can you provide clearer example. what host/website/etc that can provide cloud database mdb/accdb ??
With the approach in #1, we do talk about a "cloud-service in the classical sense"
(a normal "WebService", hosted on a normal "WebServer", on a Serverfarm of a normal "InternetProvider").
The term "cloud" is only an overhyped buzzword with "all kind of meanings" these days.
"Cloud" (in the plain technical sense) is only an:
- "accumulation of known web-technologies" (as they are provided by normal InetHosters as well)
- often under the umbrella of a larger company (which wants to bind you to their own service-contracts and APIs)
The one thing, which needs to exist in a *real* cloud-service is: Scalability.
(in terms of a "flexible pricing-model", which allows you to "throw more hardware at the problem with a simple contract-expansion")
Some of the above mentioned "normal Providers" don't allow such a contract-boost-up in an easy way
(in case your normal Web-solution starts getting too slow for your "much increased customer-base").
Ok - to be fair - "real cloud-providers" offer also better failover-mechanisms and a better (smaller)
"average down-time per year" than the normal WebServer-contracts of normal InetProviders (although
some normal contracts were getting much better in this regard lately).
Quote:
Originally Posted by
jedifuk
can you give me more basic explanation for part 1.. i dont think you refer to IIS or public IP some sort like that ...right ??
The example above (assuming that it worked for you) is based on #1...
And this is a normal contract from 1und1 (a german Inet-provider - they also have international offers I think, then under the '1and1' label).
- it's normal Windows-Hosting
- running an IIS as the WebServer
- supporting "classic ASP", which answered the request in the above example (although ASP.Net is also available)
- the contract has "unlimited Traffic and unlimited WebSpace" (on an SSD-based SAN)
- and runs on a shared VM which is powered by Intel-XEONs (whereas the cheaper worker-roles in MS-Azure run on slow Intel-Atoms)
- there's automatic serverside Backups taking place (mirroring to another Serverpark in a different location)
- the 10Euro per month do also include a single SSL-certificate (which you need for secure https-connections)
- upgrade-options to the (more expensive) "1and1 real cloud-services" do exist on this contract
Not trying to advertise 1and1 here - there's comparable offers also from a lot of other providers -
I mentioned it only with regards to: "what exactly does work well for you"...
Olaf
-
Re: [Newbie] Cloud database on VB6
Olaf, this is interesting.
Is it possible for you to post the ASP code of your "https://vbRichClient.com/asp/ADODBTest.asp"?
Thanks
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
Thierry69
Is it possible for you to post the ASP code of your "https://vbRichClient.com/asp/ADODBTest.asp"?
Sure, here it is (please google for json2.asp, which was not written by me)...
Code:
<% @EnableSessionState=False %>
<!--#include file="json2.asp"-->
<%
'Helper-Functions which are normally located in another include-file (similar to the json2.asp at the top)
Function GetStringFromUTF8Bytes(B)
With CreateObject("ADODB.Stream")
.Type = 1
.Open
.Write B
.Position = 0
.Type = 2
.Charset = "utf-8"
GetStringFromUTF8Bytes = .ReadText
End With
End Function
Function OpenConn(ServerFileName)
Set OpenConn = CreateObject("ADODB.Connection")
OpenConn.CursorLocation = 3 ' adUseClient
OpenConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ServerFileName
End Function
Function GetRs(Query, Cnn)
Set GetRs = CreateObject("ADODB.Recordset")
GetRs.Open Query, Cnn, 3, 4 'adOpenStatic, adLockBatchOptimistic
End Function
Function GetByteContentFromRs(Rs)
If Not IsObject(Rs) Then
Set Rs = CreateObject("ADODB.Recordset")
Rs.Fields.Append "Empty", 8
Rs.Open
Rs.AddNew
End If
Dim Stream
Set Stream = CreateObject("ADODB.Stream")
Rs.Save Stream, 0 '<- 0 = adPersistADTG
GetByteContentFromRs = Stream.Read(Stream.Size)
End Function
'and here the lines needed to serve the request (making use of the Helper-Functions)
On Error Resume Next
Dim Params: Set Params = JSON.parse(GetStringFromUTF8Bytes(Request.BinaryRead(Request.TotalBytes)))
Dim Cnn: Set Cnn = OpenConn(Server.MapPath(Params.DBName))
Dim Rs: Set Rs = GetRs(Params.SQL, Cnn)
If Err Then
Response.Write "{""Err"": """ & Err.Description & """}"
Else
Response.BinaryWrite GetByteContentFromRs(Rs)
If Err Then Response.Write "{""Err"": """ & Err.Description & """}"
End If
Cnn.Close
%>
Olaf
-
Re: [Newbie] Cloud database on VB6
Thanks.
I have made it work on one simple DB.
Very Interesting.
-
Re: [Newbie] Cloud database on VB6
Before going too far down that road though there are many things to consider.
From the programmer's point of view the client interaction with the database is quite different. From an operations point of view the hosted part needs some care and feeding and providers go out of business, drop service offerings, change IP addresses making DNS maintenance an issue, etc.
Nothing wrong with the concept, it has been around almost exactly as shown above since the late 1990s.
But in real life you'll probably find that things will be far simpler just to install a cheap but solid NAS server on the LAN with a couple of mirrored (RAID 1) drives and call it good. Unless remote access from outside the LAN is truly required this will be far, far less trouble in both the short and the long term.
Lots of NAS boxes are around, often Linux or BSD based, but they support Microsoft Networking via Samba or some variation. These are typically designed to be near-zero-administration and require no Linux knowledge.
Such a NAS box with two 1TB drives can be had for under $200 US with some shopping. $300 at worst. Try a Google search on "2 drive nas server" for some options.
-
Re: [Newbie] Cloud database on VB6
thank you
now the problem, my friend do not wish physically server, need cloud since no need to worry about maintenance pc, etc.
So I need a place where I can put database on internet, and vb6 application can access the database.
I know dropbox and google drive unable to do the job, change 1 byte in database will sync full size mdb to internet
Any suggestions ??
-
Re: [Newbie] Cloud database on VB6
one nice question..sorry for newbie question
Suppose I place my database in google drive, (which means physically database will exist in local harddrive)
Can I use vb6 to access database and automatically sync every afternoon ??
thank you
-
Re: [Newbie] Cloud database on VB6
You have little choice then.
You could redesign everything to use a proper Cloud platform (and that means you cannot use an ACE or Jet database).
Or else you might go with a hosted ASP application as already suggested, which still requires a redesign but at least you can still use a Jet MDB or ACE ACCDB.
I suspect you will find it less work in the long run though to move to a hosted client/server DBMS like SQL Server or MYSQL. The downside is that even to use those with your monolithic application design you have to find a hosting provider that permits client connections from the public Internet. Most hosting providers do not allow this, but some do.
So those are your three options if your friend insists on this requirement: massive rewrite, significant rewrite, or move to a client/server DBMS on a remote host allowing client connections.
Very few people ever take the first path with VB6. These days very few take the second path using ASP. Almost everyone either tries the third path or gives up and installs a file server on their LAN.
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
jedifuk
one nice question..sorry for newbie question
Suppose I place my database in google drive, (which means physically database will exist in local harddrive)
Can I use vb6 to access database and automatically sync every afternoon ??
thank you
File sharing and sync services are not intended to be used for something like a database. Even if you get it to work, a small update to a database could mean a massive synchronization.
Nobody does this.
-
Re: [Newbie] Cloud database on VB6
okay..good explanation, no problem I can migrate to MySQL cloud, I only need to change connection string in vb6
Now, my stupid questions :
1. Can someone recommend me what Cloud storage suitable for this job (MySQL, etc) with friendly price ? :)
2. My vb6 application will access this cloud storage..using public IP ?? that will need some work right ??
Regards
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
dilettante
File sharing and sync services are not intended to be used for something like a database. Even if you get it to work, a small update to a database could mean a massive synchronization.
Nobody does this.
yes..that is what i am talking about
small update results in massive sync
Can someone recommend me what place I can put my database on internet (cloud is the easy language) so when I made small update I won't need to full sync
regards
-
Re: [Newbie] Cloud database on VB6
i read something about google cloud platform..
with hosting ability, video streaming, etc
Can I use this ??
-
Re: [Newbie] Cloud database on VB6
dilettante is right, doing this way with access DB is not the best practice.
But it could be used to export data to an external DB, then be reused with a light offsite consultation client.
Using dropbox or similar is not at all the good way to do it too as it will sync all the data.
-
Re: [Newbie] Cloud database on VB6
anyone can explain ...how about google cloud SQL ??
is that good enough to solve my problem ?
-
Re: [Newbie] Cloud database on VB6
Google Cloud SQL should get you started. Let us know how that turns out for you.
-
Re: [Newbie] Cloud database on VB6
Using VB6 from a Cloud MySQL instance isn't as simple as changing the connection string. As dil pointed out - on most shared instances, you won't have direct port access to the DB. you'll need a "service" similar to the ASP Schmidt posted.
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
DEXWERX
Using VB6 from a Cloud MySQL instance isn't as simple as changing the connection string. As dil pointed out - on most shared instances, you won't have direct port access to the DB. you'll need a "service" similar to the ASP Schmidt posted.
i see..then what is the easiest way to connect to online database by using vb6 ?? no problem with db type, i can live with MySQL, Mdb, Accdb, etc.
-
Re: [Newbie] Cloud database on VB6
Schmidt actually posted the easiest. The easiest however is just not what most of use would do :) The example service Schmidt posted leaves the entire DB open to the internet (it is just an example). so you'll probably want a little more security than completely wide open.
You could use Schmidt's example as a starting point and create a more specific and secured web api.
It actually all depends on where you want to host the data. Some generic shared servers may not even have ASP, or a shared windows environment.
price out your options, and see what they offer. I bet if you're willing to shell out the big bucks - you can have a windows server with the ports you need open to the internet. (then it is just a connection string update)
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
DEXWERX
Schmidt actually posted the easiest. The easiest however is just not what most of use would do :) The example service Schmidt posted leaves the entire DB open to the internet (it is just an example). so you'll probably want a little more security than completely wide open.
You could use Schmidt's example as a starting point and create a more specific and secured web api.
It actually all depends on where you want to host the data. Some generic shared servers may not even have ASP, or a shared windows environment.
price out your options, and see what they offer. I bet if you're willing to shell out the big bucks - you can have a windows server with the ports you need open to the internet. (then it is just a connection string update)
Thank you..i think i am getting picture about this subject..
I might take a look at 1and1..but i think i couldnt try for free. You know. I need to try before i proceed with pricing terms
Sorry. Maybe this out of question. Can someone recommend me which host give free trial ?
Again. Sorry for asking this
-
Re: [Newbie] Cloud database on VB6
If you want to go with the ASP alternative you can just install IIS locally. Then you'll probably have to install and enable ASP on that because by default you probably only get ASP.Net these days. That gives you something to play with.
I think you will very quickly figure out that you don't want to go that way at all! The example shown above is about the most trivial thing imaginable: querying and returning a disconnected Recordset. Dealing with updating and more complex operations is a lot of work, often enough that it quickly begins to make sense to start moving logic out of your client and into the ASP tier of your now-distributed application.
The N-tier application model changes quite a bit and you can't really use simple monolithic coding anymore. This is exactly why most people either keep everything local and/or move to a client-server DBMS: staying with simple monolithic coding supplemented by stored procedures here and there. It can also be enough work that historically most people just punt, throwing away client-side code and making a web application.
If any of this is new to you I think you are biting off far more than you are prepared to chew.
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
DEXWERX
Using VB6 from a Cloud MySQL instance isn't as simple as changing the connection string. As dil pointed out - on most shared instances, you won't have direct port access to the DB. you'll need a "service" similar to the ASP Schmidt posted.
I didn't drill down too deep in Google's site, but they do seem to make provisions for using "MySQL Client" (from a VB6 point of view probably the ODBC Driver is enough?) for external connections. I didn't see what the restrictions are, maybe whitelisting fixed IP addresses? Probably some extra charges too.
Figuring out the cost of Cloud services is always a lot of "fun" as well. There are lots of usage models with different rates based on type and pattern of access. That's part of the attraction of renting a naked host instance like those 1and1 probably offers: the pricing model is much simpler. You're just getting less, though it may be all you need.
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
DEXWERX
Schmidt actually posted the easiest. The easiest however is just not what most of use would do :) The example service Schmidt posted leaves the entire DB open to the internet (it is just an example). so you'll probably want a little more security than completely wide open.
It's not "as open" as you might think.
It is currently open for "public read-only access" because I wanted it to be this way - but try as you might,
you will have no way to manipulate the content of the NWind.mdb, if I don't allow you to do so.
If you don't want a DB to be open for public Read-Access (as in my example),
then the simplest way is, to choose a "strong name" for the DB, with a very long filename,
throw in a few "special chars" for good measure, and then hide that DB-File behind another
"strong-named" directory.
Remember, that the Example was doing things over https, so there's no way to figure
the hidden DBDirectory/DBNames out over wireshark or other listening-attacks on sockets.
And since it's https, you could ensure even better security (including user-authentication),
when you use the ASP-session-handling in conjunction with a http-authentication-scheme.
With https, even simple http-base(64)-auth would be sufficient (and this is supported
with a single line of code in the http-5.1.objectmodel over the .SetCredentials-Method).
Quote:
Originally Posted by
DEXWERX
You could use Schmidt's example as a starting point and create a more specific and secured web api.
There's not much more to do, to make it even more secure - as already said, the most important thing
(the transport-channel) *is* already secure (per https and a strong-signed SSL-certificate which comes with
the contract). No fiddling with VPN-setups or Firewalls needed, https-requests are a (preconfigured)
bread-and-butter thing these days on most client-OSes and http-libs (as the MS http 5.1 lib).
Quote:
Originally Posted by
DEXWERX
It actually all depends on where you want to host the data. Some generic shared servers may not even have ASP, or a shared windows environment.
That's why I mentioned the necessity, to order a Windows-Hosting-contract (with IIS and classic ASP support).
Nearly all normal Inet-Providers have such a thing on offer (besides their usual Linux-Hosting-contracts with LAMP).
It will usually cost about 30% (3-5$/Euro) more per month than Linux-Hosting, but IMO this is well invested money,
when you're able to use VB-Code and COM-libs on the serverside (and can test the serverside routines also in the VB6-IDE).
Quote:
Originally Posted by
DEXWERX
I bet if you're willing to shell out the big bucks - you can have a windows server with the ports you need open to the internet. (then it is just a connection string update)
Any professional with some experience in that field (internet-services, internet-db-access)
would disencourage you from working over "a native DB-port" (opened at the clientside).
Robust internet-apps "hide" the DB from the clientside, and open connections to it only at the serverside.
They work with disconnected Data-Containers (disconnected JSON-Resultsets - or disconnected ADO-Recordsets)
to retrieve Data, or to transport "Data for Updates".
ADO-Recordsets do have an UpdateBatch-method, and so are capable to accumulate
Deletes/Inserts/Updates on the clientside - and apply them at the serverside after a reconnect
to a Cnn and an UpdateBatch-call.
So, to expand my example in write-direction (making it fully "CRUD-capable" in a generic way), I would only
have to throw in two or three more little functions at the serverside - and a handful of lines at the clientside.
The few "cross-table-" or "cross-db-"transactions one will encounter in a more complex app, can also be
covered by dedicated serverside VBScript-functions (then doing the important transactions on *serverside*
connection-objects, not clientside ones as you proposed, where the underlying sockets could go "out
of internet-scope" at the next hickup of your WLAN-access-point).
Best of all, I can test and debug all that in the VB6-IDE (working against a local DB).
Olaf
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
dilettante
Figuring out the cost of Cloud services is always a lot of "fun" as well. There are lots of usage models with different rates based on type and pattern of access. That's part of the attraction of renting a naked host instance like those 1and1 probably offers: the pricing model is much simpler. You're just getting less, though it may be all you need.
Actually, I've just choosen an option in the Google-Pricing-Model,
which should be relatively comparable to the performance-level of the 1and1-contract I have -
(with their db-n1-standard-1) ... and it comes out factor 5 more expensive (in their price-calculator)...
https://cloud.google.com/products/calculator/#
http://vbRichClient.com/Downloads/GoogleSQL.png
Besides, included in the 1and1 contract are also unlimited MySQL-Databases and
10 MS-SQLServer-Databases (besides the ability to host Desktop-DBs like JET-MDBs
or SQLite).
Again, not trying to advertise 1and1 here, I mean it more as a kind of "warning",
to not drink all the cool-aid that's circulating around the "cloud"-buzzword...
A similar priced contract from a normal provider will give you (in my experience)
(much) more performance for the money - at least entirely sufficient, to get your feet wet,
learn to implement your own web-service with classically implemented (http/https-based)
remote-procedure-calls - entirely sufficient to serve your first "paying 100 customers"...
When your amount of customers increases to 500 or 1000 (the performance of your simple
contract not sufficient anymore), that's usually a "nice problem to have" - so, think about
upgrading your "normal contract" *if* that happens, but not before.
The serious cloud-offers (with setups that actually start to "really perform") will cost you
about 100bucks per month - but then, with that money you can also buy into some
much more powerful contracts with normal inet-providers...
Another thing to consider... when you run your business on your own server (on your own domain),
you're kind of "flying under the radar" (the well-experienced hacker-groups have usually no interest
in getting into the web-accounts of "apple-and-bananas.com" - they try themselves on the "big names" instead -
and when those blow up, there's usually millions of accounts compromised (it already did happen, and will
happen again).
Olaf
-
Re: [Newbie] Cloud database on VB6
Any professional with some experience in that field (internet-services, internet-db-access)
would disencourage you from executing arbitrary SQL against an internet facing DB.
SSL can't defend against a hacker that is the end point... (although I'm glad you mentioned authentication, despite not using it in your demo)
Read-Only SQL can't defend against
Code:
SELECT * FROM
[Order Details] a,[Order Details] b, [Order Details] c, [Order Details] d,
[Order Details] e,[Order Details] h, [Order Details] k, [Order Details] p,
[Order Details] f,[Order Details] i, [Order Details] l, [Order Details] o,
[Order Details] g, [Order Details] j, [Order Details] m, [Order Details] n,
[Order Details] some_pain,
[Order Details] a_little_more,
[Order Details] uncle;
-
Re: [Newbie] Cloud database on VB6
Hello,
Using code in post2 i get the error "security error message".
Code:
Req.Open "POST", "https://vbRichClient.com/asp/ADODBTest.asp", False
If I change to
Code:
Req.Open "POST", "http://vbRichClient.com/asp/ADODBTest.asp", False
the code is working.
How tu use authentication?
-
Re: [Newbie] Cloud database on VB6
Olaf's solution is very interesting and valuable. There are a number of ways to avoid SQL-Injection mentioned by DEXWERX.
All the same, how to develop 'Cloud-App' or 'Internet-App' easily and securely is still a big problem for VB6.
Could Olaf's vbRichClient5 provide a complete-fast-secure solution to develop 'Cloud-App' or 'Internet-App' for VB6 programmers?
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
dreammanor
Olaf's solution is very interesting and valuable. There are a number of ways to avoid SQL-Injection mentioned by DEXWERX.
All the same, how to develop 'Cloud-App' or 'Internet-App' easily and securely is still a big problem for VB6.
Could Olaf's vbRichClient5 provide a complete-fast-secure solution to develop 'Cloud-App' or 'Internet-App' for VB6 programmers?
Depending on your definition of cloud, you certainly can do this with vbRichClient5 as a key component. I don't know about the scalability aspect - my application typically would have less than 100 users at a time as most companies I work with want their own "private" cloud system, so I don't think you'll be making the next Facebook with this approach, but hey maybe ;)
What I have in my system is a service running under Windows or Linux/Wine (RC5 classes work quite nicely under Wine) that acts as a broker between my user's database(s) (SQLite as shipped with RC5) and my users' machines. The user machines can have a native Windows client installed that communicates over an encrypted channel across the Internet to the server (using built-in RC5 RPC classes), and I also have a web interface that runs in the users' browsers. The browser connects to a normal web server (I use nginx), and the NGINX web server connects back to an custom FCGI server implementation. The FCGI server connects back to my RC5 service and the FCGI servier handles the translation of browser requests to RC5 RPC calls and back to HTTP responses (such as HTML, AJAX, etc...). Finally, NGINX handles all of the stuff between the FCGI server and the browser (in particular stuff like SSL, load balancing, etc...)
I posted a small demo of my FCGI implementation a while back, but there was no interest so it hasn't been updated in a while and has some known bugs unfortunately. Here's the link if you are interested: http://www.vbforums.com/showthread.p...FastCGI-Server
Lastly, you can see a demo of my web interface below. NOTE There is music in the video, so turn your volume down if that would be bothersome! At the back end it's all SQLite databases with RC5 handling the data connections. The FCGI server builds dynamic HTML from the data it gets from the RC5 RPC service and serves it back to NGINX, which serves it back to the browser. Works quite nicely (if a bit Rube Goldberg-ish) if I do say so myself :)
https://www.youtube.com/watch?v=LPoC6kDlGok
-
Re: [Newbie] Cloud database on VB6
This is really impressive Jason, congratulations - I won't tell anybody about your musical taste :rolleyes:
-
Re: [Newbie] Cloud database on VB6
Haha, thanks Carlos :) After making the software and the video, I got a bit lazy searching through YouTube's freely usable music, I'll admit!
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
jpbro
Haha, thanks Carlos :) After making the software and the video, I got a bit lazy searching through YouTube's freely usable music, I'll admit!
I've made a music a few years ago to put in a site I had a the time to avoid licensing problems. It's a 1mn mp3 that perfectly links the end to the start so you can put it in repeat mode. I can send it to you if you're interested.
(Sorry for the OT)
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
Carlos Rocha
I've made a music a few years ago to put in a site I had a the time to avoid licensing problems. It's a 1mn mp3 that perfectly links the end to the start so you can put it in repeat mode. I can send it to you if you're interested.
(Sorry for the OT)
Sure! Thanks a lot :)
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
jpbro
Depending on your definition of cloud, you certainly can do this with vbRichClient5 as a key component. I don't know about the scalability aspect - my application typically would have less than 100 users at a time as most companies I work with want their own "private" cloud system, so I don't think you'll be making the next Facebook with this approach, but hey maybe ;)
What I have in my system is a service running under Windows or Linux/Wine (RC5 classes work quite nicely under Wine) that acts as a broker between my user's database(s) (SQLite as shipped with RC5) and my users' machines. The user machines can have a native Windows client installed that communicates over an encrypted channel across the Internet to the server (using built-in RC5 RPC classes), and I also have a web interface that runs in the users' browsers. The browser connects to a normal web server (I use nginx), and the NGINX web server connects back to an custom FCGI server implementation. The FCGI server connects back to my RC5 service and the FCGI servier handles the translation of browser requests to RC5 RPC calls and back to HTTP responses (such as HTML, AJAX, etc...). Finally, NGINX handles all of the stuff between the FCGI server and the browser (in particular stuff like SSL, load balancing, etc...)
I posted a small demo of my FCGI implementation a while back, but there was no interest so it hasn't been updated in a while and has some known bugs unfortunately. Here's the link if you are interested:
http://www.vbforums.com/showthread.p...FastCGI-Server
Lastly, you can see a demo of my web interface below.
NOTE There is music in the video, so turn your volume down if that would be bothersome! At the back end it's all SQLite databases with RC5 handling the data connections. The FCGI server builds dynamic HTML from the data it gets from the RC5 RPC service and serves it back to NGINX, which serves it back to the browser. Works quite nicely (if a bit Rube Goldberg-ish) if I do say so myself :)
https://www.youtube.com/watch?v=LPoC6kDlGok
Thanks jpbro. Your Project Nomad Teaser is wonderful and I'll take some time to learn your FastCGI-Server.
-
Re: [Newbie] Cloud database on VB6
Hello Olaf
why using your code in post2 i get the error "security error message"?
Please,can you improve your demo in post2 adding authentication in the sample code?
Thanks for yout time and effort
-
Re: [Newbie] Cloud database on VB6
For those who had interest in my FCGI application server, it's been extended a bit and is now on GitHub here: https://github.com/jpbro/VbFcgi
-
Re: [Newbie] Cloud database on VB6
I didn't read every single post in this thread but from what I did read, I noticed that no one suggested SQL Server on the Azure cloud. I briefly had a chance to dip my toes in it and was surprised at how extremely simple it is. While .Net did provide a neat API for dealing with Azure storage and other Azure resources, as far as I could tell, SQL Databases were quite trivial to work with. You could use all the normal providers in tandem with ADO from VB6 almost exactly as you would with an SQL Server instance on a local network.
This is by far the easiest solution he could pursue. With an Azure account he could get something simple working in a matter of minutes and with no more or less code than any other SQL Server client application, and he doesn't need to learn anything new if he already knows how to write SQL Server client applications. It's literally the exact same code. The only difference is the connection strings being used.
You guys should have suggested this first. It's almost insane not to suggest this.
-
Re: [Newbie] Cloud database on VB6
The last time I looked at Azure the pricing had me a bit spooked - there was separate pricing for all sorts of different categories (CPU usage, IO usage, Network usage, etc...). There was a cost estimator, but you essentially had to guess at what your workload might be and hope you were accurate. This makes it difficult to handle situations where your customers demand a fixed monthly price for your software. There are VPS hosts (Linux and Windows) out there that offer fixed monthly rates which can be very appealing. Maybe Azure does this now too, or maybe I just missed something back when I tried it out, but that was one thing that kept me away from it.
PS: Not sure it's "insane" for no one in this thread to suggest something that they haven't had any experience with, but thanks for bringing it up based on your experience.
-
Re: [Newbie] Cloud database on VB6
If you want flat-rate pricing you probably want hosting, not cloud services.
-
Re: [Newbie] Cloud database on VB6
Or as the service provider I use calls it "cloud hosting".
Without getting into a buzzword fight about what the cloud is, in my experience what almost 100% of customers are really saying when they ask for the product to be in the cloud is for it to work on their phone/tablet/browser without requiring installation (or at the most requiring installation from an app store). The stuff happening on the other side of the browser/app is of absolutely no interest to them (so long as it is secure, backed up, and highly available). Whether it's a real McCoy "cloud service" like Azure or "cloud hosted" VPS is neither here nor there for the customer - it's an implementation choice for the vendor (as everything on that side of the equation is up to the vendor to build, maintain, and pay for).
Their other customer concern is the cost, and in my experience the less complicated the better. This makes the choice of "cloud service" or "cloud hosting" a marketing issue too. I've found that it is easier to sell "get access to our service for $X/month" than "get access to our service, for $X+$Y+$Z per month for CPU/IO/Network bandwidth - just remember to check the dashboard periodically and be careful how much you are using if you don't want a surprising invoice at the end of the month!".
That's my experience with my product/service & market - depending on your product/service and market, your experience might be the completely different of course.
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
jpbro
PS: Not sure it's "insane" for no one in this thread to suggest something that they haven't had any experience with, but thanks for bringing it up based on your experience.
My apologies if you or anyone felt slighted by this comment but I didn't mean it like that. It's just that as I was reading through the posts, I saw people suggesting all manner wizardry, that involved everything from HTTP to JSON. All I kept thinking was that all this could be avoided by doing nothing more than changing a connection string.
In order to port an SQL Server Database from a local server to the Azure cloud, all you have to do is copy the database to the cloud and change the connection string your application uses to connect to it. That is literally all you have to do.
Now I know the OP is using Access. However, it is possible to convert an Access database to an SQL Server database. In some cases, this can be very straight forward and quick. After that, all you have to do is change the provider and connection string for the client application to connect and communicate with SQL Server properly. From there, you just copy the SQL Server database to the Azure cloud and change the connection string again and you're done. This can all be done in like less than a day with almost zero changes to the front-end client app and no need to learn any special API to deal with the cloud. You just deal with it the same way you deal with a regular SQL Server database.
The simplicity of the option is why I felt it was insane not to suggest it.
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
Niya
My apologies if you or anyone felt slighted by this comment but I didn't mean it like that. It's just that as I was reading through the posts, I saw people suggesting all manner wizardry, that involved everything from HTTP to JSON. All I kept thinking was that all this could be avoided by doing nothing more than changing a connection string.
In order to port an SQL Server Database from a local server to the Azure cloud, all you have to do is copy the database to the cloud and change the connection string your application uses to connect to it. That is literally all you have to do.
Now I know the OP is using Access. However, it is possible to convert an Access database to an SQL Server database. In some cases, this can be very straight forward and quick. After that, all you have to do is change the provider and connection string for the client application to connect and communicate with SQL Server properly. From there, you just copy the SQL Server database to the Azure cloud and change the connection string again and you're done. This can all be done in like less than a day with almost zero changes to the front-end client app and no need to learn any special API to deal with the cloud. You just deal with it the same way you deal with a regular SQL Server database.
The simplicity of option is why I felt it was insane not to suggest it.
Plus the fact that if you don't need more than 2G and it isn't going to be a lot of traffic it can be had for under $7 a month, better performance and more storage will cost more though...
-
Re: [Newbie] Cloud database on VB6
Isn't there more to it then just copying the database to the cloud and changing the connection string? It sounds scary as heck to me to have an SQL Server instance sitting open to the Internet. The HTTPS/FCGI and JSON stuff adds complexity, but it provides extra separation between the Internet and your data. You build an API for the client/browser to use to work against your data at arms length and that has an added security benefit, no?
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
jpbro
Isn't there more to it then just copying the database to the cloud and changing the connection string? It sounds scary as heck to me to have an SQL Server instance sitting open to the Internet. The HTTPS/FCGI and JSON stuff adds complexity, but it provides extra separation between the Internet and your data. You build an API for the client/browser to use to work against your data at arms length and that has an added security benefit, no?
Well, like I said, I only dipped my toes in it. I never got around to giving serious examination to it's security. However, I don't think a large multi-billion dollar organization like MS would do something as reckless as offer cloud services with minimal security. Plus, in my poking around in Azure I saw a couple things that indicated to me that Azure resources have some serious options for security. I just never really dived into it.
[EDIT] Also forgot to mention that the connection string for connecting to an Azure SQL Database does include a password and user name and a couple other items meant to be used for security.
The point I was trying to make is that it takes very minimal effort and knowledge get started with Azure. You can then choose to research as much as you want about the platform and it's features if you feel there is something more you need, like extra security.
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
Niya
I never got around to giving serious examination to it's security. However, I don't think a large multi-billion dollar organization like MS would do something as reckless as offer cloud services with minimal security. Plus, in my poking around in Azure I saw a couple things that indicated to me that Azure resources have some serious options for security. I just never really dived into it.
IMHO it's not about MS' cloud security (or Amazon's, or anyone else) as much as it is about making your database directly accessible over the Internet. I think there's a lot of value in having an API layer in between your database and the Internet as a general rule.
That said, being a "multi-billion dollar organization" doesn't give you security by default - in fact it may even make you a greater target for hacks. Look at the Yahoo and Equifax breaches (among others).
Quote:
Originally Posted by
Niya
[EDIT] Also forgot to mention that the connection string for connecting to an Azure SQL Database does include a password and user name and a couple other items meant to be used for security.
Well I should hope so! :)
Quote:
Originally Posted by
Niya
The point I was trying to make is that it takes very minimal effort and knowledge get started with Azure. You can then choose to research as much as you want about the platform and it's features if you feel there is something more you need, like extra security.
And choice is good, especially informed choice. Thanks for bringing up an alternative - I'm not trying to start a fight or anything, I'm just representing another possibility (and one that I don't think is particularly insane, just built upon a different experience, set of assumptions and beliefs, different starting point and desired end goals).
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
jpbro
and one that I don't think is particularly insane
I wasn't trying to imply at all that the solutions you guys suggested were insane. In fact, I actually think those options are very interesting and have merit. What I felt was insane was the fact that no one offered the simplest and most direct option.
Quote:
Originally Posted by
jpbro
...I'm not trying to start a fight or anything...
Don't worry, it's cool ;)
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
Niya
Don't worry, it's cool ;)
It's cool here too - sorry for harping on the "insane" thing - the first time I was trying to point out that I thought insane was a bit of a strong judgement, the second time I was just trying to be a bit humorous (not sure that got across). Anyway, I meant it when I thanked you for pointing out other options. It's always good to get different perspectives here.
-
Re: [Newbie] Cloud database on VB6
Quote:
Originally Posted by
jpbro
Very nice, jpbro. Thank you so much.
VB6 is an old and excellent language. Though it has no new features to make people excited, the following things are always make me look forward to:
1. Excellent third-party library for VB6, such as vbRichClient5
2. New IDE for VB6
3. Cloud database for VB6
4. Web-API for VB6
5. Fast and easy web development framework for VB6
6. Mobile development framework for VB6