PDA

View Full Version : Shop Autopricer (Testing requested)



AliasXNeo
12-17-2014, 04:52 PM
Greetings,

I'm starting to rollout some of the programs resulting from my work on Neolib v2. The first (and hopefully last) method I'm rolling out with is Docker. My reasoning behind this choice is as follows:


Docker is gaining widespread attention across multiple communities and is growing at an incredible rate. Thus the number of third-party companies finding methods to adopting and hosting containers is increasing.
Most issues with using Python as the primary language for the end-user is that it requires a tad bit of technical information for the end-user to get a successful install. Just to get my library working on Windows required over 10 different steps (thanks to the lack of native compiling). Containerizing the Python script with Docker avoids all of these issues.
Network speed is the biggest variable with the efficiency of these types of programs. However, cloud architecture is still somewhat difficult to master and getting apps built for a native desktop environment to work in the cloud can be tricky. Many cloud companies are welcoming Docker with open arms thus making it easier to get these programs in the cloud and operating at incredible speeds.
Finally, the above bullet point can also be applied to hardware challenges (although not as significantly).
The first program I've built using this architecture is a simple shop autopricer. It logs into the given account, loads the user shop inventory, prices each item via the shop wizard, and then updates the shop with the calculated price (average or minimum is supported at the time of writing this).


This program is really not intended to be fancy and the main reason I'm releasing it right now is for testing how well the deployment method works. In the future I plan on integrating a small-scale web server into the container which will provide a graphical interface to the programs (for those scared of the command line).

Here is a quick breakdown on getting up and running:


Go here ([Only registered and activated users can see links]) and follow the instructions for installing Docker on your operating system
If on Mac OSX or Windows ensure you run the virtual machine and start docker as per the installation instructions
Once you're in a command-line (either by starting the virtual machine or opening up a command line on Linux), enter the following command:

docker pull jmgilman/neoapps
This will download the latest neoapps image. Please note this is a large download initially, however any future updates will not require downloading the entire image again and therefore should go fairly quickly.
When the download is finished issue the following command to test the autopricer:

docker run -t jmgilman/neoapps ./start pricer -u [username] -p [password]
Ensure you substitute 'username' and 'password' with your Neopets account username and password.


The program should login in to your account, find any unpriced items, price them, update the shop, and then quit.
If you can successfully do the above steps, please reply below so I have an idea of how well this method is working. It's much appreciated, thank you!

---------- Post added at 04:52 PM ---------- Previous post was at 04:32 PM ----------

Also, for those concerned or curious the source code for this can be seen here: [Only registered and activated users can see links]

The ./start is simply a shell script which executes the 'run.py' file with the passed arguments. Of course, you can always terminal into the container itself and check it out if you don't believe me :)

j03
12-17-2014, 06:23 PM
This is fucking awesome. I have an auto-pricer that works perfectly for me (I really need to update the one on the forum) but with your method of providing such a solution I am willing to get Docker and fuck around with it for fun. Great stuff man! Will provide results later.

Edit: In case anyone is wondering, and I apologies if you mentioned it already, but maybe it's a good idea to make it clear that this program is exchanging information with the files on the end-user computer and NOT to any server (like github or a Docker server), so the Neopets account information is not being captured except with the Python script.

JordBarb
12-18-2014, 02:49 PM
I have minimal experience with Python and absolutely no experience with Docker. How difficult will it be for someone like myself to get this running? Been dying for an updated AutoPricer.

AliasXNeo

AliasXNeo
12-18-2014, 07:23 PM
I have minimal experience with Python and absolutely no experience with Docker. How difficult will it be for someone like myself to get this running? Been dying for an updated AutoPricer.

AliasXNeo

Well, you don't need any experience with either to use this. If you can follow the instructions on the Docker installation guide for your operating system and get a command-line with Docker running started (described in the installation instructions), then all you need to do is enter the two commands in my original post and it should work flawlessly.

JordBarb
12-19-2014, 03:03 AM
Well, you don't need any experience with either to use this. If you can follow the instructions on the Docker installation guide for your operating system and get a command-line with Docker running started (described in the installation instructions), then all you need to do is enter the two commands in my original post and it should work flawlessly.

That's all I needed to know. :) I have a tendency to not stop messing with something that I can't get to work and I really didn't wanna wrestle with this. Trying it out later.

Miri
12-20-2014, 09:11 AM
What about proxy support?

AliasXNeo
12-20-2014, 10:52 AM
What about proxy support?

I can add that. Although honestly the 'proxy' part of most of these programs will be through utilizing the cloud. It would be kind of pointless to use a slow proxy on a gigabit cloud network. However, for local use on your computer, it does make sense.

Would anyone be interested in a tutorial for running these programs on a cloud provider? Unfortunately I can't find any free providers at the moment, so any tutorial would require signing up for a paid service (average cost is $0.007 per hour of use).