elective-stereophonic
elective-stereophonic
NXTorrent
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Stable Nxt Client: Nxt 1.12.2

Pages: [1] 2 3 ... 9  All

Author Topic: NXTorrent  (Read 29341 times)

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
NXTorrent
« on: April 13, 2014, 03:56:26 pm »

This is Anon's project where there will be an ebay style auction, but with the descriptions of the item via magnet link. At least eventually it will be, initially it will just be a URL. Once the magnet links are there, it will also be a torrent listing site.

the following is my initial stab at the websockets API

http://127.0.0.1/NXTorrent?{"requestType":"list","NXT":"8989816935121514892","details":{<json of listing>}}
returns {"result":"good","listingid":"1234567"}

http://127.0.0.1/NXTorrent?{"requestType":"status","NXT":"8989816935121514892","listingid":"1234567"}}
returns {"result":"good","status":"open"} or sold or cancelled

http://127.0.0.1/NXTorrent?{"requestType":"cancel","NXT":"8989816935121514892","listingid":"1234567"}}
returns {"result":"good","status":"cancelled"}

http://127.0.0.1/NXTorrent?{"requestType":"listings","NXT":"8989816935121514892","filter":[<filters>]}
returns {"result":"good","listings":["224567","185483",...]}

The {<json of listing>} should specify all the key things, but it is free form and totally up to you. Probably need to standardize on some standard fields like "URL", "price", etc.

The <filter description> would allow limiting the output to specific NXT accounts by putting in {"NXT":"8989816935121514892"}
If you want to just see all listings of that had "type" == "dogs" in their <json of listing>, then filter would be {"type":"dogs"}
You can combine filters so ["NXT":"8989816935121514892","type":"dogs"] would return all the dog listings by NXT acct 8989816935121514892

http://127.0.0.1/NXTorrent?{"requestType":"postfeedback","NXT":"8989816935121514892","listingid":"1234567","feedback":{<json of feedback>}}

http://127.0.0.1/NXTorrent?{"requestType":"buy","NXT":"8989816935121514892","listingid":"1234567"}


James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: NXTorrent
« Reply #1 on: April 13, 2014, 04:24:42 pm »

thanks james. following.
Logged

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: NXTorrent
« Reply #2 on: April 13, 2014, 04:38:11 pm »

i dont think we should make this program a wallet of any sort of handle any nxt in any way. i would like to avoid the security implications of that. probably i think it should just analyze the blockchain, extract the relevant information, organize and display it in a user friendly way, and then provide a way of crafting the sorts of arbitrary messages that you need.

so for example if you find an item that you want to buy, then you can click "purchase this item" and it will pop up with a dialogue box with sections to fill out with required information. such as address and name. When you fill the fields out it will generate specific instructions in addition to an automatically generated arbitrary message for you to just copy over to your client of choice.

on the sell side you just click "sell an item" and a similar dialogue box pops up with fields like price, quantity, expiration date ect... and then a link to an html file that i can create a magnet link for, anything else i missed, and format that all into the relevant am that they need to just copy and paste over to their client of choice.
Logged

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #3 on: April 13, 2014, 04:51:24 pm »

i dont think we should make this program a wallet of any sort of handle any nxt in any way. i would like to avoid the security implications of that. probably i think it should just analyze the blockchain, extract the relevant information, organize and display it in a user friendly way, and then provide a way of crafting the sorts of arbitrary messages that you need.

so for example if you find an item that you want to buy, then you can click "purchase this item" and it will pop up with a dialogue box with sections to fill out with required information. such as address and name. When you fill the fields out it will generate specific instructions in addition to an automatically generated arbitrary message for you to just copy over to your client of choice.

on the sell side you just click "sell an item" and a similar dialogue box pops up with fields like price, quantity, expiration date ect... and then a link to an html file that i can create a magnet link for, anything else i missed, and format that all into the relevant am that they need to just copy and paste over to their client of choice.
It would make it much simpler if the NXTorrent could actually directly issue the AM's,that avoids all the cut and pasting. It could use an acct specially made (automatically) for this use. You just need to send it enough NXT to pay for the AM txfees

I can change the "buy" command to "reservelisting", the GUI would have already gathered all the info, so when the user clicks the buy button, the "reservelisting" AM is sent. The user is prompted to send the NXT via whatever client. There would need to have been enough info in the reservelisting AM to allow correlating the payment that is made independently.

This way it stays convenient for the user and also avoids any money contact, other than for AM tx fees

What do you think?

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: NXTorrent
« Reply #4 on: April 13, 2014, 06:20:03 pm »

i dont think we should make this program a wallet of any sort of handle any nxt in any way. i would like to avoid the security implications of that. probably i think it should just analyze the blockchain, extract the relevant information, organize and display it in a user friendly way, and then provide a way of crafting the sorts of arbitrary messages that you need.

so for example if you find an item that you want to buy, then you can click "purchase this item" and it will pop up with a dialogue box with sections to fill out with required information. such as address and name. When you fill the fields out it will generate specific instructions in addition to an automatically generated arbitrary message for you to just copy over to your client of choice.

on the sell side you just click "sell an item" and a similar dialogue box pops up with fields like price, quantity, expiration date ect... and then a link to an html file that i can create a magnet link for, anything else i missed, and format that all into the relevant am that they need to just copy and paste over to their client of choice.
It would make it much simpler if the NXTorrent could actually directly issue the AM's,that avoids all the cut and pasting. It could use an acct specially made (automatically) for this use. You just need to send it enough NXT to pay for the AM txfees

I can change the "buy" command to "reservelisting", the GUI would have already gathered all the info, so when the user clicks the buy button, the "reservelisting" AM is sent. The user is prompted to send the NXT via whatever client. There would need to have been enough info in the reservelisting AM to allow correlating the payment that is made independently.

This way it stays convenient for the user and also avoids any money contact, other than for AM tx fees

What do you think?

James

its clever. do you think it might also be able to be leveraged up to solve the problem of what if 2 people try to buy the same thing at the same time?
Logged

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #5 on: April 13, 2014, 06:39:24 pm »

its clever. do you think it might also be able to be leveraged up to solve the problem of what if 2 people try to buy the same thing at the same time?
Yes.

buyer(s) submit
http://127.0.0.1/NXTorrent?{"requestType":"makeoffer","NXT":"8989816935121514892","listingid":"1234567"}

In the event more than one offer comes in, the seller can choose which buyer he wants to sell to. It could be as simple as buyer promising a bit extra than listing price, or just random chance.

seller would:
http://127.0.0.1/NXTorrent?{"requestType":"acceptoffer","NXT":"11445347041779652448","listingid":"1234567","buyer":"8989816935121514892"}

buyer could wait for the acceptoffer or just:
http://127.0.0.1/NXTorrent?{"requestType":"status","NXT":"8989816935121514892","listingid":"1234567"}}
returns {"status":"sold","buyer":"8989816935121514892"}
and then would send in payment, subsequent status would return:  {"status":"sold","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

After enough confirmations seller delivers product and posts feedback
http://127.0.0.1/NXTorrent?{"requestType":"postfeedback","NXT":"11445347041779652448","listingid":"1234567","feedback":{<json of feedback>}}
status changes to: {"status":"intransit","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

when buyer receives product
{"requestType":"postfeedback","NXT":"8989816935121514892","listingid":"1234567","feedback":{<json of feedback>}}
status changes to: {"status":"completed","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

or

status changes to: {"status":"disputed","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

I think I got all the cases, of course the exact fields will change, but you get the idea.

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: NXTorrent
« Reply #6 on: April 13, 2014, 07:00:16 pm »

its clever. do you think it might also be able to be leveraged up to solve the problem of what if 2 people try to buy the same thing at the same time?
Yes.

buyer(s) submit
http://127.0.0.1/NXTorrent?{"requestType":"makeoffer","NXT":"8989816935121514892","listingid":"1234567"}

In the event more than one offer comes in, the seller can choose which buyer he wants to sell to. It could be as simple as buyer promising a bit extra than listing price, or just random chance.

seller would:
http://127.0.0.1/NXTorrent?{"requestType":"acceptoffer","NXT":"11445347041779652448","listingid":"1234567","buyer":"8989816935121514892"}

buyer could wait for the acceptoffer or just:
http://127.0.0.1/NXTorrent?{"requestType":"status","NXT":"8989816935121514892","listingid":"1234567"}}
returns {"status":"sold","buyer":"8989816935121514892"}
and then would send in payment, subsequent status would return:  {"status":"sold","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

After enough confirmations seller delivers product and posts feedback
http://127.0.0.1/NXTorrent?{"requestType":"postfeedback","NXT":"11445347041779652448","listingid":"1234567","feedback":{<json of feedback>}}
status changes to: {"status":"intransit","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

when buyer receives product
{"requestType":"postfeedback","NXT":"8989816935121514892","listingid":"1234567","feedback":{<json of feedback>}}
status changes to: {"status":"completed","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

or

status changes to: {"status":"disputed","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

I think I got all the cases, of course the exact fields will change, but you get the idea.

James

yea it sounds like it could work. the one thing i would say though is to think really hard about any ways in which steps could be eliminated. space on a blockchain can be very expensive, perhaps not right this moment but in the future you know. ill be thinking about it also.
Logged

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #7 on: April 13, 2014, 07:18:01 pm »

its clever. do you think it might also be able to be leveraged up to solve the problem of what if 2 people try to buy the same thing at the same time?
Yes.

buyer(s) submit
http://127.0.0.1/NXTorrent?{"requestType":"makeoffer","NXT":"8989816935121514892","listingid":"1234567"}

In the event more than one offer comes in, the seller can choose which buyer he wants to sell to. It could be as simple as buyer promising a bit extra than listing price, or just random chance.

seller would:
http://127.0.0.1/NXTorrent?{"requestType":"acceptoffer","NXT":"11445347041779652448","listingid":"1234567","buyer":"8989816935121514892"}

buyer could wait for the acceptoffer or just:
http://127.0.0.1/NXTorrent?{"requestType":"status","NXT":"8989816935121514892","listingid":"1234567"}}
returns {"status":"sold","buyer":"8989816935121514892"}
and then would send in payment, subsequent status would return:  {"status":"sold","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

After enough confirmations seller delivers product and posts feedback
http://127.0.0.1/NXTorrent?{"requestType":"postfeedback","NXT":"11445347041779652448","listingid":"1234567","feedback":{<json of feedback>}}
status changes to: {"status":"intransit","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

when buyer receives product
{"requestType":"postfeedback","NXT":"8989816935121514892","listingid":"1234567","feedback":{<json of feedback>}}
status changes to: {"status":"completed","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

or

status changes to: {"status":"disputed","buyer":"8989816935121514892","paid":"<amount>","confirmations":"<N>"}

I think I got all the cases, of course the exact fields will change, but you get the idea.

James

yea it sounds like it could work. the one thing i would say though is to think really hard about any ways in which steps could be eliminated. space on a blockchain can be very expensive, perhaps not right this moment but in the future you know. ill be thinking about it also.
I could collapse the whole makeoffer/acceptoffer into an off blockchain comms, with just the final transaction posted, maybe even including feedbacks from the seller

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #8 on: April 13, 2014, 09:38:32 pm »

I got the list function implemented

Syntax is array of two objects, the first one describes the request, the second one is the token created using the first object as the "website". Strip all whitespaces. For now, I wont be enforcing this, but might as well get all the syntax in place up front. The listing itself is a JSON object with what ever fields you want.

http://127.0.0.1:7777/NXTorrent?[{"requestType":"list","NXT":"8989816935121514892","listing":{"type":"doggies",...}},{"token":"39897489327"}]

The listing JSON gets written to an AM, which then all nodes that are running NXTorrent handler would get passed as an argument to the AM handler.

I had to do all this for multigateway, but I realized it was a lot of tedious work that I could generalize. A purely AM based NXTprotocol handler is just few days work, all depends on what exactly it needs to do

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #9 on: April 14, 2014, 12:10:21 am »

Got the rest implemented, all but the actual processing of AM's

    static char *listings[] = { (char *)listings_func, "listings", "", "NXT", "filters", 0 };
    static char *list[] = { (char *)list_func, "list", "", "NXT", "listing", 0 };
    static char *status[] = { (char *)status_func, "status", "", "NXT", "listingid", 0 };
    static char *cancel[] = { (char *)cancel_func, "cancel", "", "NXT", "listingid", 0 };
    static char *makeoffer[] = { (char *)makeoffer_func, "makeoffer", "", "NXT", "listingid", "bid", 0 };
    static char *acceptoffer[] = { (char *)acceptoffer_func, "acceptoffer", "", "NXT", "listingid", "buyer", 0 };
    static char *feedback[] = { (char *)feedback_func, "feedback", "", "NXT", "aboutbuyer", "aboutseller", 0 };

Testing, hope to be able to make a Mac release soon

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: NXTorrent
« Reply #10 on: April 14, 2014, 12:14:31 am »

Got the rest implemented, all but the actual processing of AM's

    static char *listings[] = { (char *)listings_func, "listings", "", "NXT", "filters", 0 };
    static char *list[] = { (char *)list_func, "list", "", "NXT", "listing", 0 };
    static char *status[] = { (char *)status_func, "status", "", "NXT", "listingid", 0 };
    static char *cancel[] = { (char *)cancel_func, "cancel", "", "NXT", "listingid", 0 };
    static char *makeoffer[] = { (char *)makeoffer_func, "makeoffer", "", "NXT", "listingid", "bid", 0 };
    static char *acceptoffer[] = { (char *)acceptoffer_func, "acceptoffer", "", "NXT", "listingid", "buyer", 0 };
    static char *feedback[] = { (char *)feedback_func, "feedback", "", "NXT", "aboutbuyer", "aboutseller", 0 };

Testing, hope to be able to make a Mac release soon

James

I like that. people will list the asking price but anyone who wants can offer anything they want and the seller can accept or deny any offer he wants. Not really an auction or a buy it now either. More like real life transactions.

*edit* so does this sound right to you? the transaction hash of the transaction used to post the auction will be our "advertisement id" sort of thing that we use to allow the buyer to specify what item he is purchasing, and to enforce the 1 feedback per sale rule?
« Last Edit: April 14, 2014, 12:20:13 am by anon136 »
Logged

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #11 on: April 14, 2014, 12:41:12 am »

Got the rest implemented, all but the actual processing of AM's

    static char *listings[] = { (char *)listings_func, "listings", "", "NXT", "filters", 0 };
    static char *list[] = { (char *)list_func, "list", "", "NXT", "listing", 0 };
    static char *status[] = { (char *)status_func, "status", "", "NXT", "listingid", 0 };
    static char *cancel[] = { (char *)cancel_func, "cancel", "", "NXT", "listingid", 0 };
    static char *makeoffer[] = { (char *)makeoffer_func, "makeoffer", "", "NXT", "listingid", "bid", 0 };
    static char *acceptoffer[] = { (char *)acceptoffer_func, "acceptoffer", "", "NXT", "listingid", "buyer", 0 };
    static char *feedback[] = { (char *)feedback_func, "feedback", "", "NXT", "aboutbuyer", "aboutseller", 0 };

Testing, hope to be able to make a Mac release soon

James

I like that. people will list the asking price but anyone who wants can offer anything they want and the seller can accept or deny any offer he wants. Not really an auction or a buy it now either. More like real life transactions.

*edit* so does this sound right to you? the transaction hash of the transaction used to post the auction will be our "advertisement id" sort of thing that we use to allow the buyer to specify what item he is purchasing, and to enforce the 1 feedback per sale rule?
I originally had it that way, but the problem was I needed to generate JSON for the listing and put it in the AM, so dont have the txid until after it is submitted. I just calculate my own hash function for now based on seller and listing txt.

Got the listing function tested:

http://127.0.0.1:7777/NXTorrent?{%22requestType%22:%22list%22,%22NXT%22:%228989816935121514892%22,%22listing%22:[{%22price%22:%22123%22},{%22URI%22:%22http://www.NXTorrent.com%22},{%22type%22:%22doggies%22}]}

-->

{
   "seller":   "8989816935121514892",
   "listingid":   "10199267259341813669",
   "price":   "123.00000000",
   "status":   "active listing",
   "listedtime":   12141360,
   "URI":   "http://www.NXTorrent.com",
   "listing":   "[{\"price\":\"123\"},{\"URI\":\"http://www.NXTorrent.com\"},{\"type\":\"doggies\"}]"
}

That was one of the harder functions, the rest should test out pretty quick

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #12 on: April 14, 2014, 12:54:23 am »

http://127.0.0.1:7777/NXTorrent?[{%22requestType%22:%22listings%22,%22NXT%22:%228989816935121514892%22},{%22token%22:%22not%20a%20real%20token%22}]

works:

["11366926552051493165", "832762510949887668", "12579746999824526313", "10989569746855179394", "18246329085810606926"]
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #13 on: April 14, 2014, 12:59:35 am »

http://127.0.0.1:7777/NXTorrent?[{%22requestType%22:%22status%22,%22NXT%22:%228989816935121514892%22,%22listingid%22:%22832762510949887668%22},{%22token%22:%22not%20a%20real%20token%22}]

{
   "seller":   "8989816935121514892",
   "listingid":   "832762510949887668",
   "price":   "123.00000000",
   "status":   "active listing",
   "listedtime":   12142369,
   "URI":   "http://www.NXTorrent.com",
   "listing":   "[{\"price\":\"123\"},{\"URI\":\"http://www.NXTorrent.com\"},{\"type\":\"doggies\"}]",
   "listingAMtxid":   "5803572008117944145"
}

http://127.0.0.1:7777/NXTorrent?[{%22requestType%22:%22cancel%22,%22NXT%22:%228989816935121514892%22,%22listingid%22:%22832762510949887668%22},{%22token%22:%22not%20a%20real%20token%22}]
{
   "result":   "good",
   "AMtxid":   "17830353010248198133"
}

now the status call returns:    "status":   "cancelled listing",

Only a few more to go before I merge HTML file from PoofKnuckle
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #14 on: April 14, 2014, 01:04:48 am »

makeoffer:
http://127.0.0.1:7777/NXTorrent?[{%22requestType%22:%22makeoffer%22,%22NXT%22:%228989816935121514892%22,%22listingid%22:%2211366926552051493165%22,%22bid%22:[{%22part1%22:%22blad%22,%22part2%22:%22bleh%22}]},{%22token%22:%22not%20a%20real%20token%22}]

status changed to offer pending

accepted offer
http://127.0.0.1:7777/NXTorrent?[{%22requestType%22:%22acceptoffer%22,%22NXT%22:%228989816935121514892%22,%22listingid%22:%2211366926552051493165%22,%22buyer%22:%2211445347041779652448%22},{%22token%22:%22not%20a%20real%20token%22}]

status changed to:
{
   "seller":   "8989816935121514892",
   "listingid":   "11366926552051493165",
   "price":   "123.00000000",
   "status":   "offer accepted",
   "listedtime":   12142369,
   "buyer":   "11445347041779652448",
   "listing":   "[{\"price\":\"123\"},{\"type\":\"doggies\"}]",
   "listingAMtxid":   "13157019347979849470"
}
also buyer is there

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #15 on: April 14, 2014, 01:50:33 am »

I added a special command "changeurl" so you can point it anywhere to get the HTML file that is loaded when
127.0.0.1:7777 is accessed (without any args)

http://127.0.0.1:7777/NXTorrent?{%22requestType%22:%22changeurl%22,%22URL%22:%22/Users/jl777/Documents/NXTprotocol.html%22}

This version only works on Macs and while it writes out data to AM's and even sees them, it doesnt do anything with it. Couldnt get all that done in the 5 hours I spent so far. ~500 lines and just need to parse the AM and implement search filtering. hashtables are used, so access will be fast. 

After all the delays with multigateway (testnet is still wonky for me), it was good to have a project where I could feel productive. I did manage to get a deposit into multigateway and a withdraw process started, but multisig is being cranky now. Hopefully I can get that fixed and then beta release multigateway too

https://github.com/jl777/NXTprotocol/tree/master/NXTorrent has the source for the NXTorrent handler

http://209.126.71.170/NXTorrent.zip has a very rough release for Mac's only. Just open the ZIP file and run NXTorrent
goto 127.0.0.1:7777/NXTorrent?{"requestType":"changeurl","URL":"/path to NXTprotocol.html"}

Now 127.0.0.1:7777 without anything else will bring up the NXTprotocol.html page and when it is done you wont need to do manual commands via URL

James

P.S. I think I will try to figure out torrent stuff, now that the struture is in place that is really the only major piece left to do
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: NXTorrent
« Reply #16 on: April 14, 2014, 02:38:50 am »

do you need a field for seller id? what if that is simply interpreted as the destination address of the arbitrary message?
Logged

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #17 on: April 14, 2014, 03:11:59 am »

do you need a field for seller id? what if that is simply interpreted as the destination address of the arbitrary message?
I am envisioning having a temporary account that is controlled by the software and coordinating with the actual client software for generating tokens.

In any case, the time for optimizing is after it is fully functional. After 8 hours from start of coding, I think it is a bit premature to be pruning fields. Optimization is a totally different mindset than proof of concept.

James

P.S. making good progress on the torrent side, but I cant find many magnet links to test with. Do you have any or a place to get them?
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer

anon136

  • Hero Member
  • *****
  • Karma: +86/-19
  • Offline Offline
  • Posts: 1015
    • View Profile
Re: NXTorrent
« Reply #18 on: April 14, 2014, 03:34:18 am »

do you need a field for seller id? what if that is simply interpreted as the destination address of the arbitrary message?
I am envisioning having a temporary account that is controlled by the software and coordinating with the actual client software for generating tokens.

In any case, the time for optimizing is after it is fully functional. After 8 hours from start of coding, I think it is a bit premature to be pruning fields. Optimization is a totally different mindset than proof of concept.

James

P.S. making good progress on the torrent side, but I cant find many magnet links to test with. Do you have any or a place to get them?

you know what. this is starting to go over my head. clearly you know a lot more about the minutiae of implementing this sort of thing than i do. I think the best i can do at this point is, with a little luck, offer a bit of inspiration here or there. :D

*edit* http://eztv.it/shows/429/bobs-burgers/ press the little u shaped icon to the right of each episode. or on http://thepiratebay.se/ the torrents don't actually have any option other than magnet links.

*edit2* actually this might be easier. here is an actual magnet link: magnet:?xt=urn:btih:BKYHNFS7U6IV6UAKLFKPWSR6B4S33FJQ&dn=Bobs.Burgers.S04E16.PROPER.HDTV.x264-2HD&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.publicbt.com:80&tr=udp://tracker.istole.it:80&tr=udp://open.demonii.com:80&tr=udp://tracker.coppersurfer.tk:80
« Last Edit: April 14, 2014, 03:37:52 am by anon136 »
Logged

jl777

  • Hero Member
  • *****
  • Karma: +718/-123
  • Offline Offline
  • Posts: 6170
    • View Profile
Re: NXTorrent
« Reply #19 on: April 14, 2014, 03:01:13 pm »

I pushed a new release to https://github.com/jl777/NXTprotocol/tree/master/NXTorrent
http://209.126.71.170/NXTorrent.zip

This one processes AMs, so all nodes running NXTorrent should have the same state, expect in a few cases the one that generates the AM will have a slightly advanced status than the rest of the nodes.

Feedback is much more sane now. Buyers and Sellers give each other ratings and an optional details. This is then stored in AM's and broadcast. Dont have anything that compiles cumulative feedback histories, but that's just a few hours of work fiddling with data already internal in RAM.

When you ask for status on a listing, it displays the listing info, feedbacks and if there is a URI it also fetches that data. Currently, only URL's are supported, but I have it in the code where there is a single place to add in full URI support. I am leaning toward installing third party torrent programs and issuing requests to those programs, rather than reinvent the wheel. the net effect is the same, as the content will appear from magnet links. Hope that is OK.

Other than finding and interfacing to the torrent programs, I think all I have left to do is filtering search results (currently capped at 100) and fixing bugs. If you have ideas on how to specify filtering of search results within JSON array, let me know. [{filterA},{filterB}..] each filter would be {"field":"name", "min":<minval>, "max":<maxval>}

I think the above will allow for pretty good flexibility, exact matches can be specified with minval == maxval
Since there arent any large number of listings yet, I was going to wait before completing the filtering

If I can get some third party torrent programs connected up, I could be done today, other than bug fixes. Maybe somebody can start testing this more than my one testcase thoroughness. Also, source review especially on status changes would be nice.

James
Logged
There are over 1000 people in SuperNET slack! http://slackinvite.supernet.org/ automatically sends you an invite

I am just a simple C programmer
Pages: [1] 2 3 ... 9  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly