B4J Question Websocket server - chat

yiankos1

Well-Known Member
Licensed User
Longtime User
Hello team,

I am trying to build my first websocket server. I am using as a guide chat example from webapps. I see at PushShared module that all chats are stored at a local sqlite. Can we switch this local db to mysql table? In order to be accessible from phpmyadmin.

Of course needs a lot of work to be done, but i am asking first in order not to lose much time.

Thank you for your time.
 
Solution
What do you think about not asking the way it can be done, but only if it can be done?
Good question which can only be answered by you if you hit the search link and look to the results to find a for you acceptable solution for what you want.

Opening the database to MySql database and maybe a little SQL tweak here and there to resolve the differences between the SQL statements shouldn't be too difficult after all.

Or you choose to synchronize the local SQLite database with your MySql database so that your program does not have to adjust.

MicroDrie

Well-Known Member
Licensed User
Longtime User
Can we switch this local db to mysql table?
What do you think about to start with a search on the forum?
 
Upvote 0

yiankos1

Well-Known Member
Licensed User
Longtime User
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
What do you think about not asking the way it can be done, but only if it can be done?
Good question which can only be answered by you if you hit the search link and look to the results to find a for you acceptable solution for what you want.

Opening the database to MySql database and maybe a little SQL tweak here and there to resolve the differences between the SQL statements shouldn't be too difficult after all.

Or you choose to synchronize the local SQLite database with your MySql database so that your program does not have to adjust.
 
Upvote 1
Solution

yiankos1

Well-Known Member
Licensed User
Longtime User
That's my "acceptable solution". ?
Really appreciate your help. That's why I mentioned it as a solution!
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
In theory, I think it can be done.
First, I don't have much experience with websocket.
In theory, if a web app can use sqlite, it should be able to use other database engines like MySQL, MS SQL or PostgreSQL.
As commented by MicroDrie above, developers just need to find the differences such as the library, driver and SQL syntax in order to do the migration.
I have built web api server which can connect to either SQLite or MySQL. So to answer your question, it is possible and it may not difficult as you have expected.
 
Upvote 1

yiankos1

Well-Known Member
Licensed User
Longtime User
Yes indeed i saw this great work! I have already developed me server with jRDC and i wanted to add a websocket just for chat. Your web api server does have pros besides jRDC. I am asking for my next project, trying yours.

Thank you.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…