Register and join over 40,000 other developers!
Recent Topics
-
The Game You Are Waiting For?
WendellHarper - Dec 06 2020 01:21 PM
-
Quora and Reddit Backlinks
WendellHarper - Dec 06 2020 01:14 PM
-
Delete account
pindo - Jul 23 2020 01:33 AM
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

MySql connection as IM protocol?
Started by ArekBulski, Sep 05 2009 01:39 PM
mysql connection mysql_connect
7 replies to this topic
#1
Posted 05 September 2009 - 01:39 PM
I was thinking about my incoming IM project, Gaduzila 2.0, and I was wondering...
Can I use MySql connection to connect IM client with the server? MSN, Skype and so on, are all using TCP/IP connections I believe, but using SQL would be much easier for me.
Does this approach have any drawbacks? Maybe scalability, security or I don't know. Anyone having knowledge please share with me. Any comment at all will be helpful, actually.
Can I use MySql connection to connect IM client with the server? MSN, Skype and so on, are all using TCP/IP connections I believe, but using SQL would be much easier for me.
Does this approach have any drawbacks? Maybe scalability, security or I don't know. Anyone having knowledge please share with me. Any comment at all will be helpful, actually.
proudly presenting my personal website and game website: F1Simulation. a thrilling Managed DirectX racing game... also my Ask Me
look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions
look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions
#2
Posted 05 September 2009 - 09:14 PM
Please explain more, I don't understand.
SQL server uses TCP/IP unless your using named pipes??
Is there a database involved with the application??
More info please...
SQL server uses TCP/IP unless your using named pipes??
Is there a database involved with the application??
More info please...
#3
Posted 06 September 2009 - 01:05 AM
I am planning to build a messenger, like MSN for example. Those usually use TCP/IP connections to connect to the server. Now, I was thinking about using MySql server as a central, and MySql connections from clients to connect with it.
Sql connections are based on TCP/IP, yes. I do not want to use TCP/IP streams directly. Inventing my own protocol similar to MSN's would be a nightmare.
This approach must have some drawbacks, but I think it would also make the protocol simple and easy to make. Unless I am wrong, hm. Sorry, I was too tired to write with more sense.
Sql connections are based on TCP/IP, yes. I do not want to use TCP/IP streams directly. Inventing my own protocol similar to MSN's would be a nightmare.
This approach must have some drawbacks, but I think it would also make the protocol simple and easy to make. Unless I am wrong, hm. Sorry, I was too tired to write with more sense.

proudly presenting my personal website and game website: F1Simulation. a thrilling Managed DirectX racing game... also my Ask Me
look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions
look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions
#4
Posted 06 September 2009 - 06:15 AM
OK, I think I'm starting to get it.
Will be using persistent direct connections to MySQL
or Web Service based??
Your client is probably rather thin,
just sending and receiving data,
a dataadapter, dataset, and a few queries
unless you add lots of features.
Will you be parsing the datasets manually
or dumping them into a data sourced object.
As for protocol, how about SOAP over TCP/IP??
More info please...
Will be using persistent direct connections to MySQL
or Web Service based??
Your client is probably rather thin,
just sending and receiving data,
a dataadapter, dataset, and a few queries
unless you add lots of features.
Will you be parsing the datasets manually
or dumping them into a data sourced object.
As for protocol, how about SOAP over TCP/IP??
More info please...

#5
Guest_Jordan_*
Posted 06 September 2009 - 07:16 AM
It would work, yes. It also seems like a waste of bandwidth though. The user would have to transmit once to the server and then the server would need to transmit again to the receiver making the server use 2x the bandwidth needed. I like the idea if the receiver is offline, that makes sense, but why not do a direct connect if both users are online? You don't have to invent your own protocol, use one that is already made. FTP comes to mind although I would forgo the username/password.
#6
Posted 06 September 2009 - 07:23 AM
I made the assumption that there can be multiple
people on "the channel" for lack of a better phrase.
So as I understand it, it's not a one to one connection.
ArekBulski, can there be more than 2 people on "the channel"?
people on "the channel" for lack of a better phrase.
So as I understand it, it's not a one to one connection.
ArekBulski, can there be more than 2 people on "the channel"?
#7
Posted 06 September 2009 - 10:22 AM
Thank you guys, your questions are very intriguing. I will try to answer them however I can. 
debtboy- I was thinking about using direct connections with a MySql database. This way I would not need any (complex) server application. Only a database, some privilege configuration and I'm set up. In the worst case scenario, I could implement a server application that takes records from one table, process and validate it, and put it into another table.
What is a Web Service exactly? An HTTP or TCP server, with a database backend? What is SOAP over TCP? What means "Will you be parsing the datasets manually or dumping them into a data sourced object."? I have no experience with databases whatsoever.
Jordan- I think all messengers like MSN Skype and so on are using centralized connectivity. For what reason I cannot tell. Maybe to have ability to spy onto users, spam them with advertising and ban those who abuse the network.
Decentralized authentication would be an interesting idea, doable with the use of cryptography and certificates. But decentralized connectivity... yare yare... some poeple cannot open ports or have changing IPs. Thistle has such a thing, writing Gaduzila 1.0 with TCP streams was a nightmare.
debtboy- You have a nice idea there. I was thinking about it, too. I would like to have an ability to send messages to everyone on my contact list at once. Or to group contacts and make conferences. So answer is definitely yes.

debtboy- I was thinking about using direct connections with a MySql database. This way I would not need any (complex) server application. Only a database, some privilege configuration and I'm set up. In the worst case scenario, I could implement a server application that takes records from one table, process and validate it, and put it into another table.
What is a Web Service exactly? An HTTP or TCP server, with a database backend? What is SOAP over TCP? What means "Will you be parsing the datasets manually or dumping them into a data sourced object."? I have no experience with databases whatsoever.

Jordan- I think all messengers like MSN Skype and so on are using centralized connectivity. For what reason I cannot tell. Maybe to have ability to spy onto users, spam them with advertising and ban those who abuse the network.
Decentralized authentication would be an interesting idea, doable with the use of cryptography and certificates. But decentralized connectivity... yare yare... some poeple cannot open ports or have changing IPs. Thistle has such a thing, writing Gaduzila 1.0 with TCP streams was a nightmare.
debtboy- You have a nice idea there. I was thinking about it, too. I would like to have an ability to send messages to everyone on my contact list at once. Or to group contacts and make conferences. So answer is definitely yes.
proudly presenting my personal website and game website: F1Simulation. a thrilling Managed DirectX racing game... also my Ask Me
look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions
look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions
#8
Posted 06 September 2009 - 06:14 PM
Hi ArekBulski,What is a Web Service exactly? An HTTP or TCP server, with a database backend? What is SOAP over TCP? What means "Will you be parsing the datasets manually or dumping them into a data sourced object."? I have no experience with databases whatsoever.
This link explains a web service better than I could:
Web service - Wikipedia, the free encyclopedia
Web Services give you unlimited flexibility to execute any control code you like between the request and the destination.
It can handle authenticating to the server, receiving data, sending data, interacting with a database, etc..., etc...
I've written many at work to control accessing and querying databases as well as delivering datasets to user's applications. They are web based, which makes them very good for executing code subject to change. Keep your client apps very thin and you can just update the web service(s) without having to roll out new client apps.
For example, you start your client up which sends a status message to the Web Service (status module, (web services can have many modules)) it stores your online status in database and extracts the online status of other users and passes that via SOAP over TCP/IP as an XML dataset to your client.
Your client parses the dataset (strips off the XML tags) and displays online status of other users in your client.
Now you pick 2 clients and send a message. Your client sends the user IDs of the 2 selected clients and the message to the Web Service (message module).
The Web Service stores the message and recipients in the database.
Recipient 1's synchronous request comes into Web Service (update module)
which in turn extracts the message and passes it to the recipient 1's client which parses and displays it.
Ditto for recipient 2
It sounds much worse than it is, the code is very simple and the best part...
It's stateless and relatively secure as you will receive no data that wasn't requested.
(this is how I understood your project)
As for no experience w/ databases, .NET makes it easy
You define the following data objects as SQL ODBC or other native type:
Connection
InsertCommand
SelectCommand
UpdateCommand
DeletCommand
CommandBuilder
DataAdapter
Dataset
assign DB connect text to the ConnectionString argument fo the connection object
assign a text query to the CommandText argument of the Command object
assign a the Command to a DataAdapter
assign a Connection to a DataAdapter
Fill a dataset w/ results from dataAdapter
You know how it works, if not I can give you examples.
Also tagged with one or more of these keywords: mysql, connection, mysql_connect
General Forums →
General Programming →
PHP code having some issueStarted by dennypaul, 09 Mar 2019 ![]() |
|
![]() |
||
Language Forums →
Databases →
Include a specific error, task, problem, or question in your titleStarted by Kriss, 27 Sep 2017 ![]() |
|
![]() |
||
Language Forums →
PHP →
Php Sql Injection Secure TagsStarted by uniqueideaman, 09 Apr 2017 ![]() |
|
![]() |
||
Language Forums →
PHP →
What Is Wrong With Number Of Rows Count Function ?Started by uniqueideaman, 09 Apr 2017 ![]() |
|
![]() |
||
Language Forums →
PHP →
How To Force MySql With Php To Show Final Row Only?Started by uniqueideaman, 09 Apr 2017 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download