Page 1 of 1

File sharing app?

Posted: Thu Nov 10, 2005 5:22 pm
by Kaiser
I was wondering... it wouldn't be any problem if a file sharing app is made with PB and Open Source? Dunno... this came to mind suddenly as most apps of that kind are made in C++ or something similar, and didn't know if that was allowed to be made in PB... right?

Re: File sharing app?

Posted: Thu Nov 10, 2005 5:30 pm
by Polo
Kaiser wrote:I was wondering... it wouldn't be any problem if a file sharing app is made with PB and Open Source? Dunno... this came to mind suddenly as most apps of that kind are made in C++ or something similar, and didn't know if that was allowed to be made in PB... right?
Err, you're allowed to do anything you want :?
It's not really a matter of what language you use, it's a matter of what you do, but there's no restriciton...

Posted: Thu Nov 10, 2005 5:35 pm
by Kaiser
I see, thanks :D

Posted: Fri Nov 11, 2005 5:51 pm
by Pantcho!!
PB is not the best (i can even say from experience, kinda "lazy" choice)
compiler for programming network stuff. for complex network you need to control threads which is a big issure in purebasic also that it cant handle strings as well. so i guess we need to wait PB 4.0 where all this is fixed.

then we can talk i dont mind start a project of this.

Posted: Sat Nov 12, 2005 4:13 pm
by va!n
We have startet coding a filesharing tool like emule, but started with the project before the first version of emule has been ever released! The program worked for 98% and had more features as emule dont has it today!

We must stopped the project due fact of some purebasic-internally limitations/bugs !! Until today its not possible to solve our problems with the latest PB version! (so we never released any "bugy" version... very sad!

Posted: Sat Nov 12, 2005 4:22 pm
by Polo
va!n wrote:We have startet coding a filesharing tool like emule, but started with the project before the first version of emule has been ever released! The program worked for 98% and had more features as emule dont has it today!

We must stopped the project due fact of some purebasic-internally limitations/bugs !! Until today its not possible to solve our problems with the latest PB version! (so we never released any "bugy" version... very sad!
Why not releasing it ? :)

Posted: Sat Nov 12, 2005 5:19 pm
by Nik
What Problems are impssoibel to solve?
Waorking on my P2P Filetransfer for our Messenger whichj has somewhat fileshareing (A XML implementation of shared folders) I really wonder what could be impossible to solve in PB forgetting that files over 4 gb are impossible without doubles^^ But hey that will be gone with version 4 :lol:

Posted: Sat Nov 12, 2005 6:22 pm
by Tranquil
Thee where several problems with our P2P Server and Client. As mentioned the first problem was the file size limit. It would be never possible to share huge files on the network.

Also mentioned here by Pantcho!! is the controll thread that fuXXed up by the strings-buffer limitation in threads. So we lost a lot time for recoding.

The Clients was stable enough to use, the mostly bugging part was the server and his search functions. It is absolutly nessesary to use threads for searches on server-side. And that was the end of the story. Till today: not possible, only with the use of an external database or you code your own String-Commands that are thread-save.

Now wait for 4.0 and lets see...

Mike

Posted: Sat Nov 12, 2005 6:51 pm
by va!n
@Tranquil:
Now wait for 4.0 and lets see... <<< :wink:

Posted: Sat Nov 12, 2005 7:17 pm
by Nik
Very interesting indeed
Yeah Threads are a big Probelm my Software uses a database to search for contacts but yeah a bit problematic there too because I still have to wait for the database to find the Users. Hopefully we will be able to solve these problems don't now how much will change with 4 considering network stuff but even without better Networ it will make things possible through the normal Thread safety I think.

Posted: Sat Nov 12, 2005 9:24 pm
by Tranquil
In most cases storing datas in a database like mySQL is the best way. But sometimes it is better to hold this datas in memory (as for a P2P-Server) couse they are changing very fast. In any other project I would use a normal database.

Posted: Sun Nov 13, 2005 11:39 am
by Nik
Yeah of cause we also store data in memory the databse only holds data which shell last even after a reboot. nFor example user accounts but the information who is logged in is stored in a structured LinkedList. It's working really good though my power test yesterday showed that there most be still a problem missing in my send and receive funtion really hard to design they are. I have got splitted messages and more than one message per buffer working but when sending with delay(0) on the local mashine probably 3 of 10 000 messages get coruppted and I really don't know how to solve that problem. Maybe we could work together in this and try especially when 4.0 comes to build a hundred percent working network function for sending and receiving strings.
bye Nik

Posted: Sun Nov 13, 2005 6:52 pm
by Tranquil
Are you using UDP or TCP to transport your datagrams?
Please check the Result of SendNetworkData() or Send_() (depends on what command you are use) Maybe a Socket_Error is returned.

On wich way do you catch the networkevents? Pooling or eventdriven?
I'm very intrested in your work. I see your home location is germany, maybe we should visit us in ICQ, Chat or somewhere else? :)

Mike

Posted: Sun Nov 13, 2005 8:22 pm
by Nik
Well yeah spend a few hours reseahrching today, seems that somehow I destoried the code handling splitted packages got it working again but couldn't test it with realy fast comming datagrams but with really long ones.
So untested is wether 1 normal and a splitted package together in one buffer are handled correctly maybe I have to change some lines for this I will test it tomorrow.
I am using TCP and because our server will have to work on Linux only standard Purebasic Networking which really doesn't help to make things easier. But from my experience I can say it's certanly possible. Though I see that my implemantation at the moment isn't working correctly will take some days ^^if you want I can PM you my Senden and receiving functions!
bye Nik

Posted: Sun Nov 13, 2005 8:40 pm
by Tranquil
Nik wrote:if you want I can PM you my Senden and receiving functions!
bye Nik
Please...