Integration of DynamoDB with Kentico CMS is the only part of the project that needs to be embedded in CMS source code. Although I can see the implementation, I don’t have access to it. As such, I decided to create a module as a part of Kentico AWS Utilities project that could later become part of CMS. This module, Kentico AWS Analytics, in fact comprises of two projects where one of them provides functionality whereas the other tests this implementation.
The main purpose of using DynamoDB with Kentico CMS was to change current behavior of logging. Kentico CMS automatically collects data and turns it onto web analytics that can be displayed to the user on demand. Although various modules in CMS generate unique web analytics, the main class that is responsible for collecting these analytics is HitLogProvider in CMS.WebAnalytics namespace. This is where all web analytics end up being processed and stored to the database. Storing process however happens in two phases. In the first phase, all the analytics data gets serialized and turned into log files residing in ~/App_Data/WebModules/WebAnalytics directory. Then, in the second phase, a scheduled task running each minute processes these files, stores their data in the database and removes them. This approach has been chosen as the amount of log data would certainly overwhelm database server the data was stored in one step.
Kentico AWS Analytics contains utility classes encapsulating interactions with DynamoDB server. KAAn enables to create new tables, list tables, get table information update tables and delete tables. In order to implement these CRUD operations, Amazon provides low-level API that allows to specify partial schema (even though NoSQL is schema-less) for new tables. As such create table method takes data model schema object that contains information about primary key(s), their data types and provisioned throughput. Even though there is only one way of managing tables, Amazon provides several for handling data. Just like with table operations the most basic approach is to use low-level API. This approach builds write and reads requests with data stored in a dictionary. Additionally, it allows creating batch operations for both reads and writes that can run several requests at the same time. Other approaches build on this low-level API while providing higher level of abstraction. Second approach uses helper classes to introduce type checking in database item operations. As such, the user can bind a table to an object and make use of methods such as GetItem or PutItem to update its records. With this approach request data can be wrapped in “dynamic” Document object (implemented as indexer) and passed to these methods. Third approach is referred to as Object Persistence Model since it bears uncanny resemblance to classic object-relation mappers. With this approach the user creates entities (strongly-typed objects with properties holding data) and annotates them with attributes, which allows binding object to specific table or telling the runtime how to serialize and deserialize properties. Then with the help of DynamoDBContext class that represents server context, these entities can be easily turned into or build from table records. Because of its simplicity and high level of abstraction, I am using this approach of data management in Kentico AWS Analytics.
12 Conclusion
The ultimate result of my work is the implementation of several tools that provide seamless configuration of Kentico CMS with various Amazon services. The most important of these tools is likely Kentico AWS Manager, a WPF application that enables to extensively exploit powerful Amazon API in order to perform numerous tasks such as creation of Kentico AMI, configuration with AWS RDS, management of storage and content delivery with the use AWS S3 and CloudFront and monitoring. Kentico AWS Utilities then feature several projects that are essential for runtime environment preparation and service configuration.
Overall, I am glad that I have had a chance to work on this project. Amazon Web Services is an extremely powerful product with countless features and possibilities. Additionally, I have to admit that it has been a delight for me as a developer to work with AWS mainly thanks to vast and detailed documentation, abundance of tutorials and samples and tools such as AWS Toolkit for Microsoft Visual Studio and AWS Tools for Windows PowerShell. Having a chance to work with other cloud solutions – both infrastructures and platforms such as Windows Azure, OpenShift and Heroku – I can claim without any hesitation that Amazon provides one of the very best cloud services on the market and clearly deserves his current first place in so-called “Cloud Wars”. Moreover, I believe that with this project I have only managed to scrape the surface of what Amazon has to offer and I would really like to encourage Kentico to expand its current cloud coverage and embrace AWS.
13 Sources -
Prof. BALCI, Osman. Introduction to Network-Centric Software Engineering. CS3704 Intermediate Software Design and Engineering, Department of Computer Science, Virginia Tech. 3. April 2001 [cit. 15. March 2014].
-
BOYE, Janus. Kentico CMS arrives in the Windows Azure Marketplace. J.Boye’s Blog [online]. 9. March 2011 [cit. 15. March 2014]. Available at: http://jboye.com/blogpost/kentico-cms-arrives-in-the-windows-azure-marketplace
-
ARIF, Mohamed. A history of cloud computing. ComputerWeekly.com [online].
March 2009 [cit. 15. March 2014]. Available at: http://www.computerweekly.com/feature/A-history-of-cloud-computing
-
Wikipedia Contributors. Windows Presentation Foundation. Wikipedia, The Free Encyclopedia [online]. Version: 24. February 2014, 00:03 [cit. 15. March 2014]. Available at: http://en.wikipedia.org/wiki/Windows_Presentation_Foundation
-
Wikipedia Contributors. Content management system. Wikipedia, The Free Encyclopedia [online]. Version: 12. March 2012, 08:05 [cit. 15. March 2014]. Available at: http://en.wikipedia.org/wiki/Content_management_system
-
Wikipedia Contributors. Kentico CMS. Wikipedia, The Free Encyclopedia [online]. Version: 17. December 2013, 19:31 [cit. 15. March 2014]. Available at: http://en.wikipedia.org/wiki/Kentico_CMS
-
Kentico CMS Team. Kentico CMS for ASP.NET. Kentico CMS Brochure [online]. c2014 [cit. 15. March 2014]. Available at: https://www.kentico.com/Product/Resources/Brochures/Kentico-CMS-brochure/Kentico-cms-brochure-english
-
Salesforce Team. A Complete History of Cloud Computing. Social Success, Salesforce [online]. c2014 [cit. 16. March 2014]. Available at: http://www.salesforce.com/uk/socialsuccess/cloud-computing/the-complete-history-of-cloud-computing.jsp
-
Wikipedia Contributors. Cloud Computing. Wikipedia, The Free Encyclopedia [online]. Version: 16. March 2014, 17:50 [cit. 16. March 2014]. Available at: http://en.wikipedia.org/wiki/Cloud_computing
-
Apprenda Team. IaaS, PaaS, SaaS (Explained and compared). Apprenda [online]. c2014 [cit. 22. March 2014]. Available at: http://apprenda.com/library/paas/iaas-paas-saas-explained-compared
-
CloudClickware Team. Cloud Computing: SaaS vs. PaaS vs. IaaS. Official Blog of CloudClickware [online]. 5. June 2013 [cit. 22. March 2014]. Available at: http://blog.cloudclickware.com/2013/06/05/cloud-computing-saas-vs-paas-vs-iaas
-
Skytap. Demystifying SaaS, PaaS and IaaS. Skytap [online]. 22. March 2011 [cit. 22. March 2014]. Available at: http://www.skytap.com/blog/demystifying-saas-paas-and-iaas
-
Wikipedia Contributors. Amazon Web Services. Wikipedia, The Free Encyclopedia [online]. Version: 12. March 2014, 20:12 [cit. 22. March 2014]. Available at: http://en.wikipedia.org/wiki/Amazon_Web_Services
-
AWS Team. How Do I Interact with AWS? AWS Documentation [online]. c2014 [cit. 22. March 2014]. Available at: http://docs.aws.amazon.com/gettingstarted/latest/awsgsg-intro/gsg-aws-what-tools.html
-
AWS Team. AWS Free Usage Tier. AWS [online]. c2014 [cit. 22. March 2014]. Available at: http://aws.amazon.com/free
-
AWS Team. Region and Availability Zones. AWS Documentation [online]. c2014 [cit. 22. March 2014]. Available at: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
-
AWS Team. AWS Identity and Access Management. AWS Documentation [online]. c2014 [cit. 29. March 2014]. Available at: http://docs.aws.amazon.com/IAM/latest/UserGuide/
-
AWS Team. IAM API Reference. Developer Guide, AWS Documentation [online]. c2014 [cit. 29. March 2014]. Available at: http://docs.aws.amazon.com/IAM/latest/APIReference/Welcome.html
-
AWS Team. Introduction to Amazon Elastic Cloud Compute Cloud. Developer Guide, AWS Documentation [online]. c2014 [cit. 30. March 2014]. Available at: http://docs.aws.amazon.com/AWSEC2/2009-07-15/DeveloperGuide/
-
AWS Team. Getting Started with Amazon EC2 Windows Instances. AWS Documentation [online]. c2014 [cit. 30. March 2014]. Available at: http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2Win_GetStarted.html
-
Wikipedia Contributors. Session (computer science). Wikipedia, The Free Encyclopedia [online]. Version: 1. March 2014, 09:00 [cit. 5. April 2014]. Available at: http://en.wikipedia.org/wiki/Session_(computer_science)
-
AWS Team. What is Amazon Relational Database Service? AWS Documentation [online]. c2014 [cit. 19. April 2014]. Available at: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/
-
MSDN. Features Supported by the Editions of SQL Server 2012, MSDN [online].
c2014 [cit. 19. April 2014]. Available at: http://msdn.microsoft.com/en-us/library/cc645993.aspx
-
AWS Team. Introduction to Amazon S3. Developer Guide, AWS Documentation [online]. c2014 [cit. 20. April 2014]. Available at: http://docs.aws.amazon.com/AmazonS3/latest/dev/
-
AWS Team. What Is Amazon CloudFront? Developer Guide, AWS Documentation [online]. c2014 [cit. 20. April 2014]. Available at: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/
-
AWS Team. What Is Amazon CloudWatch? Developer Guide, AWS Documentation [online]. c2014 [cit. 3. May 2014]. Available at: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/
-
AWS Team. What Is Amazon DynamoDB? Developer Guide, AWS Documentation [online]. c2014 [cit. 3. May 2014]. Available at: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/
14 Attachments A Kentico AWS Manager – IAM Views
Picture A.1: Credential view.
User inputs his AWS access keys or chooses to proceed with an existing account.
Picture A.2: Region view.
User chooses a default region (based on his location).
B Kentico AWS Manager – Main menu
Picture B.1: Main view.
User accesses individual Amazon Web Services or changes his region preferences.
C Kentico AWS Manager – EC2 Views
Picture C.1: AMI view.
User chooses underlying Windows Server AMI.
Picture C.2: Security view.
User specifies administrator password and sets protocol access rights.
Picture C.3: CMS subview #1.
User chooses default site template.
Picture C.4: CMS subview #2.
User specifies target location, project type, database name and additional features.
Picture C.6: Installation view.
Picture C.7: Success view.
User connects to the new instance via Remote Desktop or chooses to create an AMI.
Picture C.8: EC2 instance with Kentico CMS.
D Kentico AWS Manager – RDS Views
Picture D.1: CMS subview #2.
User selects RDS as primary database service.
Picture D.2: RDS view.
User chooses an available DB instance or creates new instance.
Additionally, user specifies DB instance master password.
E Kentico AWS Manager – S3 Views
Picture E.1: CMS subview #3.
User enables S3 service and proceeds to choose a bucket.
Picture E.2: New bucket view.
User specifies new bucket name.
Picture E.3: S3 view.
User selects newly-created (or existing) bucket.
Picture F.1: CMS subview #3.
User proceeds to select a distribution.
Picture F.2: CloudFront view.
User chooses an available distribution or creates new distribution.
G Kentico AWS Manager – CloudWatch Views
Picture G.1: CMS subview #4.
User enables detailed monitoring.
Picture G.2: CloudWatch view.
User selects one of the metrics to display statistics.
Share with your friends: |