Bitcoin Forum
April 19, 2024, 10:34:15 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Introducing netvend beta: tradenet for users/scripts to transact and communicate  (Read 2175 times)
syriven (OP)
Newbie
*
Offline Offline

Activity: 31
Merit: 0


View Profile
April 15, 2014, 04:48:02 AM
Last edit: April 15, 2014, 08:02:17 AM by syriven
 #1

    Introduction and Summary

    I've recently finished the first prototype of netvend, a project I've been working on for about 9 months. Netvend can be thought of as a virtual vending machine, where users and developers can both spend and receive Bitcoin, for anything the Internet can think to offer or consume. If you or your script can offer some product, service, or art that someone else wants, netvend has the potential to monetize it, with very little additional effort from you.

    Netvend's utility centers around all agents (user or script) having access to four basic commands:

    • post any arbitrary data to netvend. No limits on total size, frequency of use, bandwidth, etc.
    • tip credit (with resolution to the microsatoshi) to another agent, optionally referencing a post entry as a memo or request
    • query the database for any part of its post or tip history, using any SQL SELECT statement
    • withdraw any credit into bitcoin

    Each command deducts credit from your agent, but the fees are on the order of 1/1000 of a single satoshi per command. I'll be giving out credit to anyone who wants to experiment with netvend--just respond with your agent's public address and I can send a tip. Or, just use the same seed the following links do, as that agent already has credit sitting on it meant for anyone to experiment with.

    When the api is used to access netvend, a command is generated and signed by your agent's Bitcoin keypair, then sent to netvend. Netvend uses the signature to verify your agent's identity, deducts the appropriate fee, processes the command, and stores the command and its signature. This command history is accessible via the query command, meaning that the entire database can be audited and verified by any interested party.

    This is all accessed pseudonymously, and no signup is required. The only thing you need to access netvend is Python 2.x, the netvend api, and netvend credit (for now, I'm giving away credit to anyone who wants to experiment). In the very near future there will be apis for other languages.

    How to use netvend

    If you'd like to try out netvend right away, this link explains how to create an agent and use the 3 basic commands (plus the withdraw command) to interact with netvend. It also includes a seed with some credit already on it, so you can try out netvend without worrying about making a deposit.

    Alternatively, there is the more abstracted netvendor module that allows you to quickly expose any arbitrary Python algorithm to the netvend community through "vends" (messages with payments attached). With only around 20 lines of Python code, your script can begin accepting payments, serving requests, and even automatically withdrawing any earned credit into bitcoin. With a few more lines of code, the script can pay for and use other scripts exposed in the same way as part of its own algorithm, without any cooperation from the original developers of those scripts. In the same way, someone else might include your script as part of their own algorithm.

    As I said, both of these links reference an agent seed that has credit already on it. Feel free to use this agent yourself to try out netvend. If you want you can even tip some credit away to your own, private agent--just don't take more than a few satoshi at once, as even a single satoshi is enough to fund hundreds of commands.

    The module explained in the second link is ultimately less powerful, but much simpler for anyone who just wants to expose an algorithm to payment in exchange for serving requests. The first link deals with the more basic api, which would be needed to make something more specific than a simple paid service. It's what I'm using to develop the chat program mentioned below, and ultimately this basic api will lead to the most exciting uses of netvend.

    Current state of netvend

    At the moment, netvend is similar to an Internet without websites, and its immediate utility is limited to cloud storage, networking / credit handling among an application's clients, and a very basic, low-level form of communication among developers. There's simply no community yet to interact with. However, netvend applications can be developed very rapidly once the framework is understood, and it won't take much to begin to grow netvend's community of services, and therefore its utility.

    Short-term potential of netvend

    Any application that requires either networking or credit handling can be built with netvend as its backend. In many cases, netvend would offer a few unique benefits that can't be found on any other platform or tool.

    For example, I'm putting together a chat program as the first example application of netvend. The chat program simply adds the prefix of "chat:[subject]:" to the message a user enters, and posts it to netvend. Meanwhile, it queries netvend for all posts with the same prefix and displays them. Each user uses their own agent, and this is all that's needed to facilitate a simple netvend chat program. Not only is this chat program extremely simple to develop for a project involving networking, but many positive characteristics of netvend are passed onto the chat program automatically:

    • Pseudonymity is not only supported, but encouraged and the default.
    • All messages are automatically cryptographically signed by each user's agent, and can be independently verified by any interested party.
    • The community is open by default: someone else could make a competing netvend chat program, yet still share the same chat history and community.
    • Because netvend is available to any device with http access, clients can be built for other platforms relatively easily (although at the moment, the device must have Python 2.x to run the netvend api).

    These benefits apply to any applications that need a central hub of communication/networking: chat programs, games, social networks, content aggregators, and more. I believe a lot of open-source projects would benefit from access to an open, secure community that's already functional (and can be easily accessed), rather than having to develop and use a private server that needlessly isolates its community from competing/complementary tools.

    Netvend allows competition between interfaces to a community, without fracturing the community itself. New clients with unique features could have a real chance at success, without having to overcome the incredibly massive inertia of the network effect.

    As another example of what I see in the short-term future of netvend, it would be a fairly simple project to create an email-like tool that supported sending credit with each message. By using this program with a specific agent, within minutes, any person in the world could begin to offer any product, service, or art they see a demand for, and get paid for it. Recall that this can be done pseudonymously, and without any signup required beyond an initial deposit.

    Technically, Bitcoin already makes this possible, but the logistics of the process are simply too much for many projects. Where and how do you advertise? How do you prove your service's quality? Where do you store your history, and how do users know to trust it? For many people who have something to offer, the list goes on, and any one of these problems can cast the entire project into infeasibility. With netvend, many of these problems disappear, allowing any content provider to connect with a paying audience with nothing more than Python and an Internet connection.

    Netvend offers a central, cryptographically secure hub for this kind of transactional activity, and exposing this framework to a user through an interface will be a simple matter. Automatic, unfakeable, and unerasable history for each agent ensures both that honesty is easy to prove, and that dishonesty is hard to hide. This will become even more true as tools are developed to analyse an agent's history, and as the community learns how to process netvend's history.

    For example, if I want to set up a service where I offer math tutoring, all I have to do is offer it for free at first, and I can begin to build my reputation. Then, either manually or with a tool designed for it, anyone can see for themselves whether I actually deliver, whether my help is any good, and how people respond to me.

    The same tool I'd use to offer a math tutoring service could be used for any kind of content-based service: contracting, professional advice, art-on-demand, counseling, medical/legal advice, etc. As it is, one would have to wait for something like coinMD to show up before offering their own medical advice for bitcoin, but netvend exposes a tradenet to anyone who has anything to offer, regardless of whether it fits into a mold someone else has already happened to build.

    In the same way that netvend scripts can incorporate each other, human-driven services can interact easily in the same way. For example, if someone I'm tutoring in math asks me a question that's only a little out of my area-of-expertise, I can enlist the help of another professional to fill the gaps in my own knowledge, and deliver a more complete answer in turn.

    Because scripts and human-driven services will both be accessed and used in the same way (through tips that reference data entries, or vends), scripts can incorporate human-driven services, and vise-versa.

    Long-term potential of netvend

    As services and tools are built with netvend as their backend, netvend will begin to accumulate a community and history built from transactions, communication, and other social activities. This community will be transparent and open to anyone: all non-encrypted information that's stored on netvend can be viewed, analyzed, and sorted by any agent with as much as a satoshi of credit.

    One of the more exciting things I see this leading to is a truly neutral, transparent, open-source social network and content aggregator--a sort of combination between the reddits and facebooks of today, where anyone can build a tool that has complete access to all of the non-encrypted information on the network. Imagine Reddit with a search function that isn't trash, or Facebook with a choice of interfaces, and all offered without ads, as the server is already compensated with each use.

    Granted, users would have to pay for the network--as with all netvend tools--but only enough to cover the actual cost of processing. Facebook only costs about $5/year per user, according to a quick google search. I don't think I'm alone when I say that's well worth a transparent, open, ad-free Facebook that I can access through any client anyone wants to write, and which doesn't actively isolate me from every competing social network.

    Conclusion

    In short, netvend offers some utility right away, like cloud storage, pay-per-use backend networking / credit handling, and a very basic form of a tradenet. In the very near future, I see a lot of simple tools being developed for netvend like chat programs, tradenet tools, agent history analyzation, and a growing network of various services and scripts. Each new netvend tool or service will increase netvend's utility. At the same time, the design and code of netvend itself (which is, of course, completely open-source) will be exposed to more minds than my own (and certainly better server administrators), and will evolve and fork to serve its community better as time goes on.

    In the long-term, I believe the community and network of tools will grow into its own, unique resource, offering a hub for both social communication and transactional activity, which anyone can access and participate in. Because this network is open to any developer that has an idea for a new feature, I see it eventually outpacing any currently-existing alternative, given some initial momentum.

    So--let me know what you think, and thanks for reading![/list]
    1713566055
    Hero Member
    *
    Offline Offline

    Posts: 1713566055

    View Profile Personal Message (Offline)

    Ignore
    1713566055
    Reply with quote  #2

    1713566055
    Report to moderator
    Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
    Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
    1713566055
    Hero Member
    *
    Offline Offline

    Posts: 1713566055

    View Profile Personal Message (Offline)

    Ignore
    1713566055
    Reply with quote  #2

    1713566055
    Report to moderator
    1713566055
    Hero Member
    *
    Offline Offline

    Posts: 1713566055

    View Profile Personal Message (Offline)

    Ignore
    1713566055
    Reply with quote  #2

    1713566055
    Report to moderator
    1713566055
    Hero Member
    *
    Offline Offline

    Posts: 1713566055

    View Profile Personal Message (Offline)

    Ignore
    1713566055
    Reply with quote  #2

    1713566055
    Report to moderator
    syriven (OP)
    Newbie
    *
    Offline Offline

    Activity: 31
    Merit: 0


    View Profile
    April 15, 2014, 08:26:15 AM
     #2

    Here's a script I wrote, to monitor new activity. I figured I'd post it here as a good example of how easily one can analyse netvend's database for some arbitrary use.

    I wanted to write a script which would return any new events, but filter out the activity of the withdraw script. I also needed to filter out the activity of the script itself.

    Code:
    import netvend, pickle, pprint

    #create an agent
    agent = netvend.Agent('my super super secret seed', seed=True)

    #load last_id from pickled file, to make sure we only get new history from netvend
    f = open('last_id.dat', 'rb')
    last_id = pickle.load(f)
    f.close()

    #write a query to get history_id, address, and command columns
    #where the address is neither 1LWfK... (the withdraw script, which runs regularly) or the address of the current agent
    #and where the id of the history row is above our loaded last_id
    query = """
    SELECT history_id, address, command
    FROM history WHERE address NOT IN
    ('""" + agent.get_address() + """', '1LWfKYb7uUHPsHDoNxdKDir2D2diKLjWx2')
    AND history_id > """ + str(last_id)

    #send the query and get the resulting rows
    response = agent.query(query)
    rows = response['command_result']['rows']
    if len(rows) > 0:
        pprint.pprint(rows)
       
        #update the last_id variable to reflect the first field (history_id) from the last row returned
        last_id = int(rows[-1][0])

    #finally, pickle our last_id for the next time the script is run.
    f = open('last_id.dat', 'wb')
    pickle.dump(last_id, f)
    f.close()

    I now have a script that gives me an idea of if and how netvend is being used, besides the withdraw script and this script itself.
    dance4x
    Full Member
    ***
    Offline Offline

    Activity: 143
    Merit: 100



    View Profile
    April 16, 2014, 09:09:41 PM
     #3

    Is this something similar to Bitcloud where it can be used as the basis for decentralized apps? Not clear to me as to whether or not netvend is a distributed database or something that runs on a centralized server.
    syriven (OP)
    Newbie
    *
    Offline Offline

    Activity: 31
    Merit: 0


    View Profile
    April 16, 2014, 10:30:07 PM
     #4

    Netvend runs on a centralized server. Its strength lies in offering access to an open, provably honest database to any script, within 3 lines of Python code.
    JstnPwll
    Member
    **
    Offline Offline

    Activity: 92
    Merit: 10


    View Profile
    June 11, 2014, 09:09:29 PM
     #5

    I'm not sure I comprehend it entirely, which is probably a good thing (means nothing quite like it exists yet to compare to!) But it sounds incredibly powerful if used correctly. I'd be interested to fiddle around with it and perhaps contribute. I haven't done a lot of work with Python, but it might be a good learning experience for me.

    Developer, entrepreneur, idea-seeker.
    BTC: 14MP75VG3Nf53pSEjowmA9gVPVvEvNpabz
    Pages: [1]
      Print  
     
    Jump to:  

    Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!