Git Product home page Git Product logo

gourbaninventoryprocessor's Introduction

URBN Go Inventory Processor

The URBN GO Inventory Processor is a golang app that will listen on Amazon SQS Queues for inventory Pool Definition and Inventory Fact Messages and process them into mongo.

##QuickStart

  • Install go on your system
  • Clone the repository
  • Check that the config file is what you want
  • use the command: "go run ./inventory_processor.go" to start the application

##Config

Configuration is done via a JSON file called config.json (sample below). The config can be reloaded at any time using the web interface. and is stored in the following GoLang struct

type Configuration struct {
	Amazon struct {
        AccountNumber     		        string 	`json:"accountNumber"`
        Endpoint          		        string 	`json:"endpoint"`
        QueueURL          		        string 	`json:"queueUrl"`
        Region            		        string 	`json:"region"`
        InventoryFactsQueueName 	    string 	`json:"inventoryFactsQueueName"`
        InventoryPoolsQueueName 	    string 	`json:"inventoryPoolsQueueName"`
    } 									        `json:"amazon"`
	App struct {
        NumDefinitionRoutines 	        int 	`json:"numDefinitionRoutines"`
        NumFactsRoutines      	        int 	`json:"numFactsRoutines"`
    } 									`json:"app"`
	Mongo struct {
        DB              			    string 	`json:"dB"`
        FactsCollection 			    string 	`json:"factsCollection"`
        HostAndPort     			    string 	`json:"hostAndPort"`
        PoolsCollection 			    string 	`json:"poolsCollection"`
    } 									        `json:"mongo"`
}

Amazon:

  • Amazon.Endpoint
  • Amazon.AccountNumber (Remenber the leading and trailing '/')
    • ElasticMQ - "/queue/"
    • Amazon - "/98XXXXXXX86/"
  • Amazon.Region
    • always set to "us-east-1" for now (even with ElasticMQ)
  • Amazon.QueueUrl
  • Amazon.InventoryPoolsQueueName - Inventory Pools Queue Name
  • Amazon.InventoryFactsQueueName - Inventory Facts Queue Name

Mongo:

  • Mongo.HostAndPort - (i.e.: "localhost:27017")
  • Mongo.DB - DB Name -
  • Mongo.PoolsCollection - Inventory Definition Collection
  • Mongo.FactsCollection - Inventory Pools Collection

Misc:

  • App.NumDefinitionRoutines - number of goroutines that will process inventory definitions simultaneously.
  • App.NumFactsRoutines - number of goroutines that will process inventory facts simultaneously

gourbaninventoryprocessor's People

Contributors

pfortin-urbn avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.