Going from Web Services to Party Planning
A few months ago, MyPunchbowl launched what we’ve been calling the Vendor Portal. If you go to www.punchbowl.com/vendors, you can search for vendors by category or keyword in a specific location. In Rails-speak, www.mypunchbowl.com/vendors is part of the monolithic MyPunchbowl.com application. We have a namespaced controller that deals with the requests, layouts and views for the main, state, city, state category, city category, and search results pages. But none of the vendor data exists in the MyPunchbowl.com database. We have another Rails app, creatively referred to as “The Vendors App”, that exposes a RESTful API around the several resources:
- Cities
- States
- Vendors
- Categories
We’ve extend the standard REST actions to include search on each of those resources, and that’s where all the magic happens. Whatever a user types in for a search gets passed to the Vendors REST controller. Some basic parameter filtering goes on in the controller, which then hands off to a wrapper that sits on top of ThinkingSphinx for full-text geosearching.
Next, we launched http://vendors.punchbowl.com, which provides a way for vendors to add their business to our database. The app is fairly straightforward:
- Some CRUD for adding a profile, a photo, selecting some themes
- A payment gateway so that vendors can buy better search ranking, photo galleries, hide ads on their listing page, etc…
- An admin where entries can be reviewed be our Vendor Quality team
I’ve had my share of nerdstorms on this project:
- Hacking up ThinkingSphinx because GoogleBot decided to start getting page 492 of search results when there were only 8 pages of search results, which TS did not particularly appreciate
- Playing with MongoDB’s mapreduce to allow us to give real time information on how many users are searching for a particular vendor category in a particular location
- Moving from an XML API to a JSON one when I realized that JSON was oodles more efficient (on both the generation and parsing ends)
- Improving caching mechanisms on the MyPunchbowl.com side of things to reduce the load on our Vendors API application
And so on….
But it’s cool to pop up from the technology trenches every now and then and actually take a look at what we’re doing. And what we’re doing is allowing people do this:
http://www.punchbowl.com/vendors/nm-new-mexico/taos/2401264/fun-peak
http://www.punchbowl.com/vendors/ma-massachusetts/lexington/2176091/sweet-beads—-birthday-parties-at-home
http://www.punchbowl.com/vendors/me-maine/bangor/2504232/dana-lavertu-dj-entertainment
http://www.punchbowl.com/vendors/il-illinois/maple-park/1494610/wild-orchid-custom-floral-design
http://www.punchbowl.com/vendors/al-alabama/birmingham/2360520/amerson-events-dj-service
And that’s pretty damn cool if you ask me. Yes, we have a long way to go. But seeing how many vendors are actually using this system to get in touch with people planning parties is awesome. Seeing how much effort they put into their listings and how creative they can be is exciting. I’m really proud of what we’ve done with the Vendor system at MyPunchbowl. And I’m looking forward to see where it goes from here.
Take a look around at what you’re doing. Have you popped up lately to see how users are using what you are building? It can be really motivating. If you have any cool stories for stuff that users are doing with your applications, share them in the comments. I’d love to see it.
