A functional, 'serverless' chat application running on AWS (courtesy of S3 and Lambda functionality)
Hey there! So, toward meeting my goal of having a functional, bare-bones web application (with a Cassandra backend) up and running by today, I explored several execution options. And, as it turns out, I didn't quite accomplish that aim. But I got to something close, and I learned a lot of cool new stuff in the process!
What I did end up doing was creating (as in the title of the post) an AWS Lambda-based chat application that runs on an Amazon DynamoDB NoSQL database (rather than Cassandra) backend, thanks in large part to a great udemy.com tutorial by Brian Tajuddin and Frank Kane. In addition to the whole, hip concept of 'serverless' deployment (and DynamoDB), I got to learn about many new AWS technologies including the API Gateway, S3's built in capacity to host web traffic, Cognito user authentication and management, and CloudFront CDN functionality.
Thanks, Frank and Brian! Some pictures of the end result (deployed application) follow.
Figure 1. The serverless chat application sign-in screen.
Figure 2. A window where you can start chats with other verified members of the chat app. I believe Frank is an enthusiastic fan of Star Trek!
Figure 3. Here I'm having a conversation between two accounts I created to show an example of the centerpiece use case (chat, of course!) of the app.
After finishing up the udemy.com Cassandra intro course described in the last blog post, I've been eager to learn more about distributed data administration. A natural next step was to proceed over to datastax.com and to commence wolfing down several of their own free (and very useful!) Cassandra tutorials.
The DataStax tutorials are building quite effectively on the udemy.com introduction material. Where before I was setting up communication between one or several virtual Ubuntu instances on my local Windows machine, the DataStax sequence has me working among AWS EC2 instances as well, which is pretty cool! Their 201- and 220-level courses had me coding through exercises on just one EC2 node, and today I started linking up 3 t2.medium nodes to tackle some of their 210 course (enterprise operations) problems. This presented me with a whole bunch of rewarding challenges back-to-back:
1) linking up S3 buckets with EC2 nodes;
2) using the S3 bucket to transfer and install a tarball distribution of DataStax Enterprise (when a direct connection between the EC2 instances and DataStax was giving me some trouble);
3) negotiating healthy topology of a small Cassandra cluster through conditions that differ slightly from DataStax's current documentation for their 210 course; and
4) troubleshooting the bootstrapping of an individual node in the cluster (I think my running a stress test on that node in isolation before adding it to the cluster gave me some problems!).
At the end of the day, I was able to get all three nodes up and running normally. As I may have mentioned before, I've got a bunch of ideas for web application projects that I'd like to start building, but I'm trying to take manageable 'baby steps' here first. By the end of the week, I'd like to have at least an absolute bare-bones web server up and communicating with a Cassandra cluster.
Figure 1. I finally cleaned up my final AWS EC2 node enough to keep it from hanging during the Cassandra bootstrapping process. Yay! As you can see, I tend to run nodetool status/dsetool status a lot.
Hey again! I got a few other things done early this week that kind of fit into the category of the last post's topic. Two fun developments were 1) a bit of work in Apache Zeppelin (for prototyping/viewing 'big data' analysis in a notebook environment), and 2) a crash course in the Cassandra distributed and non-relational datastore technology.
The Cassandra tutorial was especially fun because within a few hours of starting the course, I was (admittedly, with my hand held through the process!) creating and updating a mock vehicle tracking web application facilitated through Java/CassandraQL created/hosted in a virtual Ubuntu environment. It looks like soon I'll be spinning up several virtual machines to test out scalability on a small Cassandra cluster. It's fascinating stuff, and I'm looking forward to coding up my own projects in similar spaces.
A couple of screenshots (from the tutorials above) follow.
Figure 1. This is actually just output from a ready-made tutorial script for running and analyzing a Spark job in Zeppelin, but still, the results were cool to see! I like that this kind of notebook environment is available. While it's not something you'd run in production/deployment, I enjoy the option to fiddle around graphically with code and objects during early prototyping of a project (sort like the Python/Jupyter relationship).
Figure 2. Here I'm completing a code-along creation of a Java/Cassandra-based web application that updates and displays (via interaction with Google Maps) vehicle tracking data. Fun stuff! I'm looking forward to deploying database tasks to a cluster of several virtual nodes in the next few days. Thanks to Ruth Stryker (of Infinite Skills) for the great udemy.com course I'm taking to learn about Cassandra!