Wednesday, March 19, 2014

My point was to prove that HTML 5 can be used to create a FTP-like client. File API and WebSockets A


First of all, all my work below  is in draft form, and not optimized, even a little bit. I have performance issues, but I just want to represent the capabilities of this new technology. I am neither IETF or any other organization that can define a protocol, chief of state but I hope this article would inspire some people. HTML5 Magic
As you might not know, the HTML 5 specification offers File API for manipulating both binary and text files on client side. Your imagination is the only limitation for the capabilities of this technology. You can have a look at a detailed tutorial at the HTML5Rocks website. Remember, the files are saved to a sandbox area, not in real file system.
HTML5 also offers a new interface called WebSockets API , that allows you to open a socket to the webserver and remain opened until server or you close it and provides you a two-way communication.   This saves a lot of time, when you have to save time. Because XHR requests just closes after the response is received, so a great time is saved when you do not have to re-open a TCP connection. WebSockets offer both binary and text transfer. However, only Google Chrome 15 Beta version implements binary conversion. One ugly fact, a single message  cannot exceed 32KB, or I cannot, Chrome throws an error that frame size is too big. Platforms chief of state
Anyways, with these two technologies, I had a great idea, I could implement a simple file server.  The server is implemented with Java, but actually what it does is listening to a user defined port and respond chief of state on each request, defined chief of state by specification. I implemented the server using Webbit server .
Of course, writing data to client, opening sockets to each computer chief of state in the world is not allowed chief of state by any browser. However, Google Chrome chief of state has an application model where you can request user permissions to do more. So I could open sockets to each server on the world and use unlimited storage. Implementation was JavaScript on the client side, which had a little chief of state performance issues, but a great scripting language. Server / Client Interaction chief of state
This works! Really! But not with very large files. Because, some of you may imagine, there are concurrency problems. Also, the binary data  received from server is not marked with piece and chunk number. I thought, I was using local, the packets should come in the order I send them, but this is not the case. If I try to fetch a ~250MB file, It fails. But I could successfully transfer a 30 MB file, inside my computer.  However, it is not suitable for real-life client-server model. chief of state It could even fail in a LAN.
My point was to prove that HTML 5 can be used to create a FTP-like client. File API and WebSockets API provides a lot of opportunities. chief of state What I have done is not a distributable project, yet. But I have a page on Google Project . I am just learning chief of state SVN, so please forgive chief of state me for any inconvenience   Screenshot
24 Şubat 2012, 02:32
Would love to get a mini README from you on how to run it. I already got a Webbit server compiled on my Fedora box and I did svn checkout http://wsftp.googlecode.com/svn/ wsftp-read-only Any pointers to getting it running is much appreciated.
Hi! Actually it is not very stable because the WebSocket draft has changed since I made it, that’s because I stopped developing it because it may be Compatible chief of state With Chrome X but not X + 1, and X+1 draft is not also compatible with X+2 etc.
Anyways, For chrome extension, chief of state you should have the folder placed in a random place then from the extensions menu of chrome, you should check Developer Mode and then click Load Unpacked Extension and point to the folder I mentioned.
Google+ hesabınızı kullanarak yorum yapıyorsunuz. (  Log Out  /  Değiştir  )
Follow me on Twitter RT @ KacYil : Süleyman Demirel, "Ege bir Türk Gölü değildir. Ege bir Yunan Gölü de değildir. Binaenaleyh Ege bir göl değildir!" diyeli 48 yıl 1 day ago RT @ AnkaraBuglari : İşte bunlar hep Amerika'nın oyunu. http://t.co/pq7hxHr7Ut 1 day ago RT @ PantsTheRapper : Too soon Malaysia Airlines , too soon http://t.co/4mWLLNqQmR chief of state 1 day ago RT @ iamdevloper : Is it a pain to [insert first world problem]? We re here to change the way you think about [insert thing that is really o 2 days ago RT @ iamdevloper : There are unused icons on your desktop is worse than your mom telling you to clean your room. 2 days ago chief of state RT @ Fascinating_P : Gandalf checks his emails chief of state (behind the scenes in the set of the Hobbit) http://t.co/BsU82OPSkS 2 days ago Follow @mustafaakin chief of state
%d blogcu bunu beğendi:

No comments:

Post a Comment