26
Urbanesia & Microsoft Technologies SQL on PHP @ Microsoft Batista Harahap @tista / bango29.com 7 July 2012

Urbanesia - Open Source & Microsoft

Embed Size (px)

DESCRIPTION

Combining the best of both worlds into Urbanesia's infrastructure :)

Citation preview

Page 1: Urbanesia - Open Source & Microsoft

Urbanesia & MicrosoftTechnologies

SQL on PHP @ MicrosoftBatista Harahap

@tista / bango29.com7 July 2012

Page 2: Urbanesia - Open Source & Microsoft
Page 3: Urbanesia - Open Source & Microsoft
Page 4: Urbanesia - Open Source & Microsoft
Page 5: Urbanesia - Open Source & Microsoft
Page 6: Urbanesia - Open Source & Microsoft
Page 7: Urbanesia - Open Source & Microsoft

DESIRED AIMSWhat Urbanesia wants

Page 8: Urbanesia - Open Source & Microsoft

RELEVANCY&

CONTEXT

Page 9: Urbanesia - Open Source & Microsoft

TECHNICAL OVERVIEWWhere do we come from and

where we want to be in the future

Page 10: Urbanesia - Open Source & Microsoft

Single application/database Server

Page 11: Urbanesia - Open Source & Microsoft

Technologies

• CentOS Linux• MySQL• Sphinx Search• CodeIgniter (PHP)• Memcache

Page 12: Urbanesia - Open Source & Microsoft

Caveats

• 20+ Seconds Queries in warm boots• Low concurrency• MySQL Query Performance• Horizontal scalability (Expensive)• Memory, CPU & Disk hungry• No separation of frontend & backend apps

Page 13: Urbanesia - Open Source & Microsoft

What to do?

Page 14: Urbanesia - Open Source & Microsoft

Application & Database Server Separation

Page 15: Urbanesia - Open Source & Microsoft

What we did

• Recoded 60% of Urbanesia• Initial process took ~1 month• Query hunting to optimize MySQL queries• Slimmed down to 18 controllers & 800 lines of

core controller• Separated database & application• Built a comprehensive API for our backend

Page 16: Urbanesia - Open Source & Microsoft

What we got

• Increased concurrency• Insignificant warm boot time• 1 month turned to 1 year to 2 years to …• A codebase that is difficult to maintain• Slow learning curves for new recruits• Lack of focus infrastructure wise

Page 17: Urbanesia - Open Source & Microsoft

MICROSOFT TECHNOLOGIESWhat changed our perspectivetowards technology platforms

Page 18: Urbanesia - Open Source & Microsoft

Challenges

• Urbanesia have no prior Microsoft experience• Design Patterns• Best Practices• Choosing which technology• TCO and other expenses

Page 19: Urbanesia - Open Source & Microsoft

Microsoft Open

• Open Source technologies on top of Microsoft platform

• Hands on consultation with trusted advisor from Infinys Cloud with Dondy Bappedyanto

• Introduced to .NET and SQL Server

Page 20: Urbanesia - Open Source & Microsoft

Solution

• Complete backend redesign & development using .NET 4.0 with WebAPI

• Abstract layers within the design to support potential migration to SQL Server

• Instead of CRUD cache invalidations, we implemented monitors

Page 21: Urbanesia - Open Source & Microsoft

Solution

Page 22: Urbanesia - Open Source & Microsoft

BENEFITSWhat do we get from this?

Page 23: Urbanesia - Open Source & Microsoft

Benefits

• 33% productivity increase translating to only 2 months development time for our backend

• More time to focus on the product itself• Implementing best practices from day 0• More structured approach to finally build BI

solutions• Invest more in memories, way cheaper than

servers

Page 24: Urbanesia - Open Source & Microsoft

CLOSING REMARKSOur experiences combining

the best of both worlds

Page 25: Urbanesia - Open Source & Microsoft

Closing Remarks

• Microsoft’s backend technology is unmatched, especially the IDE (Visual Studio) is really powerful

• Open Source’s frontend technology is unmatched in terms of new tech adoption, developer awareness and community support

• Both combines into happy developers, product focus and business as usual

Page 26: Urbanesia - Open Source & Microsoft